Changelog model-validations

Filter x

2.0.2 (N/A)

Fixed

  • Fixed model loading if MAVEN_LOCAL_REPOSITORY is not defined. (Only applicable when running the jar directly or in jenkins)

2.0.1 (N/A)

Added

  • Added ModelValidationProperties class to retrieve the version at runtime (used by expanders-maven-plugin)

Fixed

  • Fixed rule names in reports
  • Fixed classloading when run from expanders-maven-plugin

2.0.0 (N/A)

Changed

  • Validation Rules are now provided by a validationGroups.xml data-resource file.
  • Rules are represented by ValidationRuleComposites
  • Rules are implemented to use Composites, not Trees
  • To add a new rule, create a class that implements ValidatableRule and add @ValidationRule and @ValidationGroup:
    @ValidationRule(
      element = "elements::Application",
      severity = ValidationSeverity.PR_ERROR,
      reason = "Base dependencies should be added for an application.",
      description = "Base dependencies should be added for an application."
    )
    @ValidationGroup("Missing Defaults")
    public class ApplicationBaseDependenciesRule implements ValidatableRule<ApplicationComposite> {}
    
  • Conditional Rules need to implement the ConditionalRule interface
  • To create a new validation resource project. Add the following to the <plugins> section in your pom.xml:
    <plugin>
      <groupId>net.democritus.maven.plugins</groupId>
      <artifactId>expanders-maven-plugin</artifactId>
      <version>${expanders-maven-plugin.version}</version>
      <executions>
        <execution>
          <goals>
            <goal>expansionResource</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.10.0</version>
      <configuration>
        <showWarnings>true</showWarnings>
        <annotationProcessors>
          <!-- Gathers all ValidationRule classes and generates data/validations/validationGroups.xml -->
          <annotationProcessor>
            net.democritus.validations.compilation.ValidationAnnotationProcessor
          </annotationProcessor>
        </annotationProcessors>
      </configuration>
    </plugin>
    

    and add a _data.xml file pointing towards the generated validationGroups.xml:

    <dataResources>
      <dataResource>
        <path>data/validations/validationGroups.xml</path>
        <elementTypeCanonicalName>net.democritus.validations.ValidationGroup</elementTypeCanonicalName>
      </dataResource>
    </dataResources>
    

1.1.4 (N/A)

Fixed

  • Changed check on field ‘modifiedAt’ to field ‘lastModifiedAt’
  • Changed check on field ‘modifiedBy’ to field ‘lastModifiedBy’

1.1.3 (N/A)

Added

  • for backwards compatibility attempt to autodetect expansion settings if conf/expansionSettings.xml does not exist

1.1.2 (N/A)

Fixed

  • do not error on valid underscores

1.1.1 (N/A)

Changed

  • Changed FieldNamingRule to be suggestion only, and moved reserved name validation into “error” FieldReservedNamingRule

1.1.0 (N/A)

Added

  • Added standard type naming rules for c4a

Changed

  • Disabled/removed a bunch of outdated and unclear rules, and fixed some edge conditions

Fixed

  • Fixed rule guard crash aborting the entire validation

1.0.2 (N/A)

Added

  • DataElementHasInfoFieldRule now also checks explicitly defined info projection

Removed

  • Removed DataElementHasDefaultFinderRule as it is no longer applicable for nsx-default-stack:2021.7.1+
  • Removed FinderPairNamingRule as fieldOperatorPair.name attribute is irrelevant
  • Removed FinderNamingRule as it was way too noisy with little actual value

1.0.1 (N/A)

  • Fixed html & junit reports when writing to the current directory
  • Fixed FinderNamingRule not accepting claim finders
  • Fixed FieldEnteredAtModifiedAtTypeRule not accepting DateLong

1.0.0 (N/A)

  • Initial release
    • 43 rules migrated from NS Pharo Modeler
    • per-project exclusion configuration
    • integration with Jenkins