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

Forbid remove missing flag #140

Conversation

luke-stead-sonocent
Copy link
Contributor

@luke-stead-sonocent luke-stead-sonocent commented Jan 31, 2022

When applying a remove operation, the target value must exist https://datatracker.ietf.org/doc/html/rfc6902#section-4.2.

This adds a compatibility flag which must be enabled to enforce this behaviour (to maintain compatibility by default with previous versions).

I've also fixed a couple of places where the JsonPatchApplicationException contained the wrong information.

@holograph
Copy link
Collaborator

LGTM, also love the fix, thanks! @vishwakarma I'm wondering if this shouldn't be the default behavior (breaking change + compatibility flag to regain "wrong" behavior), WDYT?

@holograph
Copy link
Collaborator

Ping @vishwakarma ?

@vishwakarma
Copy link
Member

Thank you @luke-stead-sonocent
Yes, @holograph looks good to me

@vishwakarma vishwakarma merged commit 6f73505 into flipkart-incubator:master Feb 14, 2022
@luke-stead-sonocent
Copy link
Contributor Author

Thank you both!

If you do decide you want to change the behaviour so it defaults on, I'm happy to submit a PR. Just let me know.
Would it also be possible to get a new release?

Thanks again!

@vishwakarma
Copy link
Member

Sure
We will do the new release by EOD tomorrow. I will update you here once the new version is released.

@vishwakarma
Copy link
Member

Hi @luke-stead-sonocent
I have released the new version 0.4.12,, should be in mvn central soon

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.

None yet

3 participants