You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is caused by our spec above not including a versions key since it's using version instead. So it fails out of the original if condition but it is also not using validation so we fail the elif condition as well which means we end up doing nothing with the entire file.
I'm hoping either openapi2jsonschema.py could be modified to respect a singular version as specified in my example or if that is not possible then at least the script will present an error and a non-zero exit code for the user.
The text was updated successfully, but these errors were encountered:
michohl
changed the title
openapi2json.py silently fails when using "version" instead of "versions"
openapi2jsonschema.py silently fails when using "version" instead of "versions"
Dec 27, 2022
When running
openapi2jsonschema.py
on a CRD that doesn't contain a versions key it will silently fail.I'm using the following as an example (referred to as
test.yml
)If I run the script with this file I get the following behavior:
I believe this is caused by our spec above not including a
versions
key since it's usingversion
instead. So it fails out of the original if condition but it is also not usingvalidation
so we fail the elif condition as well which means we end up doing nothing with the entire file.I'm hoping either
openapi2jsonschema.py
could be modified to respect a singular version as specified in my example or if that is not possible then at least the script will present an error and a non-zero exit code for the user.The text was updated successfully, but these errors were encountered: