flasgger / flasgger

Easy OpenAPI specs and Swagger UI for your Flask API
http://flasgger.pythonanywhere.com/
MIT License
3.63k stars 524 forks source link

Is it possible to generate a static apidoc.json file and serve that? #375

Open Jonyorker opened 4 years ago

Jonyorker commented 4 years ago

Hi,

Is it possible to generate an apidocs.json file and server that file when a client goes to that path rather than generating one on the fly?

Thanks!

minotru commented 4 years ago

I guess you need to call this method of Swagger instance: https://github.com/flasgger/flasgger/blob/ce98b046cbec2b2eb8c6de6df4b5409c06a8e539/flasgger/base.py#L296