-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for static swagger (#112) #557
Conversation
Codecov Report
@@ Coverage Diff @@
## master #557 +/- ##
======================================
Coverage 100% 100%
======================================
Files 269 271 +2
Lines 6823 7067 +244
======================================
+ Hits 6823 7067 +244
Continue to review full report at Codecov.
|
This adds an example for overwriting the location for the JS and CSS files for the docs and redoc endpoints.
Okay, coverage is good now. I'm using the documented method in my projects, but I'm not entirely sure if it's the easiest way to achieve the goal. |
Great! Thanks. 🚀 I updated it a bit with more instructions so that people can use it and test it right away. |
I have followed the steps in docs, and it really worked. However, it's not very friendly to the novice. I wonder whether these steps could be down with There is no internet where I am working, I tried to use fastapi and have found that the docs were not rendering. I had to import these JSs and CSSs extra. I hope fastapi could be more useful in an offline scenario. |
Agree completely with this. Would be very useful to have the Fastapi(offline=True) option. |
@youngquan , @EdgeSync that would mean that FastAPI would have to bundle all the JS and static files increasing a lot its size, that would also increase the complexity maintaining it as it would have to get a recent version of those assets at build time, etc. Given that, you could also create a third-party package that bundles those files and that can be installed, that could provide a FastAPI router with the docs endpoints, etc. 🤓 💯 |
@tiangolo Thanks for you time. A third-party package is a good choice, I will try to porvide a one soon or later if I have time. ✋😂 |
This adds an example for overwriting the location for the JS and CSS
files for the docs and redoc endpoints.