fsbahman / apidoc-swagger

apidoc and swagger are two nice projects which are focusing on documentation of APIs. This project is a middle tier which tries to bring them together in a sense that it uses apidoc to convert inline documentation to json schema and later convert it to swagger json schmea.
Other
251 stars 129 forks source link

Required should not be created by default #42

Open frbl opened 4 years ago

frbl commented 4 years ago

Swagger complains whenever you include required when its empty. Im now using this regex;

    cat doc/swagger.json | sed -e "s/,\"required\":[ ]*\[\]//g" | jq > doc/swagger-clean.json

I couldn't test this change (don't have a dev environment here), could anyone try it out?