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.15k stars 590 forks source link

JSON Patch and JSON Merge Patch #22870

Open varoliver opened 1 year ago

varoliver commented 1 year ago

Describe the use case that you want to enable: Enable/Integrate PatchMethodFilter to support JSON Patch and JSON Merge Patch as described in https://docs.jboss.org/resteasy/docs/4.6.0.Final/userguide/html/JAX-RS_2.1_additions.html#d4e1781

It seems that the PatchMethodFilter of RESTEasy is not part of OpenLiberty: https://github.com/resteasy/resteasy/blob/main/resteasy-core/src/main/java/org/jboss/resteasy/plugins/providers/AbstractPatchMethodFilter.java

https://github.com/resteasy/Resteasy/blob/main/providers/jackson2/src/main/java/org/jboss/resteasy/plugins/providers/jackson/PatchMethodFilter.java

jim-krueger commented 1 year ago

We will investigate this.
Note: What is being requested here is function added by RESTEasy to their Jackson support. This may not be as straight forward for Open Liberty as we use JSONB, not Jackson and therefore do not include RESTEasy's Jackson in our product.

varoliver commented 1 year ago

Hi @jim-krueger seems like the provider is already available since 4.7.0 but not part of OpenLiberty - found this: https://issues.redhat.com/browse/RESTEASY-2849?focusedCommentId=19213381&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-19213381

and this: https://github.com/resteasy/resteasy/blob/main/providers/json-p-ee7/src/main/java/org/jboss/resteasy/plugins/providers/jsonp/JsonpPatchMethodFilter.java

Regards

jim-krueger commented 1 year ago

Thanks @varoliver, however the JsonpPatchMethodFilter you mention above is delivered as part of RESTEasy's resteasy-jackson2-provider support that Open Liberty does not include. So I asssume that similar function would need to be added to Open Liberty's JSONB support.