Fastapi let you use local static resources for rendering the swagger documentation; very nice for air-gapped environments. How does one setup something similar in Cadwyn?
As an example; for Fastapi the following can be used to accomplish this:
@app.get("/docs", include_in_schema=False)
async def custom_swagger_ui_html():
return get_swagger_ui_html(
openapi_url=app.openapi_url,
title=app.title,
oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url,
swagger_js_url="/static/swagger-ui-bundle.js",
swagger_css_url="/static/swagger-ui.css",
)
@app.get(app.swagger_ui_oauth2_redirect_url, include_in_schema=False)
async def swagger_ui_redirect():
return get_swagger_ui_oauth2_redirect_html()
But this would not work currently for Cadwyn.
Fastapi let you use local static resources for rendering the swagger documentation; very nice for air-gapped environments. How does one setup something similar in Cadwyn?
As an example; for Fastapi the following can be used to accomplish this:
But this would not work currently for Cadwyn.