Repository navigation
Conversation
This change will generate JSON as required if the Java class contains the @xmlelement(required=true)
|
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). |
|
Great thanks, I have sent you an email with the CLA attached. |
|
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). |
|
Btw, thanks on CLA; I added it in repo. |
|
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. |
|
By the way, many thanks on the quick feedback. |
|
Perfect, will have a look at the other request(s) then |
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.