jskov / openapi-jaxrs-client

An OpenAPI JAX-RS client code generator
Apache License 2.0
1 stars 4 forks source link

Allow control of default @Produces/@Consumes value #570

Closed jskov-jyskebank-dk closed 6 months ago

jskov-jyskebank-dk commented 6 months ago

At present, if a method is void, no @Produces will be added.

But this will make the MP client (as per spec) use Accept: application/json.

Not all services are happy with this and explode with status 500.

Allow specifying a default to be used for void methods, such as "*/*". This will allow handling any type (e.g. text error messages).

This should probably be the default (would match what curl asks for).

For symmetry, allow option to control @Consumes for types having no body (although I cannot see it making a difference)

(Lynge)