concentricsky / django-tastypie-swagger

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

fix for Version not showing on index page, fixed typos #79

Closed fradeve closed 10 years ago

fradeve commented 10 years ago

With this small fix, "version" on bottom of the index page is taken directly from "VERSION" variable in "settings.py", otherwise "unknown" is shown.

johnraz commented 10 years ago

We are dealing with multiple api's support in this module, the value here is meant to be the api's version not tastypie swagger's version...

fradeve commented 10 years ago

Sorry, I will try to explain myself a little better: what this patch does is to fill in the "version" field on the bottom of the index page with the API version; this value is taken directly from "VERSION" in the settings file.

I could change it to "API_VERSION" or "TASTYPIE_API_VERSION" to be a little more explicit.

If you have a better idea on how to get this working please let me know, I'd love to have the version of the API shown on the page :)

johnraz commented 10 years ago

Read my comment again. You are not fullfiling the multi api support with your patch, you can only specify one version for one api but tastypie-swagger module is made in such a way that you can document more then 1 api... So you should find a way to do this per api, maybe in the URL declaration, not globally in the settings. I dont have time to dig this right now as im abroad but looking at It would be the same as fixing It and its not my priority.

johnraz commented 10 years ago

LGTM, thanks for the contrib !