Skip to content

backend(views): add response schemas for views #83

Description

@r0liveir

What to do:

Add responses for endpoints, an example:

@app.get("/user/{user_id}")
def get_user(user_id: int) -> UserOutput:

Or, legacy style:

@app.post("/users/", response_model=UserOutput)
def create_user(user_data: dict):

You may add schemas/models for this.

Expected behavior:
In docs endpoint, should preview the schema output

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackendBack of the end

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions