…refix
Extensions to the json-schema specification, like the "javaType" keyword property, can trip up json schema validator tools that don't recognize the keywords and thus report errors. By convention, though, validator tools will ignore any keywords prefixed with "x-". Thus, any keyword extension to the specification should really be a keyword that begins with "x-".
In order to support "x-" prefixed versions of existing keyword extensions, while maintaining backward compatibility, the following change are made:
Change all references to node properties that are extensions to the specification such that they use helper methods (`ExtensionsHelper.java`) that will work on both the original extension name (e.g. "javaType") and also that name prefixed with 'x-' (e.g. `x-javaType`). The following keywords are affected:
- `extends`, `javaType`, `existingJavaType`, `extendsJavaClass`, `javaInterfaces`, `javaEnumNames`, `javaEnums`, `javaJsonView`, `javaName`, `customPattern`, `customTimezone`, `customDatePattern`, `customTimePattern`, `customDateTimePattern`, `excludedFromEqualsAndHashCode`
Update all message text references to any of the above to use "x-".
Duplicate existing test schema files & directories that exercise the above keywords and either duplicate the unit tests that use them (to use the new schemas) or parameterize the test suites that use them to operate on both the original test schema and the new "x-" variant.
Further test update details:
Due to a mix of tests in TypeIT.java, break out the tests from TypeIT.java that didn't use the common schema with many types to a separate test class, TypeMiscIT.java. (and the same for YamlTypeIT.java). This allowed parameterizing TypeIT.java without running some tests twice on the same input.
Update some other test schemas that use extension keywords (but don't explicitly validate them) to use the new "x-" variant as this should be the preferred variant for reasons stated above.
While here, add test variants of each of the above 'custom*Patterns' that use the x-customPattern alias (no tests had existed for the 'customPattern' alias)