()
| 10 | |
| 11 | |
| 12 | def custom_openapi(): |
| 13 | if app.openapi_schema: |
| 14 | return app.openapi_schema |
| 15 | openapi_schema = get_openapi( |
| 16 | title="Custom title", |
| 17 | version="2.5.0", |
| 18 | summary="This is a very custom OpenAPI schema", |
| 19 | description="Here's a longer description of the custom **OpenAPI** schema", |
| 20 | routes=app.routes, |
| 21 | ) |
| 22 | openapi_schema["info"]["x-logo"] = { |
| 23 | "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" |
| 24 | } |
| 25 | app.openapi_schema = openapi_schema |
| 26 | return app.openapi_schema |
| 27 | |
| 28 | |
| 29 | app.openapi = custom_openapi |
nothing calls this directly
no test coverage detected
searching dependent graphs…