You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flask-openapi3 generates a default ValidationError class from Pydantic. Of course you can change it, you can change the response body model of each API, and you can change the global response body model.
classModel422(BaseModel):
success: boolmsg: str# global response body modelapp=OpenAPI(__name__, responses={422:Model422})
# the response body model of each API@app.post("/", responses={200: UnionRespResp2,422:Model422})defbook(body: Resp):
...
In flask-openapi3, I can only specify the item of 422 response array, but I want the response of 422 is a object.
The text was updated successfully, but these errors were encountered: