Description
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:
class File(Schema):
pass