oapi-codegen
oapi-codegen copied to clipboard
Cannot generate from a JSON specification
When generating from a yaml spec this project converts to JSON first. However if given a JSON spec it still attempts to convert yaml to json failing...
error loading swagger spec in ./spec.json
: error converting YAML to JSON: yaml: line 6: found unknown escape characterexit status 1
hello.go:11: running "go": exit status 1
This means to generate off a JSON spec you have to first convert JSON to yaml and then generate which just converts it back...
Ideally there should at least be a flag to specify if the source is already JSON