-
Notifications
You must be signed in to change notification settings - Fork 248
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
Create Schema view for endpoints #19
Comments
don't we already have that with https://github.com/tfranzel/drf-spectacular/blob/master/drf_spectacular/views.py#L16 ? Only difference is you have to setup the settings in SPECTACULAR_SETTINGS and just load SpectacularApiView in your urlpatterns. the caching mechanism that yasg provides is missing though. |
Wow! |
I suggest this be documented in the README or somewhere. There's also no documentation for the settings available in the package |
@aniforprez actually there is "documentation" for the settings: https://drf-spectacular.readthedocs.io/en/latest/settings.html you made a good point though. the readme could be better and some feature are not obvious from the get-go. i updated https://github.com/tfranzel/drf-spectacular#take-it-for-a-spin (schema view) and usage (for the settings). |
Very nice! I also recommend at some point adding some examples with swagger or redoc or both so there's immediately something they can visually look at rather than only getting the file which is hard to parse through visually Btw nice work! |
How exactly do I get it to serve the UI? I added it to my URLS but everytimg I go to the path it just downloads the schema? |
@vladdoster we do not serve the UI ourselves: swagger-ui: redoc: |
I had to take the implementation from the I added a swagger template and give it a schema |
i was not aware that serving swagger-ui through a template like redoc is that simple. in that case it might be not a bad idea to add that convenience. i'll have a look |
added swagger&redoc and updated the README with new instructions. let me know if that works for you. |
@tfranzel will give it a go tonight |
i used both redoc and swagger today. looks good to me. |
In drf_yasg I can get the schema and put it in endpoint automatically. Could you implement the same functionality?
Now I use the template and do it manually. I read the schema from the file and then use the swagger template
The text was updated successfully, but these errors were encountered: