Container with json and json-schema tools used to clean up the pantheon generated swagger file.
252
Container with json and json-schema tools used to clean up the pantheon generated swagger file. Currently contains
jqjson-dereference-clijson-schema-resolve-allofWe combine this with
jq 'delpaths([ ["paths"]])' target/swagger/swagger.json > components.temp.json \
&& json-dereference -s components.temp.json -o components.temp.json \
&& cat components.temp.json | json-schema-resolve-allof > components.json \
&& jq '.components |= $a[0].components' --slurpfile a components.json target/swagger/swagger.json > out.json \
&& jq '.paths |= $b[0]' --slurpfile b <(jq '.paths | with_entries(.key |= "/api/v1" + .)' out.json) out.json \
| sed -E -e 's/(([a-zA-Z]+)\.)+([a-zA-Z]+)/\3/g' > docs/swagger.json
to dereference and simplify the schema types. This ensures that swagger code generators produce reasonably good code for JavaScript and Go.
Content type
Image
Digest
Size
-
Last updated
over 7 years ago
docker pull contiamo/swagger-fixer