Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Tweaks to get swagger-codegen working #218

Merged
merged 6 commits into from
Mar 12, 2015
Merged

Tweaks to get swagger-codegen working #218

merged 6 commits into from
Mar 12, 2015

Conversation

BradWhittington
Copy link
Contributor

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

@ariovistus
Copy link
Contributor

interesting. Please make this an issue so it doesn't get lost once this PR is merged. Also, you're breaking the build, looks like you need to update the tests.

@BradWhittington
Copy link
Contributor Author

Fixing tests, and opened #233

ariovistus pushed a commit that referenced this pull request Mar 12, 2015
Tweaks to get swagger-codegen working
@ariovistus ariovistus merged commit 61294b4 into marcgibbons:master Mar 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants