Open
Description
Quarkus with smallrye-openapi can scan for @Provider ExceptionMappers and add them to endpoints that throw that exception.
@Provider
public class BundleRenderValidationExceptionMapper implements ExceptionMapper<BundleRenderValidationException> {
@Override
@APIResponse(
responseCode = "400",
description = "Validation of bundle failed",
content = @Content(mediaType = "application/problem+json", schema = @Schema(implementation = HttpProblem.class))
)
public Response toResponse(BundleRenderValidationException exception) {
return exception.getResponse();
}
}
Describe the solution you'd like
Would be nice to have those @APIResponse on the built-in ExceptionMappers provided by this extension, so they can be scanned, and the associated HTTP Errors to appear on the generated swagger-ui page