Skip to content

Response cannot be a simple type like int #51

Answered by dvaerum
cropr asked this question in Q&A
Discussion options

You must be logged in to vote

Try to do something like this

class ResponseWithInt(BaseModel):
    __root__: int

other examples: https://github.com/luolingchun/flask-openapi3/blob/master/tests/test_restapi.py#L69-L70

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by luolingchun

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #30 on January 13, 2023 03:23.