Open
Description
Is your feature request related to a problem? Please describe your use case.
I'm developing a open api application, and the validation error message should shown in user interface.
I suggest that We could modify the error message as I could
Describe the solution you'd like
Like this:
@validate(query=MyCustomQueryParams,message_writer=MyCustomWriter)
async def query_demo(request):
return text("test")
async def MyCustomWriter (error_model):
return 'extract the error detail from error_model and custom message to the user'
Additional context
error_model should be a list-dict, which contains the all encountered error
- the parameter name
- the error value
- the error type (wrong value type, missing required field,etc)
Metadata
Metadata
Assignees
Labels
No labels