Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full path support for the patch operations #442

Merged

Conversation

mateuszkumpf
Copy link
Contributor

I would like to propose a new solution to generate a path for Patch operations.

Currently, when a property is selected using a lambda to create a path for a Patch operation, the last property is selected and only the path is created based on that property. (Example: x => x.NestedObject.Property1 creates for us path /property1).

The proposed solution creates a full path for the Patch operation taking into account all the properties that have been selected in the lambda. (Example: x => x.NestedObject.Property1 creates for us path /nestedObject/property1)

@IEvangelist
Copy link
Owner

Doesn't this break existing functionality?

@mateuszkumpf
Copy link
Contributor Author

mateuszkumpf commented May 31, 2024

Doesn't this break existing functionality?

@IEvangelist In my opinion, it shouldn't. If anyone has used Patch so far, they may have noticed quite quickly that only from the last member of the lambda a path is created. For these people, nothing will change.

@mateuszkumpf mateuszkumpf requested a review from IEvangelist May 31, 2024 15:23
@mateuszkumpf mateuszkumpf requested a review from IEvangelist June 5, 2024 19:46
Copy link
Contributor Author

@mateuszkumpf mateuszkumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@mateuszkumpf mateuszkumpf force-pushed the feature/support-full-path branch from 8c5dca8 to 3ec1483 Compare June 29, 2024 10:55
@IEvangelist
Copy link
Owner

@all-contributors please add @mateuszkumpf for code and tests

Copy link
Contributor

@IEvangelist

I've put up a pull request to add @mateuszkumpf! 🎉

@IEvangelist IEvangelist merged commit c222136 into IEvangelist:main Jul 1, 2024
5 checks passed
@Qualizorg Qualizorg mentioned this pull request Aug 16, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants