File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def __init__(
4444 self .extra = extra
4545 self .severity = severity
4646
47- def dict (self ) -> dict [str , int | str | dict [str , Any ] | None ]:
47+ def to_dict (self ) -> dict [str , int | str | dict [str , Any ] | None ]:
4848 return {
4949 "status" : self .status ,
5050 "type" : self .type ,
Original file line number Diff line number Diff line change 1010)
1111
1212responses : dict [int | str , dict [str , Any ]] = {
13- 400 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : BadRequestException ().dict ()}}},
13+ 400 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : BadRequestException ().to_dict ()}}},
1414 401 : {
1515 "model" : ErrorResponse ,
1616 "content" : {
2121 }
2222 },
2323 },
24- 403 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : MissingPrivilegeException ().dict ()}}},
25- 404 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : NotFoundException ().dict ()}}},
26- 422 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : ValidationException ().dict ()}}},
27- 500 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : ApplicationException ().dict ()}}},
24+ 403 : {
25+ "model" : ErrorResponse ,
26+ "content" : {"application/json" : {"example" : MissingPrivilegeException ().to_dict ()}},
27+ },
28+ 404 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : NotFoundException ().to_dict ()}}},
29+ 422 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : ValidationException ().to_dict ()}}},
30+ 500 : {"model" : ErrorResponse , "content" : {"application/json" : {"example" : ApplicationException ().to_dict ()}}},
2831}
You can’t perform that action at this time.
0 commit comments