Skip to content

Adding more error codes to the OpenAPI generator? #541

Answered by RobinTail
John4266 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @John4266 ,

Thank you for your feedback and ideas.
Unfortunately, OpenAPI generator can not figure out anything from the code of the implementation.
Instead it works in the explicit way based on the static declaration of the Endpoint's and ResultHandler's schemas.

About the errors and their codes.
Regardless the particular HTTP error code you throw inside the Endpoint's handler, the case will be handled over to the ResultHandler, the entity responsible for the consistency of responses.
In the ResultHandler you can define two schemas: for a positive response and for a negative one (in case of an error).
That means that in case of any error the actual response must comply the predefin…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@elmeister
Comment options

@RobinTail
Comment options

Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants