Is your feature request related to a problem? Please describe.
Currently, some operations return a mix of application/json or application/hal+json based on the result (for example 2xx vs 4xx). While this is totally reasonable, it creates difficulties in generated API clients. When there's a mix of types, the client sends application/json which throws HttpMediaTypeNotAcceptableException since it was expecting application/hal+json.
Describe the solution you'd like
If an operation, like /v2/projects to get all projects, returns application/hal+json please indicate that all other return codes like 403might also return application/hal+json so that generated clients only work with that single content type.
Describe alternatives you've considered
Patching the OpenAPI spec myself. I had just gotten to the point of using the new public API spec unchanged :-)
Is your feature request related to a problem? Please describe. Currently, some operations return a mix of
application/json
orapplication/hal+json
based on the result (for example2xx
vs4xx
). While this is totally reasonable, it creates difficulties in generated API clients. When there's a mix of types, the client sendsapplication/json
which throwsHttpMediaTypeNotAcceptableException
since it was expectingapplication/hal+json
.Describe the solution you'd like If an operation, like
/v2/projects
to get all projects, returnsapplication/hal+json
please indicate that all other return codes like403
might also returnapplication/hal+json
so that generated clients only work with that single content type.Describe alternatives you've considered Patching the OpenAPI spec myself. I had just gotten to the point of using the new public API spec unchanged :-)
Additional context