Currently, there is a mix of returned content types between application/json, application/json+nxentity and application/json+esentity.
As there is one content type returned, it should always be the standard application/json.
=> application/json must be the first one in the @Produces annotation.
Not returning the standard one breaks some functionality such as the JSON rendering in browsers (they download a file instead of displaying the JSON).
Moreover, there is the application/json+nxrequest content type which is used only when POSTing on the automation endpoint. As the endpoint also accepts raw application/json there is no need for that one. We can't just remove it as old code (such has clients, drive, ...) so it will be deprecated.
Finally, application/json+esentity is never used and not useful, it will be removed and the JsonESDocumentWriter will be moved to nuxeo-platform-elasticsearch-core module as it does not belong to nuxeo-automation-io.
- is related to
-
BDE-127 Export current document JSON should return JSON content-type, not HTML
- Resolved
-
BDE-128 Export current document JSON should provide better syntax colouring
- Resolved
- is required by
-
NXJS-171 Remove the use of 'application/json+nxrequest' content type
- Resolved
-
JAVACLIENT-168 Rely only on 'application/json' content type
- Resolved
-
NETCLIENT-14 Rely only on 'application/json' content type
- Resolved
-
NXPY-72 Rely only on 'application/json' content type
- Resolved
-
PHPCLIENT-19 Rely only on 'application/json' content type
- Resolved