openapi2jsonschema icon indicating copy to clipboard operation
openapi2jsonschema copied to clipboard

openapijson2schema/command.py: throw error instead of proceeding

Open kevinburkesegment opened this issue 3 years ago • 1 comments

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.

kevinburkesegment avatar Oct 25 '22 01:10 kevinburkesegment

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

larsks avatar Mar 30 '23 22:03 larsks