You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Andriy Redko (JIRA)" <ji...@apache.org> on 2019/04/16 12:21:00 UTC
[jira] [Created] (GERONIMO-6722) The AnnotationProcessor should
inject media type instead of response code (when endpoint returns void or
Response)
Andriy Redko created GERONIMO-6722:
--------------------------------------
Summary: The AnnotationProcessor should inject media type instead of response code (when endpoint returns void or Response)
Key: GERONIMO-6722
URL: https://issues.apache.org/jira/browse/GERONIMO-6722
Project: Geronimo
Issue Type: Improvement
Security Level: public (Regular issues)
Reporter: Andriy Redko
Attachments: after.png, before.png, before.png, before.png
The Problem
----
Under certain conditions, for example when endpoint returns `void` or generic `Response`, the `AnnotationProcessor` does not properly inject the media type (which could be omitted or explicitly provided using `@Produces` JAX-RS annotation). Here is an example (using Swagger UI here as it is easier to spot the issue visually, the underlying JSON / YAML spec has the same data):
Whereas the expected media type should be compatible with [https://tools.ietf.org/html/rfc6838] ([https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#mediaTypes]). The expected behavior is to set media type to `*/*` (if not provided):
![after]([https://user-images.githubusercontent.com/509855/56208657-a4fff000-601f-11e9-8346-78c35468ca83.png])
Or pick the value from `@Produces` annotation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)