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
What to do:
Add responses for endpoints, an example:
Or, legacy style:
You may add schemas/models for this.
Expected behavior:
In docs endpoint, should preview the schema output