concentricsky / django-tastypie-swagger

An adapter to use swagger-ui with django-tastypie.
Other
132 stars 144 forks source link

Improvment - Addition of custom model via extra-action #105

Closed Elisiac closed 9 years ago

Elisiac commented 9 years ago

I modified two places in the document: Around line 352 so that a two news extra_actions elements are available : "responseClass" as well as "model" in order to allow the user to define custom model for his custom endpoints. The other modification is on line 563+ to add the custom model onto the modellist.

This is my first commit / pull request ever. So let me know if I should do this differently. Thanks!

johnraz commented 9 years ago

Awesome ! Other than the 2 small changes above this LGTM. Merci !

Elisiac commented 9 years ago

Ok, thanks for the feedback! :D So what should I do now? Just do the changes you suggested and submit them to my own repository?

johnraz commented 9 years ago

Yep, apply the changes and push to the same branch

Elisiac commented 9 years ago

The fix has been commited. I added as well a small fix concertning the fields that were showing all 'optional' from not reading the model from tastypie properly. I could easily do some more changes and merge as well the code given by other users. I definitely need to keep improving this. Let me know how it is suppose to work.

Thanks!

johnraz commented 9 years ago

I will merge this and you can open new pull requests for other features. Try to keep 1 pull per feature.

Also, if you plan on working on this project, I would recommend that you go through the various open issues as there are some open discussions there and I'm mostly inactive on the project myself.

Cheers.