Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

Copy link
Copy link
@tovmeod

Description

@tovmeod
Issue body actions

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
Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.