Class ModelResolver

    • Field Detail

      • NOT_NULL_ANNOTATIONS

        public static List<String> NOT_NULL_ANNOTATIONS
      • SET_PROPERTY_OF_COMPOSED_MODEL_AS_SIBLING

        public static final String SET_PROPERTY_OF_COMPOSED_MODEL_AS_SIBLING
        See Also:
        Constant Field Values
      • composedModelPropertiesAsSibling

        public static boolean composedModelPropertiesAsSibling
      • enumsAsRef

        public static boolean enumsAsRef
        Allows all enums to be resolved as a reference to a scheme added to the components section.
    • Constructor Detail

      • ModelResolver

        public ModelResolver​(com.fasterxml.jackson.databind.ObjectMapper mapper)
      • ModelResolver

        public ModelResolver​(com.fasterxml.jackson.databind.ObjectMapper mapper,
                             TypeNameResolver typeNameResolver)
    • Method Detail

      • objectMapper

        public com.fasterxml.jackson.databind.ObjectMapper objectMapper()
      • findJsonValueType

        protected Type findJsonValueType​(com.fasterxml.jackson.databind.BeanDescription beanDesc)
      • _isOptionalType

        protected boolean _isOptionalType​(com.fasterxml.jackson.databind.JavaType propType)
      • _addEnumProps

        protected void _addEnumProps​(Class<?> propClass,
                                     Schema property)
        Adds each enum property value to the model schema
        Parameters:
        propClass - the enum class for which to add properties
        property - the schema to add properties to
      • ignore

        protected boolean ignore​(com.fasterxml.jackson.databind.introspect.Annotated member,
                                 XmlAccessorType xmlAccessorTypeAnnotation,
                                 String propName,
                                 Set<String> propertiesToIgnore)
      • hasHiddenAnnotation

        protected boolean hasHiddenAnnotation​(com.fasterxml.jackson.databind.introspect.Annotated annotated)
      • ignore

        protected boolean ignore​(com.fasterxml.jackson.databind.introspect.Annotated member,
                                 XmlAccessorType xmlAccessorTypeAnnotation,
                                 String propName,
                                 Set<String> propertiesToIgnore,
                                 com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef)
      • applyBeanValidatorAnnotations

        protected void applyBeanValidatorAnnotations​(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef,
                                                     Schema property,
                                                     Annotation[] annotations,
                                                     Schema parent,
                                                     boolean applyNotNullAnnotations)
      • applyBeanValidatorAnnotations

        protected void applyBeanValidatorAnnotations​(Schema property,
                                                     Annotation[] annotations,
                                                     Schema parent,
                                                     boolean applyNotNullAnnotations)
      • getComposedSchemaReferencedClasses

        protected List<Class<?>> getComposedSchemaReferencedClasses​(Class<?> clazz,
                                                                    Annotation[] ctxAnnotations,
                                                                    Schema schemaAnnotation)
      • resolveDescription

        protected String resolveDescription​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                            Annotation[] annotations,
                                            Schema schema)
      • resolveTitle

        protected String resolveTitle​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                      Annotation[] annotations,
                                      Schema schema)
      • resolveFormat

        protected String resolveFormat​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                       Annotation[] annotations,
                                       Schema schema)
      • resolveDependentSchemas

        protected Map<String,​Schema> resolveDependentSchemas​(com.fasterxml.jackson.databind.JavaType a,
                                                                   Annotation[] annotations,
                                                                   ModelConverterContext context,
                                                                   Components components,
                                                                   com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                                   boolean openapi31)
      • resolveDefaultValue

        protected Object resolveDefaultValue​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                             Annotation[] annotations,
                                             Schema schema)
      • resolveExample

        protected Object resolveExample​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                        Annotation[] annotations,
                                        Schema schema)
      • resolveAccessMode

        protected Schema.AccessMode resolveAccessMode​(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef,
                                                      com.fasterxml.jackson.databind.JavaType type,
                                                      Schema schema)
      • resolveReadOnly

        protected Boolean resolveReadOnly​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                          Annotation[] annotations,
                                          Schema schema)
      • resolveNullable

        protected Boolean resolveNullable​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                          Annotation[] annotations,
                                          Schema schema)
      • resolveMultipleOf

        protected BigDecimal resolveMultipleOf​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                               Annotation[] annotations,
                                               Schema schema)
      • resolveMaxLength

        protected Integer resolveMaxLength​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                           Annotation[] annotations,
                                           Schema schema)
      • resolveMinLength

        protected Integer resolveMinLength​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                           Annotation[] annotations,
                                           Schema schema)
      • resolveMinimum

        protected BigDecimal resolveMinimum​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                            Annotation[] annotations,
                                            Schema schema)
      • resolveMaximum

        protected BigDecimal resolveMaximum​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                            Annotation[] annotations,
                                            Schema schema)
      • resolveExclusiveMinimum

        protected Boolean resolveExclusiveMinimum​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                  Annotation[] annotations,
                                                  Schema schema)
      • resolveExclusiveMaximum

        protected Boolean resolveExclusiveMaximum​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                  Annotation[] annotations,
                                                  Schema schema)
      • resolvePattern

        protected String resolvePattern​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                        Annotation[] annotations,
                                        Schema schema)
      • resolveMinProperties

        protected Integer resolveMinProperties​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                               Annotation[] annotations,
                                               Schema schema)
      • resolveMaxProperties

        protected Integer resolveMaxProperties​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                               Annotation[] annotations,
                                               Schema schema)
      • resolveRequiredProperties

        protected List<String> resolveRequiredProperties​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                         Annotation[] annotations,
                                                         Schema schema)
      • resolveWriteOnly

        protected Boolean resolveWriteOnly​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                           Annotation[] annotations,
                                           Schema schema)
      • resolveExternalDocumentation

        protected ExternalDocumentation resolveExternalDocumentation​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                                     Annotation[] annotations,
                                                                     Schema schema)
      • resolveDeprecated

        protected Boolean resolveDeprecated​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                            Annotation[] annotations,
                                            Schema schema)
      • resolveAllowableValues

        protected List<String> resolveAllowableValues​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                      Annotation[] annotations,
                                                      Schema schema)
      • resolveExtensions

        protected Map<String,​Object> resolveExtensions​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                             Annotation[] annotations,
                                                             Schema schema)
      • resolveDiscriminatorProperty

        protected void resolveDiscriminatorProperty​(com.fasterxml.jackson.databind.JavaType type,
                                                    ModelConverterContext context,
                                                    Schema model)
      • resolveXml

        protected XML resolveXml​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                 Annotation[] annotations,
                                 Schema schema)
      • resolveIgnoredProperties

        protected Set<String> resolveIgnoredProperties​(com.fasterxml.jackson.databind.util.Annotations a,
                                                       Annotation[] annotations)
      • resolveIgnoredProperties

        protected Set<String> resolveIgnoredProperties​(Annotation[] annotations)
      • resolveExclusiveMaximumValue

        protected BigDecimal resolveExclusiveMaximumValue​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                          Annotation[] annotations,
                                                          Schema schema)
      • resolveExclusiveMinimumValue

        protected BigDecimal resolveExclusiveMinimumValue​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                          Annotation[] annotations,
                                                          Schema schema)
      • resolveId

        protected String resolveId​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                   Annotation[] annotations,
                                   Schema schema)
      • resolve$schema

        protected String resolve$schema​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                        Annotation[] annotations,
                                        Schema schema)
      • resolve$anchor

        protected String resolve$anchor​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                        Annotation[] annotations,
                                        Schema schema)
      • resolve$comment

        protected String resolve$comment​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                         Annotation[] annotations,
                                         Schema schema)
      • resolve$vocabulary

        protected String resolve$vocabulary​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                            Annotation[] annotations,
                                            Schema schema)
      • resolve$dynamicAnchor

        protected String resolve$dynamicAnchor​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                               Annotation[] annotations,
                                               Schema schema)
      • resolveContentEncoding

        protected String resolveContentEncoding​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                Annotation[] annotations,
                                                Schema schema)
      • resolveContentMediaType

        protected String resolveContentMediaType​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                 Annotation[] annotations,
                                                 Schema schema)
      • resolveConst

        protected String resolveConst​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                      Annotation[] annotations,
                                      Schema schema)
      • resolveDependentRequired

        protected Map<String,​List<String>> resolveDependentRequired​(com.fasterxml.jackson.databind.introspect.Annotated a,
                                                                          Annotation[] annotations,
                                                                          Schema schema)
      • resolveSchemaMembers

        protected void resolveSchemaMembers​(Schema schema,
                                            AnnotatedType annotatedType)
      • resolveSchemaMembers

        protected void resolveSchemaMembers​(Schema schema,
                                            com.fasterxml.jackson.databind.introspect.Annotated a,
                                            Annotation[] annotations,
                                            Schema schemaAnnotation)
      • addRequiredItem

        protected void addRequiredItem​(Schema model,
                                       String propName)
      • shouldIgnoreClass

        protected boolean shouldIgnoreClass​(Type type)
      • decorateModelName

        protected String decorateModelName​(AnnotatedType type,
                                           String originalName)
        Decorate the name based on the JsonView
      • openapi31

        public ModelResolver openapi31​(boolean openapi31)
      • setOpenapi31

        public void setOpenapi31​(boolean openapi31)
      • isObjectSchema

        protected boolean isObjectSchema​(Schema schema)
      • isArraySchema

        protected boolean isArraySchema​(Schema schema)
      • isStringSchema

        protected boolean isStringSchema​(Schema schema)
      • isNumberSchema

        protected boolean isNumberSchema​(Schema schema)