Where does Django REST Swagger generate a schema file?

1.6k Views Asked by At

I want to modify the Swagger documentation generated by Django REST Swagger. I'd like to find the API definition or schema file(s) that Django REST Swagger generates. I haven't been able to find those files.

Is there something like a YAML or JSON file generated when Django REST Swagger creates API documentation?

Where can I find that file on the server?

Thanks!

1

There are 1 best solutions below

0
On

There is no static files on the server.

Swagger generates the documentation based on rest-framework internal schema representation.

So if you want to change the representation, you should replace swagger templates or js files. If you want to change the content of the documentation(some kind of string replacements etc.) you should preprocess schemas object before render in your schema_view.