-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
π‘ featNew feature or requestNew feature or request
Description
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:
@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.
Note
The responses argument should be kept and then combined with raises|throws if provided
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
π‘ featNew feature or requestNew feature or request