-
-
Couldn't load subscription status.
- Fork 281
[WIP] Add uniqueItems action
#870
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
base: main
Are you sure you want to change the base?
Conversation
11e4568 to
5c434e6
Compare
|
Without much thought I would use |
I think it would be best to use deep equality to ensure it operates the same as JSON schema. However, I also believe there will be users who prefer shallow equality. To accommodate those users, how about using deep equality by default but allowing a customizable function in the form of
As for the issue handling, I think we should first agree on and implement the functionality above, and then look into how we can handle the issue format afterwards. |
5c434e6 to
282a63d
Compare
uniqueItems action
|
How about we provide a |
|
I think that's a good idea. I'll try to implement |
|
Would you return an issue for every duplicated item or just one for the entire array? This decision can affect the implementation. |
|
Since |
|
I've committed it for now, but feel free to share any other opinions. If it's finalized, I'll start working on updating the documentation. |
|
Thank you very much! I will try to give you feedback at the end of next week as I have to focus on other things in the next few days. |
|
I just want to let you know that I am focusing on our v1 release first before reviewing this PR. |
f41426c to
d713dfe
Compare
I have some questions.
When I have an array like
[5, 6, 5, 5], would it be better to call_addIssueonce and add all the duplicate issues related to5into the path array at once, or to call_addIssuemultiple times to add them individually?"It seems that
uniqueItemsin JSON compares objects through deep equality. Should I follow JSON's behavior, or would simple comparison (===) be sufficient?Resolves #866