Specify endpoint request media type for the generated OpenAPI json.
When not specified the default MediaType is application/json, so we specify this on controllers or methods where the request consumes a different media type.
@Path("/customers")
@Consumes(MediaType.TEXT_PLAIN)
class CustomerController {
...
}
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueSpecify request media type.When not specified the default MediaType is application/json
- Default:
"application/json"
-