aiohttp-swagger icon indicating copy to clipboard operation
aiohttp-swagger copied to clipboard

Nested application static_prefix

Open Skorpyon opened this issue 7 years ago • 5 comments

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')

Skorpyon avatar Mar 09 '17 17:03 Skorpyon

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

pascal-de-ladurantaye avatar Mar 24 '17 14:03 pascal-de-ladurantaye

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.

cr0hn avatar Mar 24 '17 15:03 cr0hn

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!

pascal-de-ladurantaye avatar Mar 24 '17 15:03 pascal-de-ladurantaye

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.

cr0hn avatar Mar 24 '17 16:03 cr0hn

fixed in #34

olexandr-klymenko avatar Oct 25 '17 09:10 olexandr-klymenko