Class SchemaGeneratorConfigImpl

    • Constructor Detail

      • SchemaGeneratorConfigImpl

        public SchemaGeneratorConfigImpl​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                         SchemaVersion schemaVersion,
                                         Set<Option> enabledOptions,
                                         SchemaGeneratorGeneralConfigPart typesInGeneralConfigPart,
                                         SchemaGeneratorConfigPart<FieldScope> fieldConfigPart,
                                         SchemaGeneratorConfigPart<MethodScope> methodConfigPart,
                                         Map<Class<? extends Annotation>,​com.fasterxml.classmate.AnnotationInclusion> inclusionOverrides)
        Constructor of a configuration instance.
        Parameters:
        objectMapper - supplier for object and array nodes for the JSON structure being generated
        schemaVersion - designated JSON Schema version
        enabledOptions - enabled settings/options (either by default or explicitly set)
        typesInGeneralConfigPart - configuration part for context-independent attribute collection
        fieldConfigPart - configuration part for fields
        methodConfigPart - configuration part for methods
        inclusionOverrides - overrides of the rules when to include certain annotations (e.g., with or without @Inherited annotation
    • Method Detail

      • resetAfterSchemaGenerationFinished

        public void resetAfterSchemaGenerationFinished()
        Description copied from interface: StatefulConfig
        Method being invoked after the generation of a single "main" type's schema has been completed. This enables the same SchemaGenerator instance to be re-used for multiple subsequent executions, even if some aspect of the configuration remembers the original "main" type.
        Specified by:
        resetAfterSchemaGenerationFinished in interface StatefulConfig
      • shouldCreateDefinitionsForAllObjects

        public boolean shouldCreateDefinitionsForAllObjects()
        Description copied from interface: SchemaGeneratorConfig
        Determine whether all referenced objects should be listed in the schema's "definitions"/"$defs", even if they only occur once.
        Specified by:
        shouldCreateDefinitionsForAllObjects in interface SchemaGeneratorConfig
        Returns:
        whether to add a definition even for objects occurring only once
      • shouldCreateDefinitionForMainSchema

        public boolean shouldCreateDefinitionForMainSchema()
        Description copied from interface: SchemaGeneratorConfig
        Determine 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:
        shouldCreateDefinitionForMainSchema in interface SchemaGeneratorConfig
        Returns:
        whether to allow "$ref"-erences to the empty fragment "#"
      • shouldTransparentlyResolveSubtypesOfMembers

        public boolean shouldTransparentlyResolveSubtypesOfMembers()
        Description copied from interface: SchemaGeneratorConfig
        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.
        Specified by:
        shouldTransparentlyResolveSubtypesOfMembers in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine 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:
        shouldInlineAllSchemas in interface SchemaGeneratorConfig
        Returns:
        whether to include all sub-schemas in-line
      • shouldInlineNullableSchemas

        public boolean shouldInlineNullableSchemas()
        Description copied from interface: SchemaGeneratorConfig
        Determine whether nullable sub-schemas should be included in-line, even if they occur multiple times, and not in the schema's "definitions"/"$defs".
        Specified by:
        shouldInlineNullableSchemas in interface SchemaGeneratorConfig
        Returns:
        whether to include nullable sub-schemas in-line
      • shouldUsePlainDefinitionKeys

        public boolean shouldUsePlainDefinitionKeys()
        Description copied from interface: SchemaGeneratorConfig
        Determine whether the SchemaKeyword.TAG_REF values 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:
        shouldUsePlainDefinitionKeys in interface SchemaGeneratorConfig
        Returns:
        whether to use only alphanumeric characters, dots, dashes and underscores in SchemaKeyword.TAG_REF values
      • shouldDeriveFieldsFromArgumentFreeMethods

        public boolean shouldDeriveFieldsFromArgumentFreeMethods()
        Description copied from interface: SchemaGeneratorConfig
        Determine whether non-void argument-free "getXyZ"/"isXyZ" methods should be represented by the respective field name "xyZ" by default.
        Specified by:
        shouldDeriveFieldsFromArgumentFreeMethods in interface SchemaGeneratorConfig
        Returns:
        whether to treat argument-free methods as fields in schema
      • shouldAllowNullableArrayItems

        public boolean shouldAllowNullableArrayItems()
        Description copied from interface: SchemaGeneratorConfig
        Determine whether "fake" container/array items should be subject to the same nullable checks as the actual declared member type.
        Specified by:
        shouldAllowNullableArrayItems in interface SchemaGeneratorConfig
        Returns:
        whether to perform nullable checks for "fake" container/array item typees
      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
        Description copied from interface: SchemaGeneratorConfig
        Getter for the underlying object mapper.
        Specified by:
        getObjectMapper in interface SchemaGeneratorConfig
        Returns:
        object mapper being used for generating JSON Schema structure
      • createObjectNode

        public com.fasterxml.jackson.databind.node.ObjectNode createObjectNode()
        Description copied from interface: SchemaGeneratorConfig
        Generate an empty JSON node representing an object (which will subsequently be filled by the generator).
        This is equivalent to calling getObjectMapper().createObjectNode()
        Specified by:
        createObjectNode in interface SchemaGeneratorConfig
        Returns:
        JSON object node
      • createArrayNode

        public com.fasterxml.jackson.databind.node.ArrayNode createArrayNode()
        Description copied from interface: SchemaGeneratorConfig
        Generate an empty JSON node representing an array (which will subsequently be filled by the generator).
        This is equivalent to calling getObjectMapper().createArrayNode()
        Specified by:
        createArrayNode in interface SchemaGeneratorConfig
        Returns:
        JSON array node
      • getAnnotationInclusionOverrides

        public Map<Class<? extends Annotation>,​com.fasterxml.classmate.AnnotationInclusion> getAnnotationInclusionOverrides()
        Description copied from interface: SchemaGeneratorConfig
        Provide the explicit rule overrides of when to include particular annotations (e.g., with or without @Inherited).
        Specified by:
        getAnnotationInclusionOverrides in interface SchemaGeneratorConfig
        Returns:
        annotation inclusion rules for specific annotation types
      • sortProperties

        public int sortProperties​(MemberScope<?,​?> first,
                                  MemberScope<?,​?> second)
        Description copied from interface: SchemaGeneratorConfig
        Implementation of the Comparator.compare(Object, Object) interface method to determine the order of fields and methods in an object's "properties".
        Specified by:
        sortProperties in interface SchemaGeneratorConfig
        Parameters:
        first - first field/method to compare to second
        second - second field/method to compare to first
        Returns:
        a negative/positive integer as the first field/method should be positioned before/after the second respectively
      • getCustomDefinition

        public CustomDefinition getCustomDefinition​(com.fasterxml.classmate.ResolvedType javaType,
                                                    SchemaGenerationContext context,
                                                    CustomDefinitionProviderV2 ignoredDefinitionProvider)
        Description copied from interface: SchemaGeneratorConfig
        Look-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:
        getCustomDefinition in interface SchemaGeneratorConfig
        Parameters:
        javaType - generic type to provide custom definition for
        context - generation context allowing to let the standard generation take over nested parts of the custom definition
        ignoredDefinitionProvider - 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: SchemaGeneratorConfig
        Look-up a declared type's subtypes in order to list those specifically (in an SchemaKeyword.TAG_ANYOF).
        Specified by:
        resolveSubtypes in interface SchemaGeneratorConfig
        Parameters:
        javaType - declared type to look-up subtypes for
        context - generation context (including a reference to the TypeContext for deriving a ResolvedType from a Class)
        Returns:
        subtypes to list as possible alternatives for the declared type (may be empty)
      • isNullable

        public boolean isNullable​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Check whether a field/property is nullable.
        Specified by:
        isNullable in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Check whether a method's return value is nullable.
        Specified by:
        isNullable in interface SchemaGeneratorConfig
        Parameters:
        method - method to check
        Returns:
        whether the method's return value is nullable
      • shouldIgnore

        public boolean shouldIgnore​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Check whether a field/property should be ignored.
        Specified by:
        shouldIgnore in interface SchemaGeneratorConfig
        Parameters:
        field - object's field/property to check
        Returns:
        whether the field/property should be ignored
      • isRequired

        public boolean isRequired​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Check whether a field/property value is required.
        Specified by:
        isRequired in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Check whether a method value is required.
        Specified by:
        isRequired in interface SchemaGeneratorConfig
        Parameters:
        method - method to check
        Returns:
        whether the method value should be required
      • isReadOnly

        public boolean isReadOnly​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Check whether a field/property value is deemed read-only, i.e., may be ignored or rejected when included in a request.
        Specified by:
        isReadOnly in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Check whether a method value is deemed read-only, i.e., may be ignored or rejected when included in a request.
        Specified by:
        isReadOnly in interface SchemaGeneratorConfig
        Parameters:
        method - method to check
        Returns:
        whether the method value should be read-only
      • isWriteOnly

        public boolean isWriteOnly​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Check whether a field/property value is deemed write-only, i.e., is not being returned in responses.
        Specified by:
        isWriteOnly in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Check whether a method value is deemed write-only, i.e., is not being returned in responses.
        Specified by:
        isWriteOnly in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the alternative target types from an object's field/property.
        Specified by:
        resolveTargetTypeOverrides in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the alternative target types from a method's return value.
        Specified by:
        resolveTargetTypeOverrides in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the alternative name in a parent JSON Schema's "properties" from an object's field/property.
        Specified by:
        resolvePropertyNameOverride in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the alternative name in a parent JSON Schema's "properties" from a method's return value.
        Specified by:
        resolvePropertyNameOverride in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "$id" of a context-independent type representation.
        Specified by:
        resolveIdForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "$anchor" of a context-independent type representation.
        Specified by:
        resolveAnchorForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "title" of an object's field/property.
        Specified by:
        resolveTitle in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "title" of a method's return value.
        Specified by:
        resolveTitle in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "title" of a context-independent type representation.
        Specified by:
        resolveTitleForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "description" of an object's field/property.
        Specified by:
        resolveDescription in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "description" of a method's return value.
        Specified by:
        resolveDescription in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "description" of a context-independent type representation.
        Specified by:
        resolveDescriptionForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "default" value of an object's field/property.
        Specified by:
        resolveDefault in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "default" value of a method's return value.
        Specified by:
        resolveDefault in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "default" value of a context-independent type representation.
        Specified by:
        resolveDefaultForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "default" value for
        Returns:
        "default" in a JSON Schema (may be null)
      • resolveDependentRequires

        public List<String> resolveDependentRequires​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Determine the "dependentRequired" list of other properties' names, for which a value is required if the given field is present.
        Specified by:
        resolveDependentRequires in interface SchemaGeneratorConfig
        Parameters:
        field - object's field/property to collect dependent property names for
        Returns:
        "dependentRequired" list in a JSON Schema associated with the targeted field (may be empty)
      • resolveDependentRequires

        public List<String> resolveDependentRequires​(MethodScope method)
        Description copied from interface: SchemaGeneratorConfig
        Determine the "dependentRequired" list of other properties' names, for which a value is required if the given method (or more likely: the field derived from this method) is present.
        Specified by:
        resolveDependentRequires in interface SchemaGeneratorConfig
        Parameters:
        method - method to collect dependent property names for
        Returns:
        "dependentRequired" list in a JSON Schema associated with the targeted method (may be empty)
      • resolveEnum

        public Collection<?> resolveEnum​(FieldScope field)
        Description copied from interface: SchemaGeneratorConfig
        Determine the "enum"/"const" of an object's field/property.
        Specified by:
        resolveEnum in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "enum"/"const" of a method's return value.
        Specified by:
        resolveEnum in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "enum"/"const" of a context-independent type representation.
        Specified by:
        resolveEnumForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "additionalProperties" of an object's field/property.
        Specified by:
        resolveAdditionalProperties in interface SchemaGeneratorConfig
        Parameters:
        field - object's field/property to determine "additionalProperties" value for
        context - 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: SchemaGeneratorConfig
        Determine the "additionalProperties" of a method's return value.
        Specified by:
        resolveAdditionalProperties in interface SchemaGeneratorConfig
        Parameters:
        method - method for whose return value to determine "additionalProperties" value for
        context - 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: SchemaGeneratorConfig
        Determine the "additionalProperties" of a context-independent type representation.
        Specified by:
        resolveAdditionalPropertiesForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "additionalProperties" value for
        context - 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: SchemaGeneratorConfig
        Determine the "patternProperties" of an object's field/property.
        Specified by:
        resolvePatternProperties in interface SchemaGeneratorConfig
        Parameters:
        field - object's field/property to determine "patternProperties" value for
        context - 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: SchemaGeneratorConfig
        Determine the "patternProperties" of a method's return value.
        Specified by:
        resolvePatternProperties in interface SchemaGeneratorConfig
        Parameters:
        method - method for whose return value to determine "patternProperties" value for
        context - 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: SchemaGeneratorConfig
        Determine the "patternProperties" of a context-independent type representation.
        Specified by:
        resolvePatternPropertiesForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "patternProperties" value for
        context - 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: SchemaGeneratorConfig
        Determine the "minLength" of an object's field/property.
        Specified by:
        resolveStringMinLength in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "minLength" of a method's return value.
        Specified by:
        resolveStringMinLength in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "minLength" of a context-independent type representation.
        Specified by:
        resolveStringMinLengthForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "maxLength" of an object's field/property.
        Specified by:
        resolveStringMaxLength in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "maxLength" of a method's return value.
        Specified by:
        resolveStringMaxLength in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "maxLength" of a context-independent type representation.
        Specified by:
        resolveStringMaxLengthForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "format" of an object's field/property.
        Specified by:
        resolveStringFormat in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "format" of a method's return value.
        Specified by:
        resolveStringFormat in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "format" of a context-independent type representation.
        Specified by:
        resolveStringFormatForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "pattern" of an object's field/property.
        Specified by:
        resolveStringPattern in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "pattern" of a method's return value.
        Specified by:
        resolveStringPattern in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "pattern" of a context-independent type representation.
        Specified by:
        resolveStringPatternForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "pattern" value for
        Returns:
        "pattern" in a JSON Schema (may be null)
      • resolveNumberExclusiveMinimumForType

        public BigDecimal resolveNumberExclusiveMinimumForType​(TypeScope scope)
        Description copied from interface: SchemaGeneratorConfig
        Determine the "exclusiveMinimum" of a context-independent type representation.
        Specified by:
        resolveNumberExclusiveMinimumForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "exclusiveMinimum" value for
        Returns:
        "exclusiveMinimum" in a JSON Schema (may be null)
      • resolveNumberExclusiveMaximumForType

        public BigDecimal resolveNumberExclusiveMaximumForType​(TypeScope scope)
        Description copied from interface: SchemaGeneratorConfig
        Determine the "exclusiveMaximum" of a context-independent type representation.
        Specified by:
        resolveNumberExclusiveMaximumForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "exclusiveMaximum" value for
        Returns:
        "exclusiveMaximum" in a JSON Schema (may be null)
      • resolveNumberMultipleOfForType

        public BigDecimal resolveNumberMultipleOfForType​(TypeScope scope)
        Description copied from interface: SchemaGeneratorConfig
        Determine the "multipleOf" of a context-independent type representation.
        Specified by:
        resolveNumberMultipleOfForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "minItems" of an object's field/property.
        Specified by:
        resolveArrayMinItems in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "minItems" of a method's return value.
        Specified by:
        resolveArrayMinItems in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "minItems" of a context-independent type representation.
        Specified by:
        resolveArrayMinItemsForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "maxItems" of an object's field/property.
        Specified by:
        resolveArrayMaxItems in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "maxItems" of a method's return value.
        Specified by:
        resolveArrayMaxItems in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "maxItems" of a context-independent type representation.
        Specified by:
        resolveArrayMaxItemsForType in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "uniqueItems" of an object's field/property.
        Specified by:
        resolveArrayUniqueItems in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "uniqueItems" of a method's return value.
        Specified by:
        resolveArrayUniqueItems in interface SchemaGeneratorConfig
        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: SchemaGeneratorConfig
        Determine the "uniqueItems" of a context-independent type representation.
        Specified by:
        resolveArrayUniqueItemsForType in interface SchemaGeneratorConfig
        Parameters:
        scope - context-independent type representation to determine "uniqueItems" value for
        Returns:
        "uniqueItems" in a JSON Schema (may be null)