Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Fix showing non-existing API v1_0
Browse files Browse the repository at this point in the history
* `fastapi-versioning` automatically adds a v1_0 if `default_version`
  isn't present. This lead to having three docs pages at `/v1_0/docs`,
  `v0_1/docs` and `docs`.

Signed-off-by: sami-m-g <[email protected]>
Reviewed-by: João Gonçalves <[email protected]>
  • Loading branch information
sami-m-g authored and jsvgoncalves committed May 21, 2024
1 parent a3edc1d commit 08e0f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dds_glossary/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def create_app() -> FastAPI:

app = FastAPI()
app.include_router(router_versioned)
app = VersionedFastAPI(app, enable_latest=True)
app = VersionedFastAPI(app, enable_latest=True, default_version=(0, 1))
app.include_router(router_non_versioned)

return app
Expand Down

0 comments on commit 08e0f54

Please sign in to comment.