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

Add support for ASGI root_path for openapi docs #1199

Merged
merged 11 commits into from
Jun 11, 2020
Prev Previous commit
Next Next commit
Fix extending openapi test.
  • Loading branch information
iksteen committed Mar 31, 2020
commit 230c0a334f77c9aea2c66d45dccba7034c02c51d
2 changes: 1 addition & 1 deletion docs_src/extending_openapi/tutorial001.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async def read_items():
return [{"name": "Foo"}]


def custom_openapi():
def custom_openapi(openapi_prefix: str):
if app.openapi_schema:
return app.openapi_schema
openapi_schema = get_openapi(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_duplicate_models_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ class Model3(BaseModel):
def f():
pass # pragma: no cover

openapi = app.openapi()
openapi = app.openapi("")
assert isinstance(openapi, dict)