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
class VendorsCreateView(APIView):
"""
:param:
data = {
"vendor_name": "TestName",
"country": "Belarus",
"nda": "2020-12-12",
"parent": "",
"contacts": [{"contact_name": "Mrk", "phone": "2373823", "email": "[email protected]"},
{"contact_name": "Uio", "phone": "34567", "email": "[email protected]"}
]
}
:return: swagger name
"""
But I don't exactly get what I want
How do I add these parameters?
parameters
? I'm trying this way but nothing is displayed (both operation_description and operation_description work).@swagger_auto_schema(operation_description="partial_update description override", responses={404: 'slug not found'}, parameters="test")
– Retroflexion