apache / directory-scimple

Apache Directory - SCIMple
https://directory.apache.org/scimple/
Apache License 2.0
62 stars 37 forks source link

Dysfunctional PatchRequest Deserialization in Quarkus Example #557

Open kuebler opened 3 months ago

kuebler commented 3 months ago

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.

bdemers commented 3 months ago

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.

kuebler commented 3 months ago

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.