Undeclared '@Produces' / '@Consumes' MIME types for '@Path'

Last modified: 03 December 2024

Reports endpoint methods without the @Produces or @Consumes annotations.

Quarkus analyzes these annotations and restricts the number of JAX-RS providers included in the native executable to the minimum required by the application. This reduces the size of the native executable.

Annotate methods or the whole class with @Produces or @Consumes (if supported by the HTTP method) and specify the target MIME types.