All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
5.0.0 - 2026-02-07
- BREAKING CHANGE: minimum Java version
17 - BREAKING CHANGE: minimum Jackson version
3.x
- remove invalid
formatfor standardLocalDateTimestring definition
- introduce
JacksonSchemaModuleas alternative name to theJacksonModule(old class name kept for backward compatibility)
- support
@JacksonAnnotationsInsideannotated combo annotations also when looking for@JsonPropertyDescription
4.38.0 - 2025-03-24
- avoid duplicate entries in
requiredarray when performing final clean-ups
- respect
Option.NULLABLE_FIELDS_BY_DEFAULT/Option.NULLABLE_METHOD_RETURN_VALUES_BY_DEFAULTfor fields/methods without@Schemaannotation
4.37.0 - 2024-11-11
- new
Option.NULLABLE_ALWAYS_AS_ANYOFthat avoids the"null"type being included with other type values, e.g."type": ["object", "null"]
- apply property name overrides before triggering the ignore check (i.e., provide both the declared and overridden property names if there is one)
- update various (runtime/test/build-time) dependencies
- avoid exception when trying to collect supported enum values from raw
Enumtype (i.e., missing type parameter) - avoid exception when trying to find type with annotation when given type is
null
- support
@JacksonAnnotationsInsideannotated combo annotations
- avoid exception in subtype resolution, when targeting void method
- check for ignored properties excluded fields when a property name override makes it conflict with a non-conventional getter method
- support
<skipAbstractTypes>flag to exclude abstract types (not interfaces) - support
<skipInterfaces>flag to exclude interface types
4.36.0 - 2024-07-20
- new
Option.ACCEPT_SINGLE_VALUE_AS_ARRAYto support JacksonDeserializationFeatureof the same name, i.e., when an array type is declared, an instance of a single item should also be accepted by the schema
- consider
Booleanvalues as valid inconst/enum(i.e., no longer ignore them)
- populate
const/enumbased on@AssertTrue/@AssertFalse
4.35.0 - 2024-03-29
- check for custom definitions for
voidmethods (this may result in exceptions inside custom configuration if anullreturn type is not considered)
- if present, apply custom definition for
voidmethods
4.34.0 - 2024-03-14
- new
Option.DUPLICATE_MEMBER_ATTRIBUTE_CLEANUP_AT_THE_ENDdiscard duplicate elements from member sub-schemas
- new
Option.DUPLICATE_MEMBER_ATTRIBUTE_CLEANUP_AT_THE_ENDby default included in standardOptionPresets
@JsonUnwrappedannotation on inherited properties resulted in those properties being ignored instead of being unwrapped
4.33.1 - 2023-12-19
- Respect
@JsonPropertyOrderalso for properties derived from non-getter methods
4.33.0 - 2023-11-23
- new
Option.STANDARD_FORMATSincludes standard"format"values to some types considered byOption.ADDITIONAL_FIXED_TYPES - new
Option.INLINE_NULLABLE_SCHEMASavoids"<type>-nullable"entries in the"definitions"/"$defs"
- include new
Option.STANDARD_FORMATSinOptionPreset.PLAIN_JSONby default - extended parameters for creation of
FieldScope/MethodScopethrough theTypeContextto include type for which a schema is being generated
- when using
Option.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODSon a method where the second character of the derived field name is in uppercase, don't capitalise the first character
4.32.0 - 2023-10-27
- offer
SchemaGeneratorConfigBuilder.withObjectMapper(); mainly for use in custom modules in combination with the Maven plugin, where the constructor parameter cannot be used instead
- consider JavaBeans API specification in getter naming convention for field names with the second character being uppercase (e.g., a field
xIndexhas the gettergetxIndex()according to the specification) - allow for field names starting with
isto have a getter of the same name (e.g., a fieldisBoolmay have the getterisBool()) - the default
ObjectMapperinstance now includes the enabledSerializationFeature.INDENT_OUTPUT
- elevate nested properties to the parent type where members are annotated with
@JsonUnwrapped
NOTE: io.swagger.core.v3:swagger-annotations minimum version is now 2.2.5!
- consider
@Schema(additionalProperties = ...)attribute (only valuesTRUEandFALSE), when it is annotated on a type (not on a member) - consider
@Schema(requiredMode = REQUIRED)in addition to deprecated@Schema(required = true)
- avoid rounding error when taking over the value from
@Schema(multipleOf)
- support custom configuration
Modulebeing loaded from test classpath elements
- a generated schema is now serialized through the configuration's
ObjectMapperinstance (e.g., granting control over pretty printing or even generating YAML instead of JSON files)
4.31.1 - 2023-04-28
- avoid error being thrown in
allOfclean-up for invalid payload
4.31.0 - 2023-04-22
- extend
TypeContextcreation to support configuration of differing annotation inheritance by annotation type
- consider inheritance of validation constraint annotations
- when limiting scope to validation groups, also consider a specified group's supertypes
- consider inheritance of validation constraint annotations
- when limiting scope to validation groups, also consider a specified group's supertypes
4.30.0 - 2023-04-16
- introduce configuration option for
dependentRequiredkeyword - introduce new
Option.STRICT_TYPE_INFOfor implying thetypeof 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)
- enable
allOfclean-up when any of the following keywords are contained:dependentRequired/dependentSchemas/prefixItems/unevaluatedItems/unevaluatedProperties - extend consideration of sub-schemas for
allOfclean-up to more recognized keywords
- introduce new
JacksonOption.INLINE_TRANSFORMED_SUBTYPESin order to avoid definitions with-1/-2suffixes 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 aStackOverflowError. In some scenarios, such an error can be avoided by also enabling theOption.DEFINITIONS_FOR_MEMBER_SUPERTYPES.
- use
prefixItemsinstead ofitemskeyword (from Draft 2019-09 onward) for tuples inWRAPPING_ARRAYsubtype definitions
- support meta annotations (validation annotations on other annotations marked as
@Constraint)
- support meta annotations (validation annotations on other annotations marked as
@Constraint)
- new collection of examples (and implicit integration test) holding various examples (e.g., ones created in response to issues/discussions on GitHub)
4.29.0 - 2023-03-13
- include basic Java module descriptor (also for standard modules and maven plugin)
- add possibility to reset various types of configuration aspects after a schema was generated, to enable re-using a generator instance even if it is stateful (i.e., behaves differently on subsequent invocations)
- treat
java.time.Periodas{ "type": "string" }whenOption.ADDITIONAL_FIXED_TYPESis enabled - treat
java.time.LocalTimeandjava.time.OffsetTimeas{ "format": "time" }whenOption.ADDITIONAL_FIXED_TYPESis enabled (instead of "date-time") - update jackson dependency from version
2.13.4.20221013to2.14.2and replace usage of now deprecated methods
- consider
@Schema(ref = "...")attribute, when it is annotated on a type (and not just a member) except for the main type being targeted
- regression: filtering of considered classes for schema generation stopped working (after migration to
classgraphin 4.28.0)
4.28.0 - 2022-10-31
- enable look-up of annotations on a member's type parameter (e.g., a
Map's value type) - enable providing full custom schema definition to be included in
additionalPropertiesorpatternProperties - new function
TypeContext.getTypeWithAnnotation()for finding also super type of interface with certain type annotation - new function
TypeContext.getTypeAnnotationConsideringHierarchy()for searching type annotations also on super types and interfaces
- consider annotations on
Mapvalue types when usingOption.MAP_VALUES_AS_ADDITIONAL_PROPERTIES - enhanced schema clean-up at the end: consolidating
allOfwith distinctproperties(mostly relevant in jackson subtype resolution) - enhanced schema clean-up at the end: consolidating
allOfeven with some keywords being present with differing values - bump
slf4j-apidependency version from1.7.35to2.0.3 - bump
jackson-coredependency version from2.13.2to2.13.4 - bump
jackson-databinddependency version from2.13.2.2to2.13.4.2
- custom property definition containing only a definition reference/placeholder is being ignored
- new
JacksonOption.JSONIDENTITY_REFERENCE_ALWAYS_AS_IDto respect@JsonIdentityReference(alwaysAsId=true)annotations (with@JsonIdentityInfo)
- set
minProperties/maxPropertiesforMaptypes with@NotEmptyor@Sizeannotation
- bump
jakarta-validation-apicompile dependency version from3.0.0to3.0.2
- bump
swagger-annotationscompile dependency version from1.5.22to1.6.7
- bump
swagger-annotationscompile dependency version from2.1.2to2.2.3 - bump
swagger-corecompile dependency version from2.1.2to2.2.3
- use
classgraphdependency for classpath scanning determining entry points for schema generation
- allow non-public classes as entry points for schema generation
reflectionsdependency
4.27.0 - 2022-09-29
- new
Option.DEFINITIONS_FOR_MEMBER_SUPERTYPESto disable the transparent member subtype resolution, i.e., enable inclusion of a supertype schema - new
DefinitionType.ALWAYS_REFfor custom definitions, to produce centralised definition even if just referenced once
- under some circumstances, even after the general schema clean-up procedure there were unnecessary
allOfwrappers containing just a single entry
- enable moving subtype schema into
$defsand thereby reduce number of unnecessaryanyOfwrappers
- new
JacksonOption.ALWAYS_REF_SUBTYPES, to produce centralised definition for each resolved subtype (wrapper) even if just referenced once
- support
<classpath>parameter in order to also consider compile dependencies for the schema generation (and/or ignoring runtime dependencies) - support
<annotations>parameter in order to allow selecting classes to generate a schema for by the presence of certain type annotations
4.26.0 - 2022-08-22
- support
@JsonTypeInfo.defaultImplin combination withAs.PROPERTY, to no longer require the type property for the specified default subtype
- support
@Schema.anyOfand@Schema.oneOfon fields/methods
- support
<failIfNoClassesMatch>false</failIfNoClassesMatch>parameter, in order to continue build even if no class matches the defined pattern(s)
4.25.0 - 2022-06-24
- new
Option.FLATTENED_SUPPLIERSto unwrap the supplied type;Supplier<T>would thus be a typeT
- when resolving subtypes with a single other type, under some circumstances the type definition gets lost
- set default
ObjectMappernode factory toJsonNodeFactory.withExactBigDecimals(true)to avoid scientific notation for numbers
- new
Option.FLATTENED_SUPPLIERSis enabled by default in theOptionPreset.PLAIN_JSON - existing
Option.FLATTENED_OPTIONALSnow also considersOptionalcontainer items (e.g.,List<Optional<T>>).
4.24.3 - 2022-05-03
- ensure thread-safety when
Option.INLINE_ALL_SCHEMASis enabled
@JsonPropertyOrderis only considered on the targeted type, i.e., no attempt is made to respect a super type's property order- ensure thread-safety when loading bean descriptions
4.24.2 - 2022-04-04
- Actually publish BOM during release
- Use BOM as parent and introduce separate reactor build definition
4.24.1 - 2022-04-01
- Bump
jackson-databinddependency to2.13.2.2to avoid security vulnerability - Bump other
jacksondependencies to2.13.2
4.24.0 - 2022-04-01
- When looking-up a matching field or getter, only consider the declared property names and not any overrides
- Support for subtype resolution on properties with
JsonTypeInfo.Id.NONEoverride avoiding the default wrapping/modification
- Correctly consider
@JsonIgnorePropertiestargeting fields in super type
4.23.0 - 2022-03-13
- Introduce BOM (Bill of Materials) artifact, as option for importing Generator + Modules with matching versions
- Declare thread-safety, to avoid warnings at runtime
- Subtype resolution utilising
JsonTypeInfo.Id.NAMEnow considers@JsonSubTypes.value[].nameinstead of relying on@JsonTypeNamebeing present
- Subtype resolution utilising
JsonTypeInfo.As.PROPERTY/JsonTypeInfo.As.EXISTING_PROPERTYnow marks discriminator property as"required" - Subtype resolution utilising
JsonTypeInfo.As.WRAPPER_OBJECTnow marks discriminator value as"required"in wrapper object
4.22.0 - 2022-01-10
- Introduce support for
SchemaVersion.DRAFT_2020_12
- Replace
log4jtest dependency withlogback(still only test dependency)
- Enable usage under JDK11 (by adjusting usage of
reflections, in order to allow finding classes in dependencies/jar)
- Update
reflectionsruntime dependency from 0.9.12 to 0.10.2
4.21.0 - 2021-12-03
- prevent mixing of
type: nullwithconst/enumin order to avoid validation error whenconst/enumdoes not includenull
- default
ObjectMapperwhen none is given inSchemaGeneratorConfigBuilderconstructor now enablesJsonWriteFeature.WRITE_NUMBERS_AS_STRINGS
- Consider
@JsonProperty.valueoverride 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_METHODSto enable easy inclusion of annotated non-getter methods (typically in combination with the generalOption.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODSandOption.NONSTATIC_NONVOID_NONGETTER_METHODS)
- 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 - 2021-09-04
- Support for
nullvalues in collections/containers/arrays - New opt-in
Option.NULLABLE_ARRAY_ITEMS_ALLOWEDfor enabling the respective "NullableCheck" to be considered for items in a field's array value or a method's array return value
- Consider
@ArraySchema(schema = @Schema(nullable = true))if the newOption.NULLABLE_ARRAY_ITEMS_ALLOWEDis enabled
4.19.0 - 2021-09-02
- Support
readOnlyandwriteOnlykeywords
- subtype resolution now also respects
@JsonTypeInfoannotation on common interface (and not just common super class)
- Mark a subschema as
readOnlyorwriteOnlybased on a field or method's@Schema.accessMode
4.18.0 - 2021-03-21
- Increase of Jackson dependency version to 2.12.1
- Include
java.net.URIin handling ofOption.ADDITIONAL_FIXED_TYPES.
- New
JacksonOption.RESPECT_JSONPROPERTY_REQUIREDto set a field as "required" based on@JsonPropertyannotations
- Replace deprecated Jackson API usage, resulting in MINIMUM Jackson version 2.12.0
4.17.0 - 2020-12-24
- Initial implementation (initial features are equivalent to
jsonschema-module-javax-validation)
- Support for new
jakarta.validationmodule
4.16.0 - 2020-09-25
- New
Option.ENUM_KEYWORD_FOR_SINGLE_VALUESto produce"enum": ["A"]instead of"const": "A"if there is only one allowed value.
4.15.1 - 2020-09-15
- 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 - 2020-09-15
- New
Option.EXTRA_OPEN_API_FORMAT_VALUESto support automatic inclusion of"format"values for certain simple/fixed types
- Support picking up annotations on a (top-level) generic
Optionalparameter (e.g.Optional<@Size(min=2) String>)
4.14.0 - 2020-08-02
- Entries in
SchemaKeywordenum for"not","minProperties","maxProperties"(without further handling)
- Make use of new
SchemaKeywordenum entries instead of hard-coded strings (no change in behaviour)
- 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>
- 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>
4.13.0 - 2020-06-27
- Possibility to configure
SchemaDefinitionNamingStrategyviaconfigBuilder.forTypesInGeneral().withDefinitionNamingStrategy() - Explicit
DefaultSchemaDefinitionNamingStrategythat is being applied if no otherSchemaDefinitionNamingStrategyis being configured - New
Option.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODSto allow deriving fields from getter methods
- Determine names/keys of subschemas in
definitions/$defsthrough configurableSchemaDefinitionNamingStrategy - Default property sort order to consider property name when differentiating fields and methods (now that methods may have field-like names)
- For multiple definitions for the same type, they might be unnecessarily treated as having conflicting definition names requiring resolution
- Obsolete
TypeContext.getSchemaDefinitionName()
- Initial implementation of
Swagger2Modulefor deriving schema attributes from OpenAPI@Schemaannotations.
- Support for new
jsonschema-module-swagger-2
4.12.2 - 2020-06-10
- Performance: Cache looked-up getter in
FieldScope.findGetter() - Performance: Cache looked-up field in
MethodScope.findGetterField()
- Collecting all classes from a given
<packageName>even if it contains classes whose super types are not included
4.12.1 - 2020-05-28
- Setting correct contextual classpath for class/package look-up via reflections
4.12.0 - 2020-05-10
- New
SchemaGeneratorGeneralConfigPart.withPropertySorter()exposing the sorting logic of an object schema's properties
- New
JacksonOption.RESPECT_JSONPROPERTY_ORDERto sort properties in an object's schema based on@JsonPropertyOrderannotations - New
JacksonOption.IGNORE_PROPERTY_NAMING_STRATEGYto skip the adjustment of property names based on@JsonNamingannotations
- Consider
@JsonNamingannotations to alter the names of contained fields according to the specifiedPropertyNamingStrategy
4.11.1 - 2020-04-30
- Maven plugin is unable to resolve runtime dependencies (#95)
4.11.0 - 2020-04-28
- New
Option.MAP_VALUES_AS_ADDITIONAL_PROPERTIESto includeadditionalPropertieswith a schema for eachMap<K, V>'s value typeV - New
Option.DEFINITION_FOR_MAIN_SCHEMAto allow moving main/target schema intodefinitions/$defs - New
Option.PLAIN_DEFINITION_KEYSto ensure keys indefinitions/$defsadhere to the reduced set of allowed characters expected by OpenAPI - New
SchemaGenerator.buildMultipleSchemaDefinitions()allowing to generate JSON Schema elements (e.g. for building an OpenAPI description)
- Skip fields for which
isFakeContainerItemScope()returnstrue, when fulfilling value collection forOption.VALUES_FROM_CONSTANT_FIELDS - Treat
Byte/byteas"type": "string"and not as"type": "integer"by default
- Initial implementation
- Support schema generation from one or multiple classes
- Support schema generation for all classes in one or multiple packages
- Allow configuration of target schema version
- Allow configuration of
OptionPreset(also allowing forNONE) - Allow configuration of individual
Options to be enabled/disabled - Allow configuration of standard modules by name, with possible list of module options
- Allow configuration of custom modules by class name
4.10.0 - 2020-04-12
- Official support for Draft 6 (via new
SchemaVersion.DRAFT_6) - New
Option.INLINE_ALL_SCHEMASto enforce nodefinitions/$defsto be produced (throwing exception if there is at least one circular reference) - Offering also
SchemaGenerationContext.createStandardDefinition(FieldScope, CustomPropertyDefinitionProvider) - Offering also
SchemaGenerationContext.createStandardDefinition(MethodScope, CustomPropertyDefinitionProvider) - Alternative
SchemaGenerationConfigPart.withInstanceAttributeOverride(InstanceAttributeOverrideV2)with access toSchemaGenerationContext
- Enhance
Option.ALLOF_CLEANUP_AT_THE_ENDto also reduceallOfif multiple parts have the same attributes but with equal values (except foriftags) - Providing access to the
SchemaGenerationContextwhen invokingTypeAttributeOverrideV2(potentially BREAKING change in case of lambda usage)
SchemaGenerationConfigPart.withInstanceAttributeOverride(InstanceAttributeOverride)without access toSchemaGenerationContextInstanceAttributeOverrideinterface without access toSchemaGenerationContextTypeAttributeOverrideinterface with only access toSchemaGenerationConfigand notSchemaGenerationContext- Ambiguous
SchemaGeneratorConfigBuilder.with(CustomDefinitionProviderV2) - Ambiguous and outdated
SchemaGeneratorConfigBuilder.with(TypeAttributeOverride)
- New
JacksonOption.FLATTENED_ENUMS_FROM_JSONPROPERTYto allow enum serialization based on each constant's@JsonPropertyvalue
4.9.0 - 2020-04-02
- Convenience constructors on
SchemaGeneratorConfigBuilderwithout explicitObjectMapperinstance being expected - Convenience methods on
FieldScope/MethodScopefor accessing (first level) container item annotations:getContainerItemAnnotation()andgetContainerItemAnnotationConsideringFieldAndGetter()
MethodScope.getAnnotation()now also considers annotations directly on return type (when no matching annotation was found on the method itself)
- Attributes set in custom property definitions should not be overridden by other configurations (except for explicit attribute overrides)
- Consider (first level) container item annotations (e.g.
List<@Size(min = 3) String>)
4.8.1 - 2020-03-31
- Include parent
pom.xmlwhen publishing release
- Error when encountering container/collection property
4.8.0 - 2020-03-30
- Support for custom definitions in the scope of a particular field/method via
SchemaGeneratorConfigPart.withCustomDefinitionProvider() - Ability to opt-out of normal "attribute collection" for custom definitions through new
CustomDefinitionconstructor parameters
- Consolidate
anyOfentries that only contain ananyOfthemselves into the outeranyOf(mostly relevant for nullable entries with subtypes) - If a field/method is of a container type: apply the per-property configurations on its items; with
MemberScope.isFakeContainerItemScope()flag
- Should consider per-type attributes even on inline custom definitions
- Use less strict
anyOfinstead ofoneOfwhen indicating that a sub-schema may be of"type": "null"
com.fasterxml.jackson.core:jackson-core/jackson-databindfrom2.10.2to2.10.3- Remove dependencies to
log4jimplementation (onlyslf4j-apiremains)
- Look-up subtypes according to
@JsonTypeInfoand@JsonSubTypesannotations per-type or overridden per-property:- Considering
@JsonTypeInfo.includewith valuesAs.PROPERTY,As.EXISTING_PROPERTY,As.WRAPPER_ARRAY,As.WRAPPER_OBJECT - Considering
@JsonTypeInfo.usewith valuesId.NAME(from@JsonTypeName) andId.CLASS
- Considering
- New
JacksonOption.SKIP_SUBTYPE_LOOKUPfor disabling the new look-up of subtypes (i.e. to regain previous behaviour) if required - New
JacksonOption.IGNORE_TYPE_INFO_TRANSFORMfor disabling addition of extra property or wrapping in an array/object according to@JsonTypeInfo
4.7.0 - 2020-03-20
- Support for multiple target type overrides at once per field/method
- Support for "$id" property via
SchemaGeneratorGeneralConfigPart.withIdResolver() - Support for "$anchor" property via
SchemaGeneratorGeneralConfigPart.withAnchorResolver()
- Allow for multiple types with the same name (but different package) instead of picking one at random
- Allow for multiple definitions for the same type (e.g. in case of a custom definition wrapping the standard definition)
- Configuration option for single target type override
- Look-up of single target type override from configuration
- Ignore/exclude properties marked with
@JsonBackReference
4.6.0 - 2020-03-15
- Explicit indication of targeted JSON Schema version (for now: Draft 7 or 2019-09)
- Support for renamed keywords between Draft versions through new
SchemaKeywordenum (replacing staticSchemaConstantsinterface) - Support for
$refalongside other attributes (from Draft 2019-09 onwards) thereby reducing number ofallOfelements - Introduce
Option.ALLOF_CLEANUP_AT_THE_END(also included in all standardOptionPresets) for toggling-off this improvement if not desired
- Reduce number of
allOfelements in generated schema when contained schema parts are distinct (and in case of Draft 7: don't contain$ref)
SchemaConstantsinterface containing staticStringconstants for tag names/values (in favour of version-awareSchemaKeywordenum)- Internal
AttributeCollectorAPI without generation context as parameter SchemaGeneratorConfigBuilderconstructors without explicit JSON Schema version indication
com.fasterxml.jackson.core:jackson-core/jackson-databindfrom2.10.0to2.10.2com.fasterxml:classmatefrom1.5.0to1.5.2- Optional:
org.slf4j:slf4j-apifrom1.7.26to1.7.30 - Optional:
org.apache.logging.log4j:log4j-api/log4j-core/log4j-slf4j-implfrom2.11.2to2.13.0
4.5.0 - 2020-03-05
- Expose
SchemaGenerationContext.createDefinitionReference()to custom definitions to enable circular references within - Expose
SchemaGenerationContext.createStandardDefinitionReference()to custom definitions to enable circular references within
- New
JacksonOption.FLATTENED_ENUMS_FROM_JSONVALUEfor considering@JsonValueannotations on enums, similar toOption.FLATTENED_ENUMS
4.4.0 - 2020-03-02
- Enable declaration of subtypes through
withSubtypeResolver(SubtypeResolver)onforTypesInGeneral()(#24)
- Move custom definitions and type attribute overrides into
forTypesInGeneral()(while preserving delegate setters on config builder)
4.3.0 - 2020-02-28
- Limit collected type attributes by declared "type" (prior to any
TypeAttributeOverride!)
- Not declare any "type" for
Object.classby default
4.2.0 - 2020-02-27
- Support for "additionalProperties" property via
SchemaGeneratorTypeConfigPart.withAdditionalPropertiesResolver() - Support for "patternProperties" property via
SchemaGeneratorTypeConfigPart.withPatternPropertiesResolver() - Introduce new
Option.FORBIDDEN_ADDITIONAL_PROPERTIES_BY_DEFAULTfor more convenient usage - Offer
TypeScope.getTypeParameterFor()andTypeContext.getTypeParameterFor()convenience methods
- Possible exceptions in case of encountered collections without specific type parameters
4.1.0 - 2020-02-18
- New
Option.FLATTENED_ENUMS_FROM_TOSTRING, usingtoString()instead ofname()as perOption.FLATTENED_ENUMS
4.0.2 - 2020-01-30
- Avoid further characters in definition keys that are not URI-compatible (#19)
4.0.1 - 2020-01-29
- Avoid white-spaces in definition keys
4.0.0 - 2020-01-03
- Extended API for defining context independent collection of schema attributes (for array/collection items that are not directly under a member)
- BREAKING CHANGE:
TypeAttributeOverride's second parameter is now the newTypeScopewrapper instead of just aResolvedType
- Look-up descriptions from
@JsonClassDescriptionvia newforTypesInGeneral()API
- Look-up titles and descriptions from
@ApiModelvia newforTypesInGeneral()API
3.5.0 - 2020-01-01
CustomDefinitionProviderV2with access toSchemaGenerationContext, e.g. to allow continuing normal schema generation for nested properties
CustomDefinitionProviderreceiving only theTypeContextas parameter
- Possible
IllegalAccesswhen loading constant values should just be ignored
3.4.1 - 2019-12-30
- Collected attributes should also be applied to container types (Issue #15)
3.4.0 - 2019-11-29
- Introduce convenience function
MemberScope.getAnnotationConsideringFieldAndGetter(Class)
- Optionally provide a field/method's "title" as per
@ApiModel(value = ...) - Allow to ignore the general
@ApiModel(description = ...)when populating a field/method's "description"
3.3.0 - 2019-10-25
- Increase dependency version for jackson-databind (and jackson-core) to resolve security alerts.
- Avoid unnecessary quotes when representing constant string values (due to changed behaviour in jackson >=2.10.0)
3.2.0 – 2019-09-01
- In
SchemaGenerator.generateSchema(Type)also allow passing type parameters viaSchemaGenerator.generateSchema(Type, Type...). - Support for "required" property via
SchemaGeneratorConfigPart.withRequiredCheck()(PR #5). - Support for "default" property via
SchemaGeneratorConfigPart.withDefaultResolver()(PR #5). - Support for "pattern" property via
SchemaGeneratorConfigPart.withStringPatternResolver()(Issue #9).
- Option for treating not-nullable fields as "required" in their parent type
- Option for treating not-nullable methods as "required" in their parent type
- Indicate a string's "format" to be "email" if
@Emailis present - Option for returning "idn-email" instead of "email" as "format" if
@Emailis present - Indicate a string's "pattern" according to regular expressions on
@Patternor@Email(ignoring specified flags) - Option for enabling the inclusion of "pattern" expressions (they are excluded by default)
- Allow filtering applicable annotations by their declared validation
groupsviaJavaxValidationModule.forValidationGroups()
3.1.0 – 2019-06-18
- Use
Class.getTypeName()instead ofClass.getName()inTypeContext.getFullTypeDescription().
- In
TypeContext.resolve(Type)also allow passing type parameters viaTypeContext.resolve(Type, Type...).
NullPointerExceptiononMemberScoperepresentingvoidmethods.IndexOutOfBoundsExceptionwhen determining container item type of rawCollection.
3.0.0 – 2019-06-10
- Simplify configuration API to be based on
FieldScope/MethodScoperespectively. - Consolidate some utility functions into
FieldScope/MethodScope. - Consolidate logic for determining whether a type is a container into
TypeContext. - Consolidate naming logic for schema "definitions" into
TypeContext. - Add
TypeContextargument toCustomDefinitionProviderinterface. - Remove
SchemaGeneratorConfigargument fromInstanceAttributeOverrideinterface.
- Allow for sub-typing of
FieldScope/MethodScopeandTypeContext(in case offered configuration options are insufficient).
- Remove support for
Option.GETTER_ATTRIBUTES_FOR_FIELDSandOption.FIELD_ATTRIBUTES_FOR_GETTERS, rather let configurations/modules decide individually and avoid potential endless loop.
- Populate "description" as per
@JsonPropertyDescription(falling-back on@JsonClassDescription). - Apply alternative field names defined in
@JsonPropertyannotations. - Ignore fields that are deemed to be ignored according to various
jackson-annotations(e.g.@JsonIgnore,@JsonIgnoreType,@JsonIgnoreProperties) or are otherwise supposed to be excluded.
- Consider the same validation annotations on a getter method also for its field
- Consider the same validation annotations on a field also for its getter method
- Optionally override a field's property name with
@ApiModelProperty(name = ...) - Optionally ignore a field/method if
@ApiModelProperty(hidden = true) - Provide a field/method's "description" as per
@ApiModelProperty(value = ...)or@ApiModel(description = ...) - Indicate a number's (field/method) "minimum" (inclusive) according to
@ApiModelProperty(allowableValues = "range[...") - Indicate a number's (field/method) "exclusiveMinimum" according to
@ApiModelProperty(allowableValues = "range(...") - Indicate a number's (field/method) "maximum" (inclusive) according to
@ApiModelProperty(allowableValues = "range...]") - Indicate a number's (field/method) "exclusiveMaximum" according to
@ApiModelProperty(allowableValues = "range...)") - Indicate a field/method's "const"/"enum" as
@ApiModelProperty(allowableValues = ...)(if it is not a numeric range declaration) - Consider the
@ApiModelPropertyannotation on a getter method also for its field - Consider the
@ApiModelPropertyannotation on a field also for its getter method
2.0.0 – 2019-06-07
- Removed type resolution and replaced it with
org.fasterxml:classmatedependency. - Adjusting configuration API to use
classmatereferences for types/fields/methods.
- Ignore complex constant values that may not be properly representable as JSON.
1.0.2 - 2019-05-30
- Increase dependency version for jackson-databind to resolve security alert.
1.0.1 - 2019-05-19
- Specified "test" scope for dependency on jsonassert.
1.0.0 - 2019-05-18
- Reflection-based JSON Schema Generator.
- Support of generics and the resolution of their type boundaries in the respective scope.
- Inclusion of any fields and public methods in a generated JSON Schema.
- Ability to define a fixed JSON Schema per type (e.g. for determining how to represent primitive types).
- Ability to customise various aspects of schema generation and assigned attributes.
- Concept of modules (e.g. for sub-libraries) to define a single entry-point for applying individual configurations.
- Standard enum of common configuration options.
- Specific handling of enums (two alternatives via standard options).
- Specific handling of optionals (two alternatives via standard options).
- Pre-defined sets of standard options to cover different use-cases and simplify library usage.
- Indicate a field/method to be nullable if
@Nullis present - Indicate a field/method to be not nullable if
@NotNull,@NotEmptyor@NotBlankis present - Indicate an array's "minItems" according to
@Sizeor@NotEmpty - Indicate an array's "maxItems" according to
@Size - Indicate a string's "minLength" according to
@Size,@NotEmptyor@NotBlank - Indicate a string's "maxLength" according to
@Size - Indicate a number's "minimum" (inclusive) according to
@Min,@DecimalMinor@PositiveOrZero - Indicate a number's "exclusiveMinimum" according to
@DecimalMinor@Positive - Indicate a number's "maximum" (inclusive) according to
@Max,@DecimalMaxor@NegativeOrZero - Indicate a number's "exclusiveMaximum" according to
@DecimalMaxor@Negative