Releases: victools/jsonschema-generator
Releases · victools/jsonschema-generator
4.22.0 – Draft 2020-12 and JDK11 Maven Plugin Fix
jsonschema-generator
Added
- Introduce support for
SchemaVersion.DRAFT_2020_12
Dependency Update
- Replace
log4j
test dependency withlogback
(still only test dependency)
jsonschema-maven-plugin
Fixed
- Enable usage under JDK11 (by adjusting usage of
reflections
, in order to allow finding classes in dependencies/jar)
Dependency Update
- Update
reflections
runtime dependency from 0.9.12 to 0.10.2
4.21.0 – Jackson method support and fix for nullable enums
jsonschema-generator
Fixed
- prevent mixing of
type: null
withconst
/enum
in order to avoid validation error whenconst
/enum
does not includenull
Changed
- default
ObjectMapper
when none is given inSchemaGeneratorConfigBuilder
constructor now enablesJsonWriteFeature.WRITE_NUMBERS_AS_STRINGS
jsonschema-module-jackson
Added
- Consider
@JsonProperty.value
override for methods - Look-up
"description"
for methods (if included) based on@JsonPropertyDescription
- Consider
@JsonProperty(access = Access.READ_ONLY)
when determining whether a field/method should be marked asreadOnly
- Consider
@JsonProperty(access = Access.WRITE_ONLY)
when determining whether a field/method should be marked aswriteOnly
- Introduce
JacksonOption.INCLUDE_ONLY_JSONPROPERTY_ANNOTATED_METHODS
to enable easy inclusion of annotated non-getter methods (typically in combination with the generalOption.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODS
andOption.NONSTATIC_NONVOID_NONGETTER_METHODS
)
Changed
- Ignore getter methods when their associated field is being ignored (according to various Jackson annotations)
- Ignore methods when they or their associated field are marked as
@JsonBackReference
4.20.0 – support for nullable array items
jsonschema-generator
Added
- Support for
null
values in collections/containers/arrays - New opt-in
Option.NULLABLE_ARRAY_ITEMS_ALLOWED
for enabling the respective "NullableCheck" to be considered for items in a field's array value or a method' array return value
jsonschema-module-swagger-2
Added
- Consider
@ArraySchema(schema = @Schema(nullable = true))
if the newOption.NULLABLE_ARRAY_ITEMS_ALLOWED
is enabled
4.19.0 – readOnly/writeOnly support
jsonschema-generator
Added
- Support
readOnly
andwriteOnly
keywords
jsonschema-module-jackson
Changed
- subtype resolution now also respects
@JsonTypeInfo
annotation on common interface (and not just common super class)
jsonschema-module-swagger-2
Added
- Mark a subschema as
readOnly
orwriteOnly
based on a field or method's@Schema.accessMode
4.18.0 – Jackson Version Upgrade
jsonschema-generator
Changed
- Increase of Jackson dependency version to 2.12.1
- Include
java.net.URI
in handling ofOption.ADDITIONAL_FIXED_TYPES
.
jsonschema-module-jackson
Added
- New
JacksonOption.RESPECT_JSONPROPERTY_REQUIRED
to set a field as "required" based on@JsonProperty
annotations
Changed
- Replace deprecated Jackson API usage, resulting in MINIMUM Jackson version 2.12.0
4.17.0 – New Jakarta Validation Module
jsonschema-module-jakarta-validation
Added
- Initial implementation (initial features are equivalent to
jsonschema-module-javax-validation
)
jsonschema-maven-plugin
Added
- Support for new
jakarta.validation
module
4.16.0 – New Option for replacing "const" with "enum"
jsonschema-generator
Added
- New
Option.ENUM_KEYWORD_FOR_SINGLE_VALUES
to produce"enum": ["A"]
instead of"const": "A"
if there is only one allowed value.
4.15.1 – Fix for Option.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODS
jsonschema-generator
Fixed
- Missing parentheses on void argument-free methods that don't start with "get" or "is" when enabling
Option.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODS
4.15.0 – Optional Annotations & OpenAPI formats
jsonschema-generator
Added
- New
Option.EXTRA_OPEN_API_FORMAT_VALUES
to support automatic inclusion of"format"
values for certain simple/fixed types
jsonschema-module-javax-validation
Added
- Support picking up annotations on a (top-level) generic
Optional
parameter (e.g.Optional<@Size(min=2) String>
)
4.14.0 – Maven Plugin Glob Support
jsonschema-generator
Added
- Entries in
SchemaKeyword
enum for"not"
,"minProperties"
,"maxProperties"
(without further handling)
jsonschema-module-swagger-2
Changed
- Make use of new
SchemaKeyword
enum entries instead of hard-coded strings (no change in behaviour)
jsonschema-maven-plugin
Added
- Support for including classes via glob patterns in
<classNames>
and<packageNames>
(in addition to absolute paths) - Support for excluding classes via absolute paths or glob patterns in new
<excludeClassNames>
Fixed
- Explicitly include dependencies of supported generator modules that they expect to be provided
- Avoid generating the same schema multiple times if there are overlaps between entries in
<classNames>
and/or<packageNames>