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

DM-43939: Drop / prefix from doc URLs in the FastAPI app template #253

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

jonathansick
Copy link
Member

Before we had a bug where the OpenAPI docs wouldn't be available because their URL paths needed a double slash prefix "//" with the default configuration for path_prefix.

The path_prefix in Config includes a "/" prefix by default, and app.include_router is set up to use the config's "/" prefix, and so I think the correct behaviour is for the config to have the path prefix.

Before we had a bug where the OpenAPI docs wouldn't be available because
their URL paths needed a double slash prefix "//" with the default
configuration for path_prefix.

The path_prefix in Config includes a "/" prefix by default, and
app.include_router is set up to use the config's "/" prefix, and so I
think the correct behaviour is for the config to have the path prefix.
@jonathansick jonathansick requested a review from rra April 17, 2024 21:09
Copy link
Member

@rra rra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@jonathansick jonathansick merged commit 3690d02 into main Apr 17, 2024
4 checks passed
@jonathansick jonathansick deleted the tickets/DM-43939 branch April 17, 2024 21:35
jonathansick added a commit to lsst-sqre/fastapi-bootcamp that referenced this pull request Apr 17, 2024
I think this was a bug in our template that'll be fixed in
lsst/templates#253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants