Visitar URL original
This change will generate JSON as required if the Java class contains the @XMLElement(required=true). by rawlingsj · Pull Request #6 · FasterXML/jackson-databind · GitHub
Skip to content

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

Closed
rawlingsj wants to merge 1 commit into
FasterXML:masterfrom
rawlingsj:master
Closed

rawlingsj wants to merge 1 commit into
FasterXML:masterfrom
rawlingsj:master

Conversation

@rawlingsj

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Author

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

@cowtowncoder

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@rawlingsj rawlingsj closed this Apr 4, 2012
@rawlingsj

Copy link
Copy Markdown
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
Copy Markdown
Author

By the way, many thanks on the quick feedback.

@cowtowncoder

Copy link
Copy Markdown
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