-
|
Is your feature request related to a problem? No Currently, Redoc and Swagger UI are served from literal strings in the code with formatted-in options for Title, JS URL, etc. However, these are not customisable and the hardcoded defaults are always used. The solution you would likeI propose to add some a Describe alternatives you've consideredCurrently you could implement your own Redoc/Swagger UI endpoints instead of using FastAPI's ones and returning your own HTML, but I feel that sort of defeats the purpose of having these features. These endpoints could even be converted to full-blown Jinja2 templates or similar, although this does seem a bit excessive to me. Additional context(note: what follows are a bunch of rambled related ideas I came up with in the 5 minutes I spent writing this issue, in hindsight these could have been separate issues) Perhaps as part of this revamp, the Another related suggestion would be to allow rewriting all requests to |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
I just found https://fastapi.tiangolo.com/advanced/extending-openapi/#serve-the-static-files, which has some implicit documentation on customisation, but the point still stands that it would be nice to have a kwargs dict passed to the automatic methods so we don't have to override methods. |
Beta Was this translation helpful? Give feedback.
-
#2568 does exactly this. |
Beta Was this translation helpful? Give feedback.
-
|
@retnikt I think since #2568 is merged and released you can probably close this ticket! |
Beta Was this translation helpful? Give feedback.
-
|
@retnikt #2568 does not fully address this I think. There is still literally hardcoded HTML header and favicon links, among others, which are not customizeable without overwriting the docs and serving your own from e.g. /static |
Beta Was this translation helpful? Give feedback.
#2568 does exactly this.