Skip to content

Commit 3b20917

Browse files
Copilotslachiewicz
andcommitted
Add comment explaining backward compatibility for enforceMandatoryElements parameter
Co-authored-by: slachiewicz <[email protected]>
1 parent ecf65ac commit 3b20917

File tree

1 file changed

+2
-0
lines changed
  • modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd

1 file changed

+2
-0
lines changed

modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd/XsdGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ private void generateXsd(Map<String, Object> parameters) throws IOException, Mod
8787

8888
// we assume parameters not null
8989
String xsdFileName = (String) parameters.get(ModelloParameterConstants.OUTPUT_XSD_FILE_NAME);
90+
// enforceMandatoryElements parameter is kept for backward compatibility but is no longer used.
91+
// Required fields are now always enforced based on field.isRequired() value.
9092
boolean enforceMandatoryElements =
9193
Boolean.parseBoolean((String) parameters.get(ModelloParameterConstants.XSD_ENFORCE_MANDATORY_ELEMENTS));
9294

0 commit comments

Comments
 (0)