reta opened a new pull request #16: The AnnotationProcessor should inject media 
type instead of response code (when endpoint returns void or Response)
URL: https://github.com/apache/geronimo-openapi/pull/16
 
 
   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):
   
   
![before](https://user-images.githubusercontent.com/509855/56208381-02477180-601f-11e9-9c84-c402f835c464.png)
   
   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, which this PR is about.
   
   @rmannibucau mind please taking a look? Thanks!
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to