aiohttp-swagger
aiohttp-swagger copied to clipboard
Nested application static_prefix
I got a problem with nested app.
Pseudocode:
api_app = Application()
setup_swagger(api_app, swagger_url='/doc')
main_app = Application()
main_app.add_subapp('/api', api_app)
Problem is that Swagger is available on /api/doc
, but Swagger template try to load static files from /doc/swagger_static/
that sure not exist in main app, because its created from nested with path /api/doc/swagger_static/
Need some hack to control static path building for allow rewrite it from /doc/swagger_static
in templates to <prefix>/doc/swagger_static
It may be nested_prefix
attr in setup_swagger()
as example: setup_swagger(app, nested_prefix='/api')
unfortunately, this repo is not maintained... If you ever fork it to fix it, please say it here because I would be interested in this fix
Hi.
@pascal-de-ladurantaye I invite you or anyone to fix this issue and send a PR.
Even more: if anyone that want to be collaborator of the project, I have no problems to add as a collaborator in github.
I have no free time to solve the issues. I released this code as open source to bring the opportunity to anyone to collaborate and to try to grow this project. Instead of said that the project is not maintained, maybe you could help improve them.
Hey @cr0hn , I'm sorry I assumed it was unmaintained since there has been an unmerged pull request for over a month now... I will make sure to push a PR for my previous issue then!
Sorry If I not merged the PR. As I said I have not enough free time and some times I forgot to follow all the projects issues. I juste merged a pending PR. Pls, send again your PR.
fixed in #34