Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

No Response class #8

@tovmeod

Description

@tovmeod

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions