directory-scimple icon indicating copy to clipboard operation
directory-scimple copied to clipboard

Dysfunctional PatchRequest Deserialization in Quarkus Example

Open kuebler opened this issue 1 year ago • 2 comments

It looks like the deserialization of PatchRequest payloads in the quarkus sample doesn't work properly. Here's the request we're sending:

PATCH http://<host>:<port>/v2/Users/<id>

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "replace",
      "path": "userName",
      "value": "newName"
    }
  ]
}

However, debugging the patch endpoint reveals that the list of patch operations isn't populated:

patch-request-deserialzation

This does, however, work well with the Spring Boot sample, so it looks like this is something specific to the Quarkus sample app. Any help with that would be greatly appreciated - no idea what's causing this.

kuebler avatar Apr 08 '24 09:04 kuebler

I wasn't able to reproduce this. Which Java, OS, etc are you using? (I cannot see why that would cause an issue, but I making guesses)

Also make sure your request sets the content-type to application/scim+json That said, if you are using a different content-type, and info is getting lost let us know.

bdemers avatar Apr 12 '24 17:04 bdemers

Running Java 21 on macOS sonoma. Just checked, using content-type application/scim+json does actually make a difference, with that, the Quarkus example does deserialize the PatchOperations properly, with application/json, however, I'm getting the result I mentioned above. The Spring Boot example, however, doesn't seem to care whether application/json or application/scim+json is used - deserialization works in both cases.

kuebler avatar Apr 12 '24 18:04 kuebler