Class SchemaGeneratorConfigImpl
- java.lang.Object
-
- com.github.victools.jsonschema.generator.impl.SchemaGeneratorConfigImpl
-
- All Implemented Interfaces:
SchemaGeneratorConfig,StatefulConfig
public class SchemaGeneratorConfigImpl extends Object implements SchemaGeneratorConfig
Default implementation of a schema generator's configuration.
-
-
Constructor Summary
Constructors Constructor Description SchemaGeneratorConfigImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaVersion schemaVersion, Set<Option> enabledOptions, SchemaGeneratorGeneralConfigPart typesInGeneralConfigPart, SchemaGeneratorConfigPart<FieldScope> fieldConfigPart, SchemaGeneratorConfigPart<MethodScope> methodConfigPart)Constructor of a configuration instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ArrayNodecreateArrayNode()Generate an empty JSON node representing an array (which will subsequently be filled by the generator).com.fasterxml.jackson.databind.node.ObjectNodecreateObjectNode()Generate an empty JSON node representing an object (which will subsequently be filled by the generator).CustomDefinitiongetCustomDefinition(com.fasterxml.classmate.ResolvedType javaType, SchemaGenerationContext context, CustomDefinitionProviderV2 ignoredDefinitionProvider)Look-up the non-standard JSON schema definition for a given type.<M extends MemberScope<?,?>>
CustomPropertyDefinitiongetCustomDefinition(M scope, SchemaGenerationContext context, CustomPropertyDefinitionProvider<M> ignoredDefinitionProvider)Look-up the non-standard JSON schema definition for a given property.SchemaDefinitionNamingStrategygetDefinitionNamingStrategy()Getter for the naming strategy to be applied when determining key names in the "definitions"/"$defs".List<InstanceAttributeOverrideV2<FieldScope>>getFieldAttributeOverrides()Getter for the applicable instance attribute overrides for fields.StringgetKeyword(SchemaKeyword keyword)Getter for the indicated keyword's value in the designated JSON Schema version.List<InstanceAttributeOverrideV2<MethodScope>>getMethodAttributeOverrides()Getter for the applicable instance attribute overrides for methods.com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()Getter for the underlying object mapper.SchemaVersiongetSchemaVersion()Getter for the designated JSON Schema version.List<TypeAttributeOverrideV2>getTypeAttributeOverrides()Getter for the applicable type attribute overrides.booleanisNullable(FieldScope field)Check whether a field/property is nullable.booleanisNullable(MethodScope method)Check whether a method's return value is nullable.booleanisReadOnly(FieldScope field)Check whether a field/property value is deemed read-only, i.e., may be ignored or rejected when included in a request.booleanisReadOnly(MethodScope method)Check whether a method value is deemed read-only, i.e., may be ignored or rejected when included in a request.booleanisRequired(FieldScope field)Check whether a field/property value is required.booleanisRequired(MethodScope method)Check whether a method value is required.booleanisWriteOnly(FieldScope field)Check whether a field/property value is deemed write-only, i.e., is not being returned in responses.booleanisWriteOnly(MethodScope method)Check whether a method value is deemed write-only, i.e., is not being returned in responses.voidresetAfterSchemaGenerationFinished()Method being invoked after the generation of a single "main" type's schema has been completed.com.fasterxml.jackson.databind.JsonNoderesolveAdditionalProperties(FieldScope field, SchemaGenerationContext context)Determine the "additionalProperties" of an object's field/property.com.fasterxml.jackson.databind.JsonNoderesolveAdditionalProperties(MethodScope method, SchemaGenerationContext context)Determine the "additionalProperties" of a method's return value.com.fasterxml.jackson.databind.JsonNoderesolveAdditionalPropertiesForType(TypeScope scope, SchemaGenerationContext context)Determine the "additionalProperties" of a context-independent type representation.StringresolveAnchorForType(TypeScope scope)Determine the "$anchor" of a context-independent type representation.IntegerresolveArrayMaxItems(FieldScope field)Determine the "maxItems" of an object's field/property.IntegerresolveArrayMaxItems(MethodScope method)Determine the "maxItems" of a method's return value.IntegerresolveArrayMaxItemsForType(TypeScope scope)Determine the "maxItems" of a context-independent type representation.IntegerresolveArrayMinItems(FieldScope field)Determine the "minItems" of an object's field/property.IntegerresolveArrayMinItems(MethodScope method)Determine the "minItems" of a method's return value.IntegerresolveArrayMinItemsForType(TypeScope scope)Determine the "minItems" of a context-independent type representation.BooleanresolveArrayUniqueItems(FieldScope field)Determine the "uniqueItems" of an object's field/property.BooleanresolveArrayUniqueItems(MethodScope method)Determine the "uniqueItems" of a method's return value.BooleanresolveArrayUniqueItemsForType(TypeScope scope)Determine the "uniqueItems" of a context-independent type representation.ObjectresolveDefault(FieldScope field)Determine the "default" value of an object's field/property.ObjectresolveDefault(MethodScope method)Determine the "default" value of a method's return value.ObjectresolveDefaultForType(TypeScope scope)Determine the "default" value of a context-independent type representation.StringresolveDescription(FieldScope field)Determine the "description" of an object's field/property.StringresolveDescription(MethodScope method)Determine the "description" of a method's return value.StringresolveDescriptionForType(TypeScope scope)Determine the "description" of a context-independent type representation.Collection<?>resolveEnum(FieldScope field)Determine the "enum"/"const" of an object's field/property.Collection<?>resolveEnum(MethodScope method)Determine the "enum"/"const" of a method's return value.Collection<?>resolveEnumForType(TypeScope scope)Determine the "enum"/"const" of a context-independent type representation.StringresolveIdForType(TypeScope scope)Determine the "$id" of a context-independent type representation.BigDecimalresolveNumberExclusiveMaximum(FieldScope field)Determine the "exclusiveMaximum" of an object's field/property.BigDecimalresolveNumberExclusiveMaximum(MethodScope method)Determine the "exclusiveMaximum" of a method's return value.BigDecimalresolveNumberExclusiveMaximumForType(TypeScope scope)Determine the "exclusiveMaximum" of a context-independent type representation.BigDecimalresolveNumberExclusiveMinimum(FieldScope field)Determine the "exclusiveMinimum" of an object's field/property.BigDecimalresolveNumberExclusiveMinimum(MethodScope method)Determine the "exclusiveMinimum" of a method's return value.BigDecimalresolveNumberExclusiveMinimumForType(TypeScope scope)Determine the "exclusiveMinimum" of a context-independent type representation.BigDecimalresolveNumberInclusiveMaximum(FieldScope field)Determine the "maximum" of an object's field/property.BigDecimalresolveNumberInclusiveMaximum(MethodScope method)Determine the "maximum" of a method's return value.BigDecimalresolveNumberInclusiveMaximumForType(TypeScope scope)Determine the "maximum" of a context-independent type representation.BigDecimalresolveNumberInclusiveMinimum(FieldScope field)Determine the "minimum" of an object's field/property.BigDecimalresolveNumberInclusiveMinimum(MethodScope method)Determine the "minimum" of a method's return value.BigDecimalresolveNumberInclusiveMinimumForType(TypeScope scope)Determine the "minimum" of a context-independent type representation.BigDecimalresolveNumberMultipleOf(FieldScope field)Determine the "multipleOf" of an object's field/property.BigDecimalresolveNumberMultipleOf(MethodScope method)Determine the "multipleOf" of a method's return value.BigDecimalresolveNumberMultipleOfForType(TypeScope scope)Determine the "multipleOf" of a context-independent type representation.Map<String,com.fasterxml.jackson.databind.JsonNode>resolvePatternProperties(FieldScope field, SchemaGenerationContext context)Determine the "patternProperties" of an object's field/property.Map<String,com.fasterxml.jackson.databind.JsonNode>resolvePatternProperties(MethodScope method, SchemaGenerationContext context)Determine the "patternProperties" of a method's return value.Map<String,com.fasterxml.jackson.databind.JsonNode>resolvePatternPropertiesForType(TypeScope scope, SchemaGenerationContext context)Determine the "patternProperties" of a context-independent type representation.StringresolvePropertyNameOverride(FieldScope field)Determine the alternative name in a parent JSON Schema's "properties" from an object's field/property.StringresolvePropertyNameOverride(MethodScope method)Determine the alternative name in a parent JSON Schema's "properties" from a method's return value.StringresolveStringFormat(FieldScope field)Determine the "format" of an object's field/property.StringresolveStringFormat(MethodScope method)Determine the "format" of a method's return value.StringresolveStringFormatForType(TypeScope scope)Determine the "format" of a context-independent type representation.IntegerresolveStringMaxLength(FieldScope field)Determine the "maxLength" of an object's field/property.IntegerresolveStringMaxLength(MethodScope method)Determine the "maxLength" of a method's return value.IntegerresolveStringMaxLengthForType(TypeScope scope)Determine the "maxLength" of a context-independent type representation.IntegerresolveStringMinLength(FieldScope field)Determine the "minLength" of an object's field/property.IntegerresolveStringMinLength(MethodScope method)Determine the "minLength" of a method's return value.IntegerresolveStringMinLengthForType(TypeScope scope)Determine the "minLength" of a context-independent type representation.StringresolveStringPattern(FieldScope field)Determine the "pattern" of an object's field/property.StringresolveStringPattern(MethodScope method)Determine the "pattern" of a method's return value.StringresolveStringPatternForType(TypeScope scope)Determine the "pattern" of a context-independent type representation.List<com.fasterxml.classmate.ResolvedType>resolveSubtypes(com.fasterxml.classmate.ResolvedType javaType, SchemaGenerationContext context)Look-up a declared type's subtypes in order to list those specifically (in anSchemaKeyword.TAG_ANYOF).List<com.fasterxml.classmate.ResolvedType>resolveTargetTypeOverrides(FieldScope field)Determine the alternative target types from an object's field/property.List<com.fasterxml.classmate.ResolvedType>resolveTargetTypeOverrides(MethodScope method)Determine the alternative target types from a method's return value.StringresolveTitle(FieldScope field)Determine the "title" of an object's field/property.StringresolveTitle(MethodScope method)Determine the "title" of a method's return value.StringresolveTitleForType(TypeScope scope)Determine the "title" of a context-independent type representation.booleanshouldAllowNullableArrayItems()Determine whether "fake" container/array items should be subject to the same nullable checks as the actual declared member type.booleanshouldCleanupUnnecessaryAllOfElements()Determine whether unnecessarySchemaKeyword.TAG_ALLOFelements should be removed and merged into their declaring schema when there are no conflicts between the sub-schemas.booleanshouldCreateDefinitionForMainSchema()Determine whether the schema for the target/main type should be included alongside any "definitions"/"$defs" and be referenced via"$ref": "#"if necessary.booleanshouldCreateDefinitionsForAllObjects()Determine whether all referenced objects should be listed in the schema's "definitions"/"$defs", even if they only occur once.booleanshouldDeriveFieldsFromArgumentFreeMethods()Determine whether non-void argument-free "getXyZ"/"isXyZ" methods should be represented by the respective field name "xyZ" by default.booleanshouldIgnore(FieldScope field)Check whether a field/property should be ignored.booleanshouldIgnore(MethodScope method)Check whether a method should be ignored.booleanshouldIncludeExtraOpenApiFormatValues()Determine whether extraSchemaKeyword.TAG_FORMATvalues should be included for "simple types".booleanshouldIncludeSchemaVersionIndicator()Determine whether theSchemaKeyword.TAG_SCHEMAattribute withSchemaKeyword.TAG_SCHEMA_VALUEshould be added.booleanshouldIncludeStaticFields()Determine whether static fields should be included in the generated schema.booleanshouldIncludeStaticMethods()Determine whether static methods should be included in the generated schema.booleanshouldInlineAllSchemas()Determine whether all sub-schemas should be included in-line, even if they occur multiple times, and not in the schema's "definitions"/"$defs".booleanshouldRepresentSingleAllowedValueAsConst()Determine whether a single allowed values should be represented by aSchemaKeyword.TAG_CONST.booleanshouldTransparentlyResolveSubtypesOfMembers()Determine whether a member (field/method), having a declared type for which subtypes are being detected, should be merely a collection of its subtype schemas – each being treated like the member had declared the subtype directly – or whether it should be included as standalone definition with any collected member attributes assigned directly and the subtypes only being handled as generic types.booleanshouldUsePlainDefinitionKeys()Determine whether theSchemaKeyword.TAG_REFvalues should not just be URI compatible (as expected in JSON Schemas).intsortProperties(MemberScope<?,?> first, MemberScope<?,?> second)Implementation of theComparator.compare(Object, Object)interface method to determine the order of fields and methods in an object's"properties".-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.victools.jsonschema.generator.SchemaGeneratorConfig
resolveTargetTypeOverride, resolveTargetTypeOverride
-
-
-
-
Constructor Detail
-
SchemaGeneratorConfigImpl
public SchemaGeneratorConfigImpl(com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaVersion schemaVersion, Set<Option> enabledOptions, SchemaGeneratorGeneralConfigPart typesInGeneralConfigPart, SchemaGeneratorConfigPart<FieldScope> fieldConfigPart, SchemaGeneratorConfigPart<MethodScope> methodConfigPart)Constructor of a configuration instance.- Parameters:
objectMapper- supplier for object and array nodes for the JSON structure being generatedschemaVersion- designated JSON Schema versionenabledOptions- enabled settings/options (either by default or explicitly set)typesInGeneralConfigPart- configuration part for context-independent attribute collectionfieldConfigPart- configuration part for fieldsmethodConfigPart- configuration part for methods
-
-
Method Detail
-
resetAfterSchemaGenerationFinished
public void resetAfterSchemaGenerationFinished()
Description copied from interface:StatefulConfigMethod being invoked after the generation of a single "main" type's schema has been completed. This enables the sameSchemaGeneratorinstance to be re-used for multiple subsequent executions, even if some aspect of the configuration remembers the original "main" type.- Specified by:
resetAfterSchemaGenerationFinishedin interfaceStatefulConfig
-
getSchemaVersion
public SchemaVersion getSchemaVersion()
Description copied from interface:SchemaGeneratorConfigGetter for the designated JSON Schema version.- Specified by:
getSchemaVersionin interfaceSchemaGeneratorConfig- Returns:
- target version of the JSON Schema to generate
-
getKeyword
public String getKeyword(SchemaKeyword keyword)
Description copied from interface:SchemaGeneratorConfigGetter for the indicated keyword's value in the designated JSON Schema version.- Specified by:
getKeywordin interfaceSchemaGeneratorConfig- Parameters:
keyword- reference to a tag name or value- Returns:
- referenced tag name/value in the designated schema version
- See Also:
SchemaGeneratorConfig.getSchemaVersion(),SchemaKeyword.forVersion(SchemaVersion)
-
shouldCreateDefinitionsForAllObjects
public boolean shouldCreateDefinitionsForAllObjects()
Description copied from interface:SchemaGeneratorConfigDetermine whether all referenced objects should be listed in the schema's "definitions"/"$defs", even if they only occur once.- Specified by:
shouldCreateDefinitionsForAllObjectsin interfaceSchemaGeneratorConfig- Returns:
- whether to add a definition even for objects occurring only once
-
shouldCreateDefinitionForMainSchema
public boolean shouldCreateDefinitionForMainSchema()
Description copied from interface:SchemaGeneratorConfigDetermine whether the schema for the target/main type should be included alongside any "definitions"/"$defs" and be referenced via"$ref": "#"if necessary. Otherwise, it may be moved into the "definitions"/"$defs" like any other subschema.- Specified by:
shouldCreateDefinitionForMainSchemain interfaceSchemaGeneratorConfig- Returns:
- whether to allow "$ref"-erences to the empty fragment "#"
-
shouldTransparentlyResolveSubtypesOfMembers
public boolean shouldTransparentlyResolveSubtypesOfMembers()
Description copied from interface:SchemaGeneratorConfigDetermine whether a member (field/method), having a declared type for which subtypes are being detected, should be merely a collection of its subtype schemas – each being treated like the member had declared the subtype directly – or whether it should be included as standalone definition with any collected member attributes assigned directly and the subtypes only being handled as generic types.- Specified by:
shouldTransparentlyResolveSubtypesOfMembersin interfaceSchemaGeneratorConfig- Returns:
- whether to produce sub-schema for each subtype of a member's declared type, like the member had declared that subtype instead
-
shouldInlineAllSchemas
public boolean shouldInlineAllSchemas()
Description copied from interface:SchemaGeneratorConfigDetermine whether all sub-schemas should be included in-line, even if they occur multiple times, and not in the schema's "definitions"/"$defs".- Specified by:
shouldInlineAllSchemasin interfaceSchemaGeneratorConfig- Returns:
- whether to include all sub-schemas in-line
-
shouldUsePlainDefinitionKeys
public boolean shouldUsePlainDefinitionKeys()
Description copied from interface:SchemaGeneratorConfigDetermine whether theSchemaKeyword.TAG_REFvalues should not just be URI compatible (as expected in JSON Schemas). It should further respect the reduced set of characters as per the following regular expression (as expected by OpenAPI):^[a-zA-Z0-9\.\-_]+$- Specified by:
shouldUsePlainDefinitionKeysin interfaceSchemaGeneratorConfig- Returns:
- whether to use only alphanumeric characters, dots, dashes and underscores in
SchemaKeyword.TAG_REFvalues
-
shouldIncludeExtraOpenApiFormatValues
public boolean shouldIncludeExtraOpenApiFormatValues()
Description copied from interface:SchemaGeneratorConfigDetermine whether extraSchemaKeyword.TAG_FORMATvalues should be included for "simple types".- Specified by:
shouldIncludeExtraOpenApiFormatValuesin interfaceSchemaGeneratorConfig- Returns:
- whether to include extra
SchemaKeyword.TAG_FORMATvalues
-
shouldCleanupUnnecessaryAllOfElements
public boolean shouldCleanupUnnecessaryAllOfElements()
Description copied from interface:SchemaGeneratorConfigDetermine whether unnecessarySchemaKeyword.TAG_ALLOFelements should be removed and merged into their declaring schema when there are no conflicts between the sub-schemas.- Specified by:
shouldCleanupUnnecessaryAllOfElementsin interfaceSchemaGeneratorConfig- Returns:
- whether to clean-up
SchemaKeyword.TAG_ALLOFelements as the last step during schema generation
-
shouldIncludeStaticFields
public boolean shouldIncludeStaticFields()
Description copied from interface:SchemaGeneratorConfigDetermine whether static fields should be included in the generated schema.- Specified by:
shouldIncludeStaticFieldsin interfaceSchemaGeneratorConfig- Returns:
- whether to include static fields
-
shouldIncludeStaticMethods
public boolean shouldIncludeStaticMethods()
Description copied from interface:SchemaGeneratorConfigDetermine whether static methods should be included in the generated schema.- Specified by:
shouldIncludeStaticMethodsin interfaceSchemaGeneratorConfig- Returns:
- whether to included static methods
-
shouldDeriveFieldsFromArgumentFreeMethods
public boolean shouldDeriveFieldsFromArgumentFreeMethods()
Description copied from interface:SchemaGeneratorConfigDetermine whether non-void argument-free "getXyZ"/"isXyZ" methods should be represented by the respective field name "xyZ" by default.- Specified by:
shouldDeriveFieldsFromArgumentFreeMethodsin interfaceSchemaGeneratorConfig- Returns:
- whether to treat argument-free methods as fields in schema
-
shouldRepresentSingleAllowedValueAsConst
public boolean shouldRepresentSingleAllowedValueAsConst()
Description copied from interface:SchemaGeneratorConfigDetermine whether a single allowed values should be represented by aSchemaKeyword.TAG_CONST. Otherwise aSchemaKeyword.TAG_ENUMwill be used even for a single allowed value.- Specified by:
shouldRepresentSingleAllowedValueAsConstin interfaceSchemaGeneratorConfig- Returns:
- whether to automatically make use of the
"const"keyword
-
shouldAllowNullableArrayItems
public boolean shouldAllowNullableArrayItems()
Description copied from interface:SchemaGeneratorConfigDetermine whether "fake" container/array items should be subject to the same nullable checks as the actual declared member type.- Specified by:
shouldAllowNullableArrayItemsin interfaceSchemaGeneratorConfig- Returns:
- whether to perform nullable checks for "fake" container/array item typees
-
shouldIncludeSchemaVersionIndicator
public boolean shouldIncludeSchemaVersionIndicator()
Description copied from interface:SchemaGeneratorConfigDetermine whether theSchemaKeyword.TAG_SCHEMAattribute withSchemaKeyword.TAG_SCHEMA_VALUEshould be added.- Specified by:
shouldIncludeSchemaVersionIndicatorin interfaceSchemaGeneratorConfig- Returns:
- whether to add the schema version attribute
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Description copied from interface:SchemaGeneratorConfigGetter for the underlying object mapper.- Specified by:
getObjectMapperin interfaceSchemaGeneratorConfig- Returns:
- object mapper being used for generating JSON Schema structure
-
createObjectNode
public com.fasterxml.jackson.databind.node.ObjectNode createObjectNode()
Description copied from interface:SchemaGeneratorConfigGenerate an empty JSON node representing an object (which will subsequently be filled by the generator).
This is equivalent to callinggetObjectMapper().createObjectNode()- Specified by:
createObjectNodein interfaceSchemaGeneratorConfig- Returns:
- JSON object node
-
createArrayNode
public com.fasterxml.jackson.databind.node.ArrayNode createArrayNode()
Description copied from interface:SchemaGeneratorConfigGenerate an empty JSON node representing an array (which will subsequently be filled by the generator).
This is equivalent to callinggetObjectMapper().createArrayNode()- Specified by:
createArrayNodein interfaceSchemaGeneratorConfig- Returns:
- JSON array node
-
sortProperties
public int sortProperties(MemberScope<?,?> first, MemberScope<?,?> second)
Description copied from interface:SchemaGeneratorConfigImplementation of theComparator.compare(Object, Object)interface method to determine the order of fields and methods in an object's"properties".- Specified by:
sortPropertiesin interfaceSchemaGeneratorConfig- Parameters:
first- first field/method to compare tosecondsecond- second field/method to compare tofirst- Returns:
- a negative/positive integer as the first field/method should be positioned before/after the second respectively
-
getDefinitionNamingStrategy
public SchemaDefinitionNamingStrategy getDefinitionNamingStrategy()
Description copied from interface:SchemaGeneratorConfigGetter for the naming strategy to be applied when determining key names in the "definitions"/"$defs".- Specified by:
getDefinitionNamingStrategyin interfaceSchemaGeneratorConfig- Returns:
- definition key naming strategy
-
getCustomDefinition
public <M extends MemberScope<?,?>> CustomPropertyDefinition getCustomDefinition(M scope, SchemaGenerationContext context, CustomPropertyDefinitionProvider<M> ignoredDefinitionProvider)
Description copied from interface:SchemaGeneratorConfigLook-up the non-standard JSON schema definition for a given property. Falling-back on the per-type custom definitions.- Specified by:
getCustomDefinitionin interfaceSchemaGeneratorConfig- Type Parameters:
M- type of targeted property- Parameters:
scope- targeted scope for which to provide a custom definitioncontext- generation context allowing to let the standard generation take over nested parts of the custom definitionignoredDefinitionProvider- custom definition provider to ignore- Returns:
- non-standard JSON schema definition for the given field/method (may be null)
- See Also:
SchemaGeneratorConfig.getCustomDefinition(ResolvedType, SchemaGenerationContext, CustomDefinitionProviderV2)
-
getCustomDefinition
public CustomDefinition getCustomDefinition(com.fasterxml.classmate.ResolvedType javaType, SchemaGenerationContext context, CustomDefinitionProviderV2 ignoredDefinitionProvider)
Description copied from interface:SchemaGeneratorConfigLook-up the non-standard JSON schema definition for a given type. If this returns null, the standard behaviour is expected to be applied.- Specified by:
getCustomDefinitionin interfaceSchemaGeneratorConfig- Parameters:
javaType- generic type to provide custom definition forcontext- generation context allowing to let the standard generation take over nested parts of the custom definitionignoredDefinitionProvider- custom definition provider to ignore- Returns:
- non-standard JSON schema definition (may be null)
-
resolveSubtypes
public List<com.fasterxml.classmate.ResolvedType> resolveSubtypes(com.fasterxml.classmate.ResolvedType javaType, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigLook-up a declared type's subtypes in order to list those specifically (in anSchemaKeyword.TAG_ANYOF).- Specified by:
resolveSubtypesin interfaceSchemaGeneratorConfig- Parameters:
javaType- declared type to look-up subtypes forcontext- generation context (including a reference to theTypeContextfor deriving aResolvedTypefrom aClass)- Returns:
- subtypes to list as possible alternatives for the declared type (may be empty)
-
getTypeAttributeOverrides
public List<TypeAttributeOverrideV2> getTypeAttributeOverrides()
Description copied from interface:SchemaGeneratorConfigGetter for the applicable type attribute overrides.- Specified by:
getTypeAttributeOverridesin interfaceSchemaGeneratorConfig- Returns:
- overrides of a given JSON Schema node's type attributes
-
getFieldAttributeOverrides
public List<InstanceAttributeOverrideV2<FieldScope>> getFieldAttributeOverrides()
Description copied from interface:SchemaGeneratorConfigGetter for the applicable instance attribute overrides for fields.- Specified by:
getFieldAttributeOverridesin interfaceSchemaGeneratorConfig- Returns:
- overrides of a given JSON Schema node's instance attributes
-
getMethodAttributeOverrides
public List<InstanceAttributeOverrideV2<MethodScope>> getMethodAttributeOverrides()
Description copied from interface:SchemaGeneratorConfigGetter for the applicable instance attribute overrides for methods.- Specified by:
getMethodAttributeOverridesin interfaceSchemaGeneratorConfig- Returns:
- overrides of a given JSON Schema node's instance attributes
-
isNullable
public boolean isNullable(FieldScope field)
Description copied from interface:SchemaGeneratorConfigCheck whether a field/property is nullable.- Specified by:
isNullablein interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to check- Returns:
- whether the field/property is nullable
-
isNullable
public boolean isNullable(MethodScope method)
Description copied from interface:SchemaGeneratorConfigCheck whether a method's return value is nullable.- Specified by:
isNullablein interfaceSchemaGeneratorConfig- Parameters:
method- method to check- Returns:
- whether the method's return value is nullable
-
shouldIgnore
public boolean shouldIgnore(FieldScope field)
Description copied from interface:SchemaGeneratorConfigCheck whether a field/property should be ignored.- Specified by:
shouldIgnorein interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to check- Returns:
- whether the field/property should be ignored
-
shouldIgnore
public boolean shouldIgnore(MethodScope method)
Description copied from interface:SchemaGeneratorConfigCheck whether a method should be ignored.- Specified by:
shouldIgnorein interfaceSchemaGeneratorConfig- Parameters:
method- method to check- Returns:
- whether the method should be ignored
-
isRequired
public boolean isRequired(FieldScope field)
Description copied from interface:SchemaGeneratorConfigCheck whether a field/property value is required.- Specified by:
isRequiredin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to check- Returns:
- whether the field/property value should be required
-
isRequired
public boolean isRequired(MethodScope method)
Description copied from interface:SchemaGeneratorConfigCheck whether a method value is required.- Specified by:
isRequiredin interfaceSchemaGeneratorConfig- Parameters:
method- method to check- Returns:
- whether the method value should be required
-
isReadOnly
public boolean isReadOnly(FieldScope field)
Description copied from interface:SchemaGeneratorConfigCheck whether a field/property value is deemed read-only, i.e., may be ignored or rejected when included in a request.- Specified by:
isReadOnlyin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to check- Returns:
- whether the field/property value should be read-only
-
isReadOnly
public boolean isReadOnly(MethodScope method)
Description copied from interface:SchemaGeneratorConfigCheck whether a method value is deemed read-only, i.e., may be ignored or rejected when included in a request.- Specified by:
isReadOnlyin interfaceSchemaGeneratorConfig- Parameters:
method- method to check- Returns:
- whether the method value should be read-only
-
isWriteOnly
public boolean isWriteOnly(FieldScope field)
Description copied from interface:SchemaGeneratorConfigCheck whether a field/property value is deemed write-only, i.e., is not being returned in responses.- Specified by:
isWriteOnlyin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to check- Returns:
- whether the field/property value should be write-only
-
isWriteOnly
public boolean isWriteOnly(MethodScope method)
Description copied from interface:SchemaGeneratorConfigCheck whether a method value is deemed write-only, i.e., is not being returned in responses.- Specified by:
isWriteOnlyin interfaceSchemaGeneratorConfig- Parameters:
method- method to check- Returns:
- whether the method value should be write-only
-
resolveTargetTypeOverrides
public List<com.fasterxml.classmate.ResolvedType> resolveTargetTypeOverrides(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the alternative target types from an object's field/property.- Specified by:
resolveTargetTypeOverridesin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine the target type for- Returns:
- target types (may be null or empty)
-
resolveTargetTypeOverrides
public List<com.fasterxml.classmate.ResolvedType> resolveTargetTypeOverrides(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the alternative target types from a method's return value.- Specified by:
resolveTargetTypeOverridesin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine the target type for- Returns:
- target types (may be null or empty)
-
resolvePropertyNameOverride
public String resolvePropertyNameOverride(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the alternative name in a parent JSON Schema's "properties" from an object's field/property.- Specified by:
resolvePropertyNameOverridein interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine name in parent JSON Schema's properties for- Returns:
- name in a parent JSON Schema's "properties" (may be null, thereby falling back on the default value)
-
resolvePropertyNameOverride
public String resolvePropertyNameOverride(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the alternative name in a parent JSON Schema's "properties" from a method's return value.- Specified by:
resolvePropertyNameOverridein interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine name in parent JSON Schema's properties for- Returns:
- name in a parent JSON Schema's "properties" (may be null, thereby falling back on the default value)
-
resolveIdForType
public String resolveIdForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "$id" of a context-independent type representation.- Specified by:
resolveIdForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "$id" value for- Returns:
- "$id" in a JSON Schema (may be null)
-
resolveAnchorForType
public String resolveAnchorForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "$anchor" of a context-independent type representation.- Specified by:
resolveAnchorForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "$anchor" value for- Returns:
- "$anchor" in a JSON Schema (may be null)
-
resolveTitle
public String resolveTitle(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "title" of an object's field/property.- Specified by:
resolveTitlein interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "title" value for- Returns:
- "title" in a JSON Schema (may be null)
-
resolveTitle
public String resolveTitle(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "title" of a method's return value.- Specified by:
resolveTitlein interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "title" value for- Returns:
- "title" in a JSON Schema (may be null)
-
resolveTitleForType
public String resolveTitleForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "title" of a context-independent type representation.- Specified by:
resolveTitleForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "title" value for- Returns:
- "title" in a JSON Schema (may be null)
-
resolveDescription
public String resolveDescription(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "description" of an object's field/property.- Specified by:
resolveDescriptionin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "description" value for- Returns:
- "description" in a JSON Schema (may be null)
-
resolveDescription
public String resolveDescription(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "description" of a method's return value.- Specified by:
resolveDescriptionin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "description" value for- Returns:
- "description" in a JSON Schema (may be null)
-
resolveDescriptionForType
public String resolveDescriptionForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "description" of a context-independent type representation.- Specified by:
resolveDescriptionForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "description" value for- Returns:
- "description" in a JSON Schema (may be null)
-
resolveDefault
public Object resolveDefault(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "default" value of an object's field/property.- Specified by:
resolveDefaultin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "default" value for- Returns:
- "default" in a JSON Schema (may be null)
-
resolveDefault
public Object resolveDefault(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "default" value of a method's return value.- Specified by:
resolveDefaultin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "default" value for- Returns:
- "default" in a JSON Schema (may be null)
-
resolveDefaultForType
public Object resolveDefaultForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "default" value of a context-independent type representation.- Specified by:
resolveDefaultForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "default" value for- Returns:
- "default" in a JSON Schema (may be null)
-
resolveEnum
public Collection<?> resolveEnum(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "enum"/"const" of an object's field/property.- Specified by:
resolveEnumin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "enum"/"const" value for- Returns:
- "enum"/"const" in a JSON Schema (may be null)
-
resolveEnum
public Collection<?> resolveEnum(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "enum"/"const" of a method's return value.- Specified by:
resolveEnumin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "enum"/"const" value for- Returns:
- "enum"/"const" in a JSON Schema (may be null)
-
resolveEnumForType
public Collection<?> resolveEnumForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "enum"/"const" of a context-independent type representation.- Specified by:
resolveEnumForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "enum"/"const" value for- Returns:
- "enum"/"const" in a JSON Schema (may be null)
-
resolveAdditionalProperties
public com.fasterxml.jackson.databind.JsonNode resolveAdditionalProperties(FieldScope field, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigDetermine the "additionalProperties" of an object's field/property.- Specified by:
resolveAdditionalPropertiesin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "additionalProperties" value forcontext- generation context allowing to let the standard generation take over nested parts of the custom definition- Returns:
- "additionalProperties" in a JSON Schema (may be
Void) to indicate no additional properties being allowed or may be null)
-
resolveAdditionalProperties
public com.fasterxml.jackson.databind.JsonNode resolveAdditionalProperties(MethodScope method, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigDetermine the "additionalProperties" of a method's return value.- Specified by:
resolveAdditionalPropertiesin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "additionalProperties" value forcontext- generation context allowing to let the standard generation take over nested parts of the custom definition- Returns:
- "additionalProperties" in a JSON Schema (may be
Void) to indicate no additional properties being allowed or may be null)
-
resolveAdditionalPropertiesForType
public com.fasterxml.jackson.databind.JsonNode resolveAdditionalPropertiesForType(TypeScope scope, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigDetermine the "additionalProperties" of a context-independent type representation.- Specified by:
resolveAdditionalPropertiesForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "additionalProperties" value forcontext- generation context allowing to let the standard generation take over nested parts of the custom definition- Returns:
- "additionalProperties" in a JSON Schema (may be null)
-
resolvePatternProperties
public Map<String,com.fasterxml.jackson.databind.JsonNode> resolvePatternProperties(FieldScope field, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigDetermine the "patternProperties" of an object's field/property.- Specified by:
resolvePatternPropertiesin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "patternProperties" value forcontext- generation context allowing to let the standard generation take over nested parts of the custom definition- Returns:
- "patternProperties" in a JSON Schema (may be null), the keys representing the patterns and the mapped values their corresponding types
-
resolvePatternProperties
public Map<String,com.fasterxml.jackson.databind.JsonNode> resolvePatternProperties(MethodScope method, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigDetermine the "patternProperties" of a method's return value.- Specified by:
resolvePatternPropertiesin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "patternProperties" value forcontext- generation context allowing to let the standard generation take over nested parts of the custom definition- Returns:
- "patternProperties" in a JSON Schema (may be null), the keys representing the patterns and the mapped values their corresponding types
-
resolvePatternPropertiesForType
public Map<String,com.fasterxml.jackson.databind.JsonNode> resolvePatternPropertiesForType(TypeScope scope, SchemaGenerationContext context)
Description copied from interface:SchemaGeneratorConfigDetermine the "patternProperties" of a context-independent type representation.- Specified by:
resolvePatternPropertiesForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "patternProperties" value forcontext- generation context allowing to let the standard generation take over nested parts of the custom definition- Returns:
- "patternProperties" in a JSON Schema (may be null), the keys representing the patterns and the mapped values their corresponding types
-
resolveStringMinLength
public Integer resolveStringMinLength(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "minLength" of an object's field/property.- Specified by:
resolveStringMinLengthin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "minLength" value for- Returns:
- "minLength" in a JSON Schema (may be null)
-
resolveStringMinLength
public Integer resolveStringMinLength(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "minLength" of a method's return value.- Specified by:
resolveStringMinLengthin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "minLength" value for- Returns:
- "minLength" in a JSON Schema (may be null)
-
resolveStringMinLengthForType
public Integer resolveStringMinLengthForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "minLength" of a context-independent type representation.- Specified by:
resolveStringMinLengthForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "minLength" value for- Returns:
- "minLength" in a JSON Schema (may be null)
-
resolveStringMaxLength
public Integer resolveStringMaxLength(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "maxLength" of an object's field/property.- Specified by:
resolveStringMaxLengthin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "maxLength" value for- Returns:
- "maxLength" in a JSON Schema (may be null)
-
resolveStringMaxLength
public Integer resolveStringMaxLength(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "maxLength" of a method's return value.- Specified by:
resolveStringMaxLengthin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "maxLength" value for- Returns:
- "maxLength" in a JSON Schema (may be null)
-
resolveStringMaxLengthForType
public Integer resolveStringMaxLengthForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "maxLength" of a context-independent type representation.- Specified by:
resolveStringMaxLengthForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "maxLength" value for- Returns:
- "maxLength" in a JSON Schema (may be null)
-
resolveStringFormat
public String resolveStringFormat(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "format" of an object's field/property.- Specified by:
resolveStringFormatin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "format" value for- Returns:
- "format" in a JSON Schema (may be null)
-
resolveStringFormat
public String resolveStringFormat(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "format" of a method's return value.- Specified by:
resolveStringFormatin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "format" value for- Returns:
- "format" in a JSON Schema (may be null)
-
resolveStringFormatForType
public String resolveStringFormatForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "format" of a context-independent type representation.- Specified by:
resolveStringFormatForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "format" value for- Returns:
- "format" in a JSON Schema (may be null)
-
resolveStringPattern
public String resolveStringPattern(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "pattern" of an object's field/property.- Specified by:
resolveStringPatternin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "pattern" value for- Returns:
- "pattern" in a JSON Schema (may be null)
-
resolveStringPattern
public String resolveStringPattern(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "pattern" of a method's return value.- Specified by:
resolveStringPatternin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "pattern" value for- Returns:
- "pattern" in a JSON Schema (may be null)
-
resolveStringPatternForType
public String resolveStringPatternForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "pattern" of a context-independent type representation.- Specified by:
resolveStringPatternForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "pattern" value for- Returns:
- "pattern" in a JSON Schema (may be null)
-
resolveNumberInclusiveMinimum
public BigDecimal resolveNumberInclusiveMinimum(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "minimum" of an object's field/property.- Specified by:
resolveNumberInclusiveMinimumin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "minimum" value for- Returns:
- "minimum" in a JSON Schema (may be null)
-
resolveNumberInclusiveMinimum
public BigDecimal resolveNumberInclusiveMinimum(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "minimum" of a method's return value.- Specified by:
resolveNumberInclusiveMinimumin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "minimum" value for- Returns:
- "minimum" in a JSON Schema (may be null)
-
resolveNumberInclusiveMinimumForType
public BigDecimal resolveNumberInclusiveMinimumForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "minimum" of a context-independent type representation.- Specified by:
resolveNumberInclusiveMinimumForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "minimum" value for- Returns:
- "minimum" in a JSON Schema (may be null)
-
resolveNumberExclusiveMinimum
public BigDecimal resolveNumberExclusiveMinimum(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "exclusiveMinimum" of an object's field/property.- Specified by:
resolveNumberExclusiveMinimumin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "exclusiveMinimum" value for- Returns:
- "exclusiveMinimum" in a JSON Schema (may be null)
-
resolveNumberExclusiveMinimum
public BigDecimal resolveNumberExclusiveMinimum(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "exclusiveMinimum" of a method's return value.- Specified by:
resolveNumberExclusiveMinimumin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "exclusiveMinimum" value for- Returns:
- "exclusiveMinimum" in a JSON Schema (may be null)
-
resolveNumberExclusiveMinimumForType
public BigDecimal resolveNumberExclusiveMinimumForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "exclusiveMinimum" of a context-independent type representation.- Specified by:
resolveNumberExclusiveMinimumForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "exclusiveMinimum" value for- Returns:
- "exclusiveMinimum" in a JSON Schema (may be null)
-
resolveNumberInclusiveMaximum
public BigDecimal resolveNumberInclusiveMaximum(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "maximum" of an object's field/property.- Specified by:
resolveNumberInclusiveMaximumin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "maximum" value for- Returns:
- "maximum" in a JSON Schema (may be null)
-
resolveNumberInclusiveMaximum
public BigDecimal resolveNumberInclusiveMaximum(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "maximum" of a method's return value.- Specified by:
resolveNumberInclusiveMaximumin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "maximum" value for- Returns:
- "maximum" in a JSON Schema (may be null)
-
resolveNumberInclusiveMaximumForType
public BigDecimal resolveNumberInclusiveMaximumForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "maximum" of a context-independent type representation.- Specified by:
resolveNumberInclusiveMaximumForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "maximum" value for- Returns:
- "maximum" in a JSON Schema (may be null)
-
resolveNumberExclusiveMaximum
public BigDecimal resolveNumberExclusiveMaximum(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "exclusiveMaximum" of an object's field/property.- Specified by:
resolveNumberExclusiveMaximumin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "exclusiveMaximum" value for- Returns:
- "exclusiveMaximum" in a JSON Schema (may be null)
-
resolveNumberExclusiveMaximum
public BigDecimal resolveNumberExclusiveMaximum(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "exclusiveMaximum" of a method's return value.- Specified by:
resolveNumberExclusiveMaximumin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "exclusiveMaximum" value for- Returns:
- "exclusiveMaximum" in a JSON Schema (may be null)
-
resolveNumberExclusiveMaximumForType
public BigDecimal resolveNumberExclusiveMaximumForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "exclusiveMaximum" of a context-independent type representation.- Specified by:
resolveNumberExclusiveMaximumForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "exclusiveMaximum" value for- Returns:
- "exclusiveMaximum" in a JSON Schema (may be null)
-
resolveNumberMultipleOf
public BigDecimal resolveNumberMultipleOf(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "multipleOf" of an object's field/property.- Specified by:
resolveNumberMultipleOfin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "multipleOf" value for- Returns:
- "multipleOf" in a JSON Schema (may be null)
-
resolveNumberMultipleOf
public BigDecimal resolveNumberMultipleOf(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "multipleOf" of a method's return value.- Specified by:
resolveNumberMultipleOfin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "multipleOf" value for- Returns:
- "multipleOf" in a JSON Schema (may be null)
-
resolveNumberMultipleOfForType
public BigDecimal resolveNumberMultipleOfForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "multipleOf" of a context-independent type representation.- Specified by:
resolveNumberMultipleOfForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "multipleOf" value for- Returns:
- "multipleOf" in a JSON Schema (may be null)
-
resolveArrayMinItems
public Integer resolveArrayMinItems(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "minItems" of an object's field/property.- Specified by:
resolveArrayMinItemsin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "minItems" value for- Returns:
- "minItems" in a JSON Schema (may be null)
-
resolveArrayMinItems
public Integer resolveArrayMinItems(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "minItems" of a method's return value.- Specified by:
resolveArrayMinItemsin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "minItems" value for- Returns:
- "minItems" in a JSON Schema (may be null)
-
resolveArrayMinItemsForType
public Integer resolveArrayMinItemsForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "minItems" of a context-independent type representation.- Specified by:
resolveArrayMinItemsForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "minItems" value for- Returns:
- "minItems" in a JSON Schema (may be null)
-
resolveArrayMaxItems
public Integer resolveArrayMaxItems(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "maxItems" of an object's field/property.- Specified by:
resolveArrayMaxItemsin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "maxItems" value for- Returns:
- "maxItems" in a JSON Schema (may be null)
-
resolveArrayMaxItems
public Integer resolveArrayMaxItems(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "maxItems" of a method's return value.- Specified by:
resolveArrayMaxItemsin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "maxItems" value for- Returns:
- "maxItems" in a JSON Schema (may be null)
-
resolveArrayMaxItemsForType
public Integer resolveArrayMaxItemsForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "maxItems" of a context-independent type representation.- Specified by:
resolveArrayMaxItemsForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "maxItems" value for- Returns:
- "maxItems" in a JSON Schema (may be null)
-
resolveArrayUniqueItems
public Boolean resolveArrayUniqueItems(FieldScope field)
Description copied from interface:SchemaGeneratorConfigDetermine the "uniqueItems" of an object's field/property.- Specified by:
resolveArrayUniqueItemsin interfaceSchemaGeneratorConfig- Parameters:
field- object's field/property to determine "uniqueItems" value for- Returns:
- "uniqueItems" in a JSON Schema (may be null)
-
resolveArrayUniqueItems
public Boolean resolveArrayUniqueItems(MethodScope method)
Description copied from interface:SchemaGeneratorConfigDetermine the "uniqueItems" of a method's return value.- Specified by:
resolveArrayUniqueItemsin interfaceSchemaGeneratorConfig- Parameters:
method- method for whose return value to determine "uniqueItems" value for- Returns:
- "uniqueItems" in a JSON Schema (may be null)
-
resolveArrayUniqueItemsForType
public Boolean resolveArrayUniqueItemsForType(TypeScope scope)
Description copied from interface:SchemaGeneratorConfigDetermine the "uniqueItems" of a context-independent type representation.- Specified by:
resolveArrayUniqueItemsForTypein interfaceSchemaGeneratorConfig- Parameters:
scope- context-independent type representation to determine "uniqueItems" value for- Returns:
- "uniqueItems" in a JSON Schema (may be null)
-
-