instrumenta / openapi2jsonschema

Convert OpenAPI definitions into JSON schemas for all types in the API
Other
226 stars 87 forks source link

Tool generates schemas with invalid references #47

Open jcmcken opened 3 years ago

jcmcken commented 3 years ago

If I run the tool against Istio OpenAPI schemas, it generates a schema successfully, but the schema contains invalid references. E.g. I run it like this:

openapi2jsonschema --kubernetes --strict --expanded local/path/to/schema.json

It generates schema with references like this:

{
  ...snip...
  "$ref": "istio.networking.v1beta1.TLSRoute.json"
  ...snip...
}

And yet, the tool does not actually generate this file istio.networking.v1beta1.TLSRoute.json. So loading of the schema using kubeval fails outright.