-
Environment:
I cannot create an endpoint that is returning an int (or any other native type)
gives error TypeError: <class 'int'> is invalid I could leave the responses out, but this makes the generated doc incomplete |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
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 |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
That does indeed solve my question |
Beta Was this translation helpful? Give feedback.
Try to do something like this
other examples: https://github.com/luolingchun/flask-openapi3/blob/master/tests/test_restapi.py#L69-L70