openapi-typescript-codegen
openapi-typescript-codegen copied to clipboard
error types
Describe the solution you'd like A clear and concise description of what you want to happen. Ideally with a small example of the proposed changes.
hello, would it be possible to also have specific types for errors? I mean it can be even a generated throw call that also generates typings for stuff like:
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationProblemDetails"
}
}
}
}
could be as "simple" as:
throws ValidationProblemDetailsError
throws ApiError
I would love to see support for this! It's makes error handling be easier, without it we kinda have to hack around to get those specific error types.