Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to define "basePath" #111

Closed
vykozlov opened this issue Apr 18, 2023 · 1 comment · Fixed by #145 or #140 · May be fixed by #171
Closed

Ability to define "basePath" #111

vykozlov opened this issue Apr 18, 2023 · 1 comment · Fixed by #145 or #140 · May be fixed by #171
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@vykozlov
Copy link
Contributor

vykozlov commented Apr 18, 2023

Description

Sometimes, especially when behind the reverse proxy, it might be useful to have "basePath" for the API not as / but as something else, e.g /api. It would be nice, if a user could (re-)define this "basePath"

In the case of OAS3, in swagger.yaml this would correspond to:

servers:
  - url: /api

Ref: https://swagger.io/docs/specification/api-host-and-base-path/

@alvarolopez
Copy link
Collaborator

This is not working, as only the UI is being mounted under the new path.

alvarolopez added a commit that referenced this issue Aug 9, 2024
Passing the basePath to the aiohttp_apispec.setup_aiohttp_apispec method
caused that URL that were used from the Swagger UI added the path twice,
resulting in 404 not found methods.

Fixes #111
alvarolopez added a commit that referenced this issue Aug 9, 2024
Passing the basePath to the aiohttp_apispec.setup_aiohttp_apispec method
caused that URL that were used from the Swagger UI added the path twice,
resulting in 404 not found methods.

Fixes #111
alvarolopez added a commit that referenced this issue Aug 9, 2024
alvarolopez added a commit that referenced this issue Aug 9, 2024
IgnacioHeredia pushed a commit that referenced this issue Aug 9, 2024
Passing the basePath to the aiohttp_apispec.setup_aiohttp_apispec method
caused that URL that were used from the Swagger UI added the path twice,
resulting in 404 not found methods.

Fixes #111
IgnacioHeredia pushed a commit that referenced this issue Aug 9, 2024
alvarolopez added a commit that referenced this issue Aug 9, 2024
Passing the basePath to the aiohttp_apispec.setup_aiohttp_apispec method
caused that URL that were used from the Swagger UI added the path twice,
resulting in 404 not found methods.

Fixes #111
alvarolopez added a commit that referenced this issue Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants