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

This change will generate JSON as required if the Java class contains the @XMLElement(required=true). #6

Closed
wants to merge 1 commit into from

Conversation

rawlingsj
Copy link

To add context, we are generating our Java classes from an XSD. The Java classes contain the @xmlelement(required=true) annotation if it is required. This change will add the required attribute when generating the JSON schema from the Java class.

This change will generate JSON as required if the Java class contains the @xmlelement(required=true)
@cowtowncoder
Copy link
Member

Sounds good!

One clerical thing I need before merging this in is to get a CLA (https://github.com/FasterXML/jackson-databind/blob/DEV/CLA/contributor-agreement.pdf) filled, unless I already asked for a copy (I don't think so, but just in case we have one, let me know).
It's a standard one-pager, and just needed because many corporations want to know that there is a process to track contributions (specifically, Eclipse foundation verifies these diligently).
So if possible, could you fill it in (most devs just list themselves, no company, for what it's worth), and scan and send (or attach it)? (can add to patch, or email me, 'tsaloranta' at gmail).
Apologies for the hassle, but this is a one-time thing to get through.

@rawlingsj
Copy link
Author

Great thanks, I have sent you an email with the CLA attached.

@cowtowncoder
Copy link
Member

Hmmh. There is one problem here -- core project is not to depend on anything JAXB, including annotations, as that would add a new dependency to the project. I'll have to think about the best way to handle this: ideally the whole JSON Schema generation would be a module and not implemented by core package, but it's bit late for that (nor is obvious how this could even be done).

@cowtowncoder
Copy link
Member

Btw, thanks on CLA; I added it in repo.

@rawlingsj rawlingsj closed this Apr 4, 2012
@rawlingsj
Copy link
Author

Ok, I think we have found an alternative solution using Annotation Introspector. This pull request can be closed and I will create a new fork for jackson-databind and jackson-module-jaxb-annotations.

@rawlingsj
Copy link
Author

By the way, many thanks on the quick feedback.

@cowtowncoder
Copy link
Member

Perfect, will have a look at the other request(s) then

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