Closed carltongibson closed 4 years ago
This is related to #650 (which is about --path).
--path
CLI arguments aren't enforced, or given sensible defaults.
The one I hit is --format. If you don't provide this there is no error until you get to the final "Valid schema" message. At that point you get a totally mysterious KeyError:
--format
KeyError
(apistar) ~/Desktop $ apistar validate --path schema.yml Traceback (most recent call last): ... File ".../apistar/cli.py", line 163, in validate }[format] KeyError: None
Cracking open cli.py, format there is the missing CLI argument. Sending --format=openapi resolves the issue.
cli.py
format
--format=openapi
format should be required, so as to provide a helpful error message. Maybe it should default to openapi...
openapi
This is related to #650 (which is about
--path
).CLI arguments aren't enforced, or given sensible defaults.
The one I hit is
--format
. If you don't provide this there is no error until you get to the final "Valid schema" message. At that point you get a totally mysteriousKeyError
:Cracking open
cli.py
,format
there is the missing CLI argument. Sending--format=openapi
resolves the issue.format
should be required, so as to provide a helpful error message. Maybe it should default toopenapi
...