drf-yasg Questions
6
Previously I was using drf-yasg but want to update to use OpenAPI 3. I am trying to switch over to drf-spectacular. Following the instruction, I ran pip install drf-spectacular, I've removed all re...
Personality asked 26/10, 2020 at 22:30
4
Solved
I am not able to find any support for making a schema for the file upload API.
The Swagger UI must have a button allowing a tester to upload a file for testing purposes. I am using firebase as a da...
2
Solved
I've setup DRF-YASG but am unable to figure out how to configure it to show Views that require Authentication.
Below is the configuration.
schema_view = get_schema_view(
openapi.Info(
title="S...
Hip asked 8/2, 2018 at 14:25
3
I am implementing swagger using drf-yasg for django rest framework APIs in my project.
I follow the quick start section of drf-yasg. When I hit /swagger gets AssertionError: duplicate Parameters fo...
Sphygmo asked 3/7, 2020 at 15:4
1
Solved
I am trying to make upload file input from swagger (with drf-yasg), but when I use MultiPartParser class it gives me the below error:
drf_yasg.errors.SwaggerGenerationError: FileField is supported ...
Courser asked 2/3, 2022 at 8:28
2
Solved
I use the drf-yasg library to generate project documentation for the developer front-ends. I can't figure out how to add my data to the fields Parameters and Responses
For example, this class
cla...
Retroflexion asked 17/3, 2020 at 9:54
2
Solved
I am using Django with Django-Drf to write a restful BE.
I am also using drf-yasg to generate the swagger scheme for my service.
Unfortunately, drf-yasg does not yet support OpenApi3, and it does...
Heliolatry asked 30/1, 2020 at 17:40
2
Solved
How can I add example responses -- (openapi doc) to my swagger doc using drf-yasg package?
Schismatic asked 28/9, 2020 at 20:37
4
Solved
I know in a traditional swagger YAML file, we can define the schemes with:
schemes:
- http
- https
//OR
schemes: [http, https]
However, how can I do the same thing with auto-generated swagger ...
Cott asked 8/4, 2019 at 7:42
3
I use drf-yasg to generate swagger docs for my Django REST API. I have a couple of endpoints, items/ with GET, POST and DELETE methods; and items/<uuid:itemID> with DELETE method only. Howeve...
3
I am getting a blank page with just a "Django Login" link when trying to access generated swagger docs. I am using drf_yasg library to render swagger documentation.
Code to generate swagger docs ...
2
Solved
I'd like to document input schemas and output schemas for GET request with drf-yasg.
It doesn't seem to be easy.
@swagger_auto_schema(
manual_parameters=[
openapi.Parameter('cart_id', in_=open...
Potpie asked 21/9, 2019 at 3:23
1
I'm using drf-yasg to document my APIs. However, I'm running into a problem
I've a serializer in which one of the fields is set to write_only=True.
class XYZSerializer(serializers.ModelSerialize...
Servomechanism asked 11/7, 2018 at 12:39
1
class Templates(APIView):
parser_classes = (FormParser,)
@swagger_auto_schema(manual_parameters=[
openapi.Parameter('title', in_=openapi.IN_FORM, description='作品标题', type=openapi.TYPE_STRING, r...
Latia asked 16/7, 2020 at 8:46
1
Solved
I decided to make a micro-services gateway in Python's FastApi framework. My authorization service is written in Django and there are already generated by drf-yasg package swagger docs. I was think...
2
Solved
I'm using drf_yasg for swagger documentation. When I publish my DRF app behind AWS Application Load Balancer and set listener to listen on 443 HTTPS and redirect to my EC2 on which DRF is running, ...
Gwen asked 19/9, 2019 at 14:39
1
Solved
How to customize drf-yasg schema in ClassBased django views?
I tried this part of code, but the generated swagger doesn't respect the change.
class CustomView(CreateAPIView):
permission_classes = ...
2
Solved
Swagger documentation says you can do that:
https://swagger.io/docs/specification/grouping-operations-with-tags/
But unfortunately drf-yasg not implementing this feature:
https://github.com/axnsan1...
Vashtee asked 25/6, 2020 at 9:40
1
I am using django, django drf and drf-yasg to generate write my BE and generate documentation.
I have a model called User and a serializer for a user:
class UserSerializer(serializers.ModelSerial...
Pteridophyte asked 23/1, 2020 at 19:6
2
Solved
The DRF docs mention this:
Note that when using viewsets the basic docstring is used for all
generated views. To provide descriptions for each view, such as for
the the list and retrieve views...
Yearly asked 5/8, 2019 at 23:40
1
Solved
The project uses a swagger.
There is the following code.
@swagger_auto_schema(
manual_parameters=[
Parameter('download', IN_QUERY,
'Set `Content-Disposition=attachment` to make browser to downl...
Leishaleishmania asked 8/10, 2019 at 11:56
1
Solved
I am migrating my Django 1.11.7 to 2.x. One of the problems is django-rest-swagger, it is now deprecated. And drf-yasg should now be the way for the API documentation and creation. I need to do it ...
Lezlie asked 12/9, 2019 at 0:17
1
Solved
I'm trying to customize my api documentation buuild with yasg.
First off, I would like to determine the naming of my own sections, and what endpoints should be included in this section. It seems t...
Pitchman asked 5/3, 2019 at 16:26
1
Solved
the drf_yasg swagger generator doesnt take TYPE_ARRAY as a valid parameter type.
the implementation is as follows
from drf_yasg import openapi
param1 = openapi.Parameter('param_name',
in_=openapi...
Spinney asked 27/11, 2018 at 4:41
1
Solved
x_param = openapi.Parameter('x', in_=openapi.IN_FORM, description='srring',
type=openapi.TYPE_STRING)
y_param = openapi.Parameter('y', in_=openapi.IN_FORM, description='string',
type=openapi.TYP...
Polycotyledon asked 19/6, 2018 at 12:59
1 Next >
© 2022 - 2024 — McMap. All rights reserved.