instrumenta / instrumenta/openapi2jsonschema

KeyError when a definition doesn't have "properties"

Open
#49 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
248
Forks
95
PR merge metrics
No merged PRs in 30d

Description

https://github.com/instrumenta/openapi2jsonschema/blob/d697cbff8a25f520e125e3a5f79cb4e9b972e8ce/openapi2jsonschema/command.py#L99 will cause KeyError when there is no "properties" in some schema (CRDs and some new built-in types in OSS k8s).

For examples:
```
"io.gke.nodemanagement.v1alpha1.UpdateInfo": {
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "nodemanagement.gke.io",
"kind": "UpdateInfo",
"version": "v1alpha1"
}
]
},
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.