python-restx / flask-restx

Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
https://flask-restx.readthedocs.io/en/latest/
Other
2.15k stars 333 forks source link

Custom swagger filename #191

Open ProgHaj opened 4 years ago

ProgHaj commented 4 years ago

Currently, when trying to use multiple blueprints with different restx Api's but with the same url_prefix, restx will default to using the same swagger.json file (since it is located in the folder). This makes eg Api(bp1, doc='/docs/internal') and Api(bp2, doc='docs/external') show the same swagger.json file, with only the first blueprint registered to the flask application will being shown (but both routes still works).

I would like to be able to be able to specify my swagger.json filename myself when creating the Api, to be able to have multiple docs for different blueprints under the same url_prefix scope.

nfickas commented 3 years ago

I see this has been open for a while, this enhancement would help out my team immensely. Is there anything holding back the associated merge request?

ProgHaj commented 3 years ago

It would help my team immensely as well. I don't believe anything is holding it back -- just needs a final review from the maintainers.

nfickas commented 3 years ago

@ProgHaj looks like #192 needs to be rebased, but looks like it's super close to getting merged in!

ProgHaj commented 3 years ago

Thanks, rebased!

j5awry commented 3 years ago

merged #192. If folks can try out from the main branch, please do. we'll try to get release out this quarter.