Sane and flexible OpenAPI 3.0 schema generation for Django REST framework.
Questions tagged [drf-spectacular]
98 questions
0
votes
1 answer
How to disable expanding of schema for single schema in swagger?
I'm using Django with DRF-Spectacular and swagger-ui.
I'm interested in how can I disable expanding of Schema (only a single schema related to tokens) so it's only showing endpoint.

Andrew
- 1,507
- 1
- 22
- 42
0
votes
1 answer
What are the options to filter Enums values from Swagger documentation?
I'm using Django with drf-spectacular package to generate Swagger documentation. I was wondering is there any better approach to filter out some values from the Enum section inside Schema. Right now I've accomplished this using custom hook…

Andrew
- 1,507
- 1
- 22
- 42
0
votes
1 answer
drf-spectacular's extend_schema not working
I recently migrated from drf-yasg to drf-spectacular on my project, but the @extend_schema decorator does not seems to add any information to my generated schema :
views.py
class SearchView(GenericViewSet):
serializer_class =…

qcoumes
- 505
- 4
- 13
0
votes
1 answer
Pass Swagger-UI url in drf-spectacular settings
I have a project written in Django 2.x. I want to add automatic documentation to it using drf-spectacular. I'm using drf-spectacular=0.15.1 at the moment.
I'm running my project in Docker, and the build context for my api container is set as the…

Iulia Mihet
- 650
- 1
- 10
- 34
0
votes
2 answers
Is there any way to overwrite the default description of generated drf api schema?
When use drf-yasg or drf-spectacular,
is there any way to overwrite the default description shown in the sample picture
or does drf-yasg or drf-spectacular provide other language support for the default description?
I tried i18n support of…

Truemoonfans
- 25
- 1
- 6
-1
votes
2 answers
Different descriptions for methods in custom @action for routing
I did custom routable method with @action decorator for DRF ViewSet.
This rout implements multiple methods (GET, POST, DELETE). Is possible to have different descriptions for each method, or even to create different @extend_schema definitions for…

Uros
- 61
- 5
-2
votes
1 answer
How to remove auto generate Enum field schema in drf-spectacular
How to remove auto generate Enum field schema in drf-spectacular
here my SPECTACULAR_SETTINGS:
SPECTACULAR_SETTINGS = {
'TITLE': 'Python Base Code',
'VERSION': '1.0.0',
'SERVE_INCLUDE_SCHEMA': False,
'SCHEMA_PATH_PREFIX_TRIM': True,
…

Deepak Kumar
- 72
- 5