Skip to content

Commit

Permalink
Merge pull request #253 from lsst/tickets/DM-43939
Browse files Browse the repository at this point in the history
DM-43939: Drop / prefix from doc URLs in the FastAPI app template
  • Loading branch information
jonathansick committed Apr 17, 2024
2 parents f9d8347 + 42faacb commit 3690d02
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
title="example",
description=metadata("example")["Summary"],
version=version("example"),
openapi_url=f"/{config.path_prefix}/openapi.json",
docs_url=f"/{config.path_prefix}/docs",
redoc_url=f"/{config.path_prefix}/redoc",
openapi_url=f"{config.path_prefix}/openapi.json",
docs_url=f"{config.path_prefix}/docs",
redoc_url=f"{config.path_prefix}/redoc",
lifespan=lifespan,
)
"""The main FastAPI application for example."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
title="{{ cookiecutter.name }}",
description=metadata("{{ cookiecutter.name }}")["Summary"],
version=version("{{ cookiecutter.name }}"),
openapi_url=f"/{config.path_prefix}/openapi.json",
docs_url=f"/{config.path_prefix}/docs",
redoc_url=f"/{config.path_prefix}/redoc",
openapi_url=f"{config.path_prefix}/openapi.json",
docs_url=f"{config.path_prefix}/docs",
redoc_url=f"{config.path_prefix}/redoc",
lifespan=lifespan,
)
"""The main FastAPI application for {{ cookiecutter.name }}."""
Expand Down
2 changes: 1 addition & 1 deletion project_templates/technote_md/testn-000/technote.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ series_id = "TESTN"
canonical_url = "https://testn-000.lsst.io"
github_url = "https://github.com/lsst/testn-000"
github_default_branch = "main"
date_created = 2024-04-17T18:46:44Z
date_created = 2024-04-17T20:58:53Z
organization.name = "Vera C. Rubin Observatory"
organization.ror = "https://ror.org/048g3cy84"
license.id = "CC-BY-4.0"
Expand Down
2 changes: 1 addition & 1 deletion project_templates/technote_rst/testn-000/technote.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ series_id = "TESTN"
canonical_url = "https://testn-000.lsst.io"
github_url = "https://github.com/lsst/testn-000"
github_default_branch = "main"
date_created = 2024-04-17T18:46:44Z
date_created = 2024-04-17T20:58:53Z
organization.name = "Vera C. Rubin Observatory"
organization.ror = "https://ror.org/048g3cy84"
license.id = "CC-BY-4.0"
Expand Down

0 comments on commit 3690d02

Please sign in to comment.