This repository has been archived by the owner on Jan 11, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was struggling to get swagger-api/swagger-codegen (https://github.com/swagger-api/swagger-codegen) using swagger-codegen-distribution-2.1.1-M1.jar to build clients against the output of django-rest-swagger. I spent some intimate time with swagger-tools doing validation passes on the output from my project using release django-rest-swagger==0.2.8, and tweaked a few defaults and removed a few fields if they were None/null, as they go against the released swagger 1.2's spec (e.g. defaultValue needs to be inline with the type specified by 'type', or not present).
It's certainly not exhaustive, and there's a bigger job to getting it to produce fully valid 1.2 output, but this is enough to get it building clients using swagger-codegen. A more encompassing testing approach would be to use the pypi/json-spec / jsonschema projects to run automated tests against generated output using schemas from https://github.com/swagger-api/swagger-spec/tree/master/schemas/v1.2