I created a rest-api with openapi-codegen. As a parameter there is an object that contains two ENUMs.
e.g.
public enum DocumentType {
FOTO_ID("PHOTO_ID");
[...]
}
If i send a request with a DocumentType other than "PHOTO_ID" I get the following Response
Cannot construct instance of `[...]`, problem: Unexpected value '[...]'
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 2, column: 21] (through reference chain: [...])
which is correct, but i would like to catch it and send my own ErrorResponse.
I could not find a way to do that.