Commit ecf65ac
Fix required attribute not being respected in XSD generation
- Modified XsdGenerator to respect field.isRequired() directly instead of depending on enforceMandatoryElements parameter
- Removed required=true from type field in modello.mdo since type is optional when association is present
- Required fields now correctly omit minOccurs="0" in generated XSD, making them mandatory
Co-authored-by: slachiewicz <[email protected]>1 parent e299fc0 commit ecf65ac
File tree
2 files changed
+1
-4
lines changed- modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd
- src/main/mdo
2 files changed
+1
-4
lines changedmodello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd/XsdGenerator.java
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
| 235 | + | |
238 | 236 | | |
239 | 237 | | |
240 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
676 | 675 | | |
677 | 676 | | |
678 | 677 | | |
| |||
0 commit comments