OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 599 forks source link

OpenAPI explorer UI not showing list of request body media types correctly #12579

Open nadiramra opened 4 years ago

nadiramra commented 4 years ago

When using openapi-3.1, If a method has following defined:

@javax.ws.rs.Consumes({"application/xml, application/json"})
@javax.ws.rs.Produces({"application/xml, application/json"})

The explorer does not give you the option to specify which content type to use. It shows one possible value, “application/xml, application/json” instead of separating the string into two values.

I know that it can be specified another way, such as:

@javax.ws.rs.Consumes({"application/xml", "application/json"})
@javax.ws.rs.Produces({"application/xml", "application/json"})

But according to the standards, the initial rendition is valid form and must be handled. It should be noted that apiDiscovery-1.0 handles the situation correctly.

Currently running IBM Liberty 20.0.0.5 with JRE 8.

Azquelt commented 2 years ago

This has been fixed upstream for mpOpenApi-2.0 in smallrye/smallrye-open-api#989. As soon as they do a release we'll update our dependency so the fix gets into liberty.