Skip to content

4.30.0 – Enable strict Type Info and support Annotations on Annotations

Compare
Choose a tag to compare
@CarstenWickner CarstenWickner released this 16 Apr 21:51
· 80 commits to main since this release

jsonschema-generator

Added

  • introduce configuration option for dependentRequired keyword
  • introduce new Option.STRICT_TYPE_INFO for implying the type of sub-schemas based on their contained attributes (note: implied "type" array always contains "null")
  • extend convenience methods for annotation lookup, to consider meta annotations (annotations on annotations)

Changed

  • enable allOf clean-up when any of the following keywords are contained: dependentRequired/dependentSchemas/prefixItems/unevaluatedItems/unevaluatedProperties
  • extend consideration of sub-schemas for allOf clean-up to more recognized keywords

jsonschema-module-jackson

Added

  • introduce new JacksonOption.INLINE_TRANSFORMED_SUBTYPES in order to avoid definitions with -1/-2 suffixes being generated in case of subtypes involving transformation (e.g., additional property, wrapping array, wrapping object)
    To be used with care, as a recursive reference can cause a StackOverflowError. In some scenarios, such an error can be avoided by also enabling the Option.DEFINITIONS_FOR_MEMBER_SUPERTYPES.

Fixed

  • use prefixItems instead of items keyword (from Draft 2019-09 onward) for tuples in WRAPPING_ARRAY subtype definitions

jsonschema-module-jakarta-validation

Added

  • support meta annotations (validation annotations on other annotations marked as @Constraint)

jsonschema-module-javax-validation

Added

  • support meta annotations (validation annotations on other annotations marked as @Constraint)