(req: Request)
| 1149 | if self.openapi_url and self.redoc_url: |
| 1150 | |
| 1151 | async def redoc_html(req: Request) -> HTMLResponse: |
| 1152 | root_path = req.scope.get("root_path", "").rstrip("/") |
| 1153 | openapi_url = root_path + self.openapi_url |
| 1154 | return get_redoc_html( |
| 1155 | openapi_url=openapi_url, title=f"{self.title} - ReDoc" |
| 1156 | ) |
| 1157 | |
| 1158 | self.add_route(self.redoc_url, redoc_html, include_in_schema=False) |
| 1159 |
nothing calls this directly
no test coverage detected