Class SchemaCompatibilityValidator

  • All Implemented Interfaces:
    Validator<Void>

    public final class SchemaCompatibilityValidator
    extends Object
    implements Validator<Void>
    Validates previously released schemas for backward compatibility.

    The following configurations are available for this "compatibility" validator:

    • versionRange - maven version range to check compatibility against. (defaults to "[," + mavenProject.getVersion() + ')' )
    • maxNrOfVersionsToCheckForCompatibility = max number oof versions to check against. (defaults to 30)
    • maxNrOfDaysBackCheckForCompatibility - max released time to check against (defaults to 1 year)
    • deprecationRemoval - validates that a removed schema has been previously deprecated (false by default)
    • schemaArtifactClassifier - the classifier of the artifact that contains the schema files. defaults to null (the main jar)
    • schemaArtifactExtension - the extension of the artifact that contains the schema files. defaults to jar

    The following validations are performed:

    • 1) We check previously released schema for (reader to writer) and (writer to reader) compatibility with the current schema. Unless compatibility is not desired ( via "beta" schema annotation, or only partial compatibility is desired with "noNewToOldCompatibility" "noOldToNewCompatibility" schema annotations. (objects written with old schema don't need to be converted to new objects) or "noNewToOldCompatibility" if (objects written with new schema don't need to be converted to old schema objects)
    • 2) Schema deprecation and removal policy can also enabled with compatibiliy.deprecationRemoval = true, this will validate that a schema has been deprecated during the entire compatibility interval.
    Author:
    Zoltan Farkas