MCPcopy Create free account
hub / github.com/binkuolo/fastapi / custom_openapi

Function custom_openapi

app.py:29–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28# custom_openapi
29def custom_openapi():
30 if application.openapi_schema:
31 return application.openapi_schema
32 openapi_schema = get_openapi(
33 description=settings.DESCRIPTION,
34 version=settings.VERSION,
35 title=settings.PROJECT_NAME,
36 routes=app.routes,
37 )
38 openapi_schema["info"]["x-logo"] = {
39 "url": "/logo-teal.png"
40 }
41 application.openapi_schema = openapi_schema
42 return application.openapi_schema
43
44
45application.openapi = custom_openapi

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected