Skip to content

4.32.0 – Recognize more Getters and Support for @JsonUnwrapped

Compare
Choose a tag to compare
@CarstenWickner CarstenWickner released this 27 Oct 20:05
· 61 commits to main since this release

jsonschema-generator

Added

  • offer SchemaGeneratorConfigBuilder.withObjectMapper(); mainly for use in custom modules in combination with the Maven plugin, where the constructor parameter cannot be used instead

Changed

  • consider JavaBeans API specification in getter naming convention for field names with the second character being uppercase (e.g., a field xIndex has the getter getxIndex() according to the specification)
  • allow for field names starting with is to have a getter of the same name (e.g., a field isBool may have the getter isBool())
  • the default ObjectMapper instance now includes the enabled SerializationFeature.INDENT_OUTPUT

jsonschema-module-jackson

Added

  • elevate nested properties to the parent type where members are annotated with @JsonUnwrapped

jsonschema-module-swagger-2

NOTE: io.swagger.core.v3:swagger-annotations minimum version is now 2.2.5!

Added

  • consider @Schema(additionalProperties = ...) attribute (only values TRUE and FALSE), when it is annotated on a type (not on a member)
  • consider @Schema(requiredMode = REQUIRED) in addition to deprecated @Schema(required = true)

Fixed

  • avoid rounding error when taking over the value from @Schema(multipleOf)

jsonschema-maven-plugin

Added

  • support custom configuration Module being loaded from test classpath elements

Changed

  • a generated schema is now serialized through the configuration's ObjectMapper instance (e.g., granting control over pretty printing or even generating YAML instead of JSON files)