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 optional explicit JsonSubTypes repeated names check #3500

Closed
ancane opened this issue May 29, 2022 · 9 comments
Closed

Add optional explicit JsonSubTypes repeated names check #3500

ancane opened this issue May 29, 2022 · 9 comments
Milestone

Comments

@ancane
Copy link
Contributor

ancane commented May 29, 2022

Hi) Got a project at hand, using tons of JsonSubTypes with logical short names defined for the brevity of serialized data. Usually, it's pretty hard to manually check there are no repeated name/names aliases defined when adding a new subtype. I would like to explicitly state and validate there are no repeated subtype names defined. Please, consider related PR for this matter and suggest the best way to do this if PR is not good enough. I will also PR the annotations repo with the flag to enable the check.(FasterXML/jackson-annotations#204)
Also please advise, how to add this to the 2.12 branch if that's at all possible. Cheers!

@ancane ancane added the to-evaluate Issue that has been received but not yet evaluated label May 29, 2022
ancane added a commit to ancane/jackson-databind that referenced this issue May 29, 2022
@cowtowncoder
Copy link
Member

Ok, sorry for the slow follow up. I hope to look into this in near future. PR is a good way to go!

@cowtowncoder
Copy link
Member

Hi @ancane! Ok, this took way longer than I hope for but now I am finally looking at this. I think this makes sense: I do have one request wrt annotation property naming, but otherwise it makes sense.

But aside from that change (I'll add a comment in annotations PR), I need one other thing, CLA. It's here:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

and only needs to be sent once (works for all future contributions too); so if you had sent it earlier (I don't think so but I could have missed) that'd be fine.
The usual way is to print the doc, fill & sign, scan/photo, email to info at fasterxml dot com.
Once I get that I can merge these PRs and it'll all make it into upcoming 2.14 release.

Thank you again for the contribution!

ancane added a commit to ancane/jackson-databind that referenced this issue Aug 1, 2022
@ancane
Copy link
Contributor Author

ancane commented Aug 1, 2022

@cowtowncoder Think I've done the code. Next will sort out the CLA. Ta!

@ancane
Copy link
Contributor Author

ancane commented Aug 2, 2022

Sent a photo of the signed agreement to info mail as requested.

@cowtowncoder
Copy link
Member

Thanks! CLA received, I will proceed with merging.

@cowtowncoder
Copy link
Member

Merged the annotation patch, looking into #3501 here next.

@cowtowncoder cowtowncoder changed the title FEATURE: explicit JsonSubTypes repeated names check Add optional explicit JsonSubTypes repeated names check Aug 3, 2022
@cowtowncoder cowtowncoder added 2.14 and removed to-evaluate Issue that has been received but not yet evaluated labels Aug 3, 2022
@cowtowncoder cowtowncoder added this to the 2.14.0 milestone Aug 3, 2022
@cowtowncoder
Copy link
Member

Merged for inclusion in 2.14.0: thank you again, @ancane !

@ancane
Copy link
Contributor Author

ancane commented Aug 3, 2022

Cool! Thanks ever so much @cowtowncoder, it was my pleasure.

@cowtowncoder
Copy link
Member

Thank you @ancane and apologies for slow handling. But happy to get it done!

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

No branches or pull requests

2 participants