Reputation: 2183
I'm pretty new to Django and I'm currently working on a project where Django-rest-framework is used and the documentation is created with Swagger trough the django-rest-swagger package.
I'm trying to find (or generate) a swagger.json definition file, any idea on where it can be found with this package? I would like to use it to generate client side code.
Thanks
Upvotes: 5
Views: 2746
Reputation: 101
You can append ?format=openapi
to the end of your docs URL and it will return the raw JSON text instead of the UI.
Upvotes: -1
Reputation: 2183
The swagger schema definition can be generated with https://github.com/signalfx/fetch-swagger-schema regardless the api implementation.
Upvotes: 2