Skip to content

Commit

Permalink
Fix for openapi.json location if another root directory (#378)
Browse files Browse the repository at this point in the history
* Openapi.json file location with another root dir

* Another root fix for starlette

---------

Co-authored-by: Keming <[email protected]>
  • Loading branch information
Vlczech and kemingy authored Oct 31, 2024
1 parent 4701061 commit 67c2684
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spectree/plugins/falcon_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def register_route(self, app: Any):
f"/{self.config.path}/{ui}",
self.DOC_PAGE_ROUTE_CLASS(
self.config.page_templates[ui],
spec_url=self.config.spec_url,
spec_url=self.config.filename,
spec_path=self.config.path,
**self.config.swagger_oauth2_config(),
),
Expand Down
2 changes: 1 addition & 1 deletion spectree/plugins/starlette_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def register_route(self, app):
f"/{self.config.path}/{ui}",
lambda request, ui=ui: HTMLResponse(
self.config.page_templates[ui].format(
spec_url=self.config.spec_url,
spec_url=self.config.filename,
spec_path=self.config.path,
**self.config.swagger_oauth2_config(),
)
Expand Down

0 comments on commit 67c2684

Please sign in to comment.