(json_spec: dict)
| 1160 | |
| 1161 | @staticmethod |
| 1162 | def normalize_json(json_spec: dict) -> dict: |
| 1163 | networks = json_spec.get('networks') |
| 1164 | if networks is None: |
| 1165 | return json_spec |
| 1166 | if isinstance(networks, list): |
| 1167 | return json_spec |
| 1168 | if not isinstance(networks, str): |
| 1169 | raise SpecValidationError(f'Networks ({networks}) must be a string or list of strings') |
| 1170 | json_spec['networks'] = [networks] |
| 1171 | return json_spec |
| 1172 | |
| 1173 | @classmethod |
| 1174 | def _from_json_impl(cls: Type[ServiceSpecT], json_spec: dict) -> ServiceSpecT: |
no test coverage detected