Giter Club home page Giter Club logo

Comments (3)

leonardo-speranzon avatar leonardo-speranzon commented on June 16, 2024 1

I gave only a look and i think this is caused by the navigate function that return only a single resource instead of a list of them. I've forked the project and in these days i will try some solutions.

from scim-patch.

thomaspoignant avatar thomaspoignant commented on June 16, 2024

Hey @leonardo-speranzon this is a good catch, and I am not sure how to solve it.
Have you look at the code yourself? Would you be open for a contribution on this?

I will try to look at it as soon as I have a bit more time, but I don't have a lot of time for now unfortunately.

from scim-patch.

leonardo-speranzon avatar leonardo-speranzon commented on June 16, 2024

I also found out that in the case of patch {op: "replace", value: {newProperty: "post"}, path: "emails"} on resource like this

{
    ...
    emails: [
        { value: "[email protected]", primary: true, newProperty: "pre"},
        { value: "[email protected]", primary: false, newProperty: "pre" },
    ]
    ...
}

act like an add and simply push a new element {newProperty: "post"} to the emails array.

Instead the "equivalent" patch {op: "replace", value: "post", path: "emails.newProperty"} add the newProperty property directly to the array (JS magic lol).

I think the correct behavior for both of them is to change the newProperty property in all of the existing emails.
The RFC say:

   o  If the target location is a multi-valued attribute and no filter
      is specified, the attribute and all values are replaced.

I should open a related issue or i can do it in the same PR?

from scim-patch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.