We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instead of having to define something like:
@get( '/foo/{id}', responses={ 404: { # or exc_response(404) 'description': 'Execution not found', 'model': ExceptionResponse, 'content': { 'application/json': { 'example': ExceptionResponse.example(404), }, }, }, 500: {...}, .. }, ) def get_foo(self, id: str) -> list[OperationResponse]: ...
Accept a new argument throws or raises:
throws
raises
@get('/foo/{id}', raises=[404, 500, ...]) def get_foo(self, id: str) -> list[OperationResponse]: ...
We can then use the already existing exc_response function to generate the examples.
exc_response
Note
The responses argument should be kept and then combined with raises|throws if provided
responses
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Instead of having to define something like:
Accept a new argument
throws
orraises
:We can then use the already existing
exc_response
function to generate the examples.Note
The
responses
argument should be kept and then combined withraises
|throws
if providedThe text was updated successfully, but these errors were encountered: