diff --git a/openapi2jsonschema/command.py b/openapi2jsonschema/command.py index 9cd1bfc..1fd7083 100644 --- a/openapi2jsonschema/command.py +++ b/openapi2jsonschema/command.py @@ -94,6 +94,10 @@ def default(output, schema, prefix, stand_alone, expanded, kubernetes, strict): # For Kubernetes, populate `apiVersion` and `kind` properties from `x-kubernetes-group-version-kind` for type_name in definitions: type_def = definitions[type_name] + if "properties" not in type_def: + error(f"{type_name} has no properties") + continue + if "x-kubernetes-group-version-kind" in type_def: for kube_ext in type_def["x-kubernetes-group-version-kind"]: if expanded and "apiVersion" in type_def["properties"]: