drf-spectacular
drf-spectacular copied to clipboard
Yaml schema gets downloaded instead of shown inline
Describe the bug If I put SpectacularAPIView the view downloads the yaml file instead of showing it inline
To Reproduce urls.py
urlpatterns = [
...
path("docs/api/swagger.yaml", SpectacularAPIView.as_view(), name="schema"),
...
]
open at localhost:8000/docs/api/swagger.yaml, file gets downloaded instead of shown inside browser Tested on chrome Version 128.0.6613.84 (Official Build) (64-bit) Firefox 128.0.3 (64-bit)
Expected behavior Documentation yaml file is opened in browser instead of downloaded into the system
This might be bug in the browsers, because when I use curl -I, the Content-Disposition: inline header is present in the response