Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openapi2jsonschema/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down