Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openapijson2schema/command.py: throw error instead of proceeding #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinburkesegment
Copy link

@kevinburkesegment kevinburkesegment commented Oct 25, 2022

If we can't find either 'swagger' or 'openapi' keys, previously we'd
get an UnboundLocalError because of an undefined variable. Even if we
fixed that, it is probably bad to continue with command flow when the
behavior is not well defined. Instead throw an error to exit execution
immediately.

Fixes #16.

If we can't find either 'swagger' or 'openapi' keys, previously we'd
get an UnboundLocalError because of an undefined variable. Even if we
fixed that, it is probably bad to continue with command flow when the
behavior is not well defined. Instead throw an error to exit execution
immediately.

Fixes instrumenta#16.
@larsks
Copy link

larsks commented Mar 30, 2023

I'm collecting fixes in https://github.com/larsks/openapi2jsonschema. I've merged this patch into that repository.

hectorm added a commit to hectorm/openapi2jsonschema that referenced this pull request Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extraction of Schema from K8S 1.12.2 Spec fails with UnboundLocalError
2 participants