You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.
I'm not sure if this is the right project, I'm just trying to generate a swagger file for my DRF project
In any case I believe that somewhere we need to define a Response class so I can have the responses entries in swagger generated instead of having to add manually.
I'm not sure if this is the right project, I'm just trying to generate a swagger file for my DRF project
In any case I believe that somewhere we need to define a Response class so I can have the responses entries in swagger generated instead of having to add manually.
I wrote an initial version looking here (http://swagger.io/specification/#response-object-58), I can prepare a PR if relevant:
class Response:
def init(self, status, description=None, schema=None, headers=None, examples=None):
"""
todo create headers object (http://swagger.io/specification/#headersObject) and
examples object (http://swagger.io/specification/#exampleObject)
:type status: int or str
:type description: str
:type schema: coreschema.schemas.Schema
"""
self.status = status
self.description = description
self.schema = schema
self.headers = headers
self.examples = examples
btw, can we have an empty file type for now just so I can generate the proper field type for swagger:
The text was updated successfully, but these errors were encountered: