public class ModelResolver extends AbstractModelConverter implements ModelConverter
| Modifier and Type | Field and Description |
|---|---|
static boolean |
composedModelPropertiesAsSibling |
static boolean |
enumsAsRef
Allows all enums to be resolved as a reference to a scheme added to the components section.
|
static List<String> |
NOT_NULL_ANNOTATIONS |
static String |
SET_PROPERTY_OF_COMPOSED_MODEL_AS_SIBLING |
static String |
SET_PROPERTY_OF_ENUMS_AS_REF |
_intr, _mapper, _resolvedTypeNames, _typeNameResolver| Constructor and Description |
|---|
ModelResolver(com.fasterxml.jackson.databind.ObjectMapper mapper) |
ModelResolver(com.fasterxml.jackson.databind.ObjectMapper mapper,
TypeNameResolver typeNameResolver) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_addEnumProps(Class<?> propClass,
Schema property) |
protected boolean |
_isOptionalType(com.fasterxml.jackson.databind.JavaType propType) |
protected void |
addRequiredItem(Schema model,
String propName) |
protected void |
applyBeanValidatorAnnotations(Schema property,
Annotation[] annotations,
Schema parent) |
protected String |
decorateModelName(AnnotatedType type,
String originalName)
Decorate the name based on the JsonView
|
protected Type |
findJsonValueType(com.fasterxml.jackson.databind.BeanDescription beanDesc) |
protected List<Class<?>> |
getComposedSchemaReferencedClasses(Class<?> clazz,
Annotation[] ctxAnnotations,
Schema schemaAnnotation) |
protected boolean |
hasHiddenAnnotation(com.fasterxml.jackson.databind.introspect.Annotated annotated) |
protected boolean |
hiddenByJsonView(Annotation[] annotations,
AnnotatedType type) |
protected boolean |
ignore(com.fasterxml.jackson.databind.introspect.Annotated member,
XmlAccessorType xmlAccessorTypeAnnotation,
String propName,
Set<String> propertiesToIgnore) |
protected boolean |
ignore(com.fasterxml.jackson.databind.introspect.Annotated member,
XmlAccessorType xmlAccessorTypeAnnotation,
String propName,
Set<String> propertiesToIgnore,
com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef) |
com.fasterxml.jackson.databind.ObjectMapper |
objectMapper() |
Schema |
resolve(AnnotatedType annotatedType,
ModelConverterContext context,
Iterator<ModelConverter> next) |
protected Schema.AccessMode |
resolveAccessMode(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef,
com.fasterxml.jackson.databind.JavaType type,
Schema schema) |
protected List<String> |
resolveAllowableValues(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Object |
resolveDefaultValue(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Boolean |
resolveDeprecated(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected String |
resolveDescription(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Discriminator |
resolveDiscriminator(com.fasterxml.jackson.databind.JavaType type,
ModelConverterContext context) |
protected void |
resolveDiscriminatorProperty(com.fasterxml.jackson.databind.JavaType type,
ModelConverterContext context,
Schema model) |
protected Object |
resolveExample(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Boolean |
resolveExclusiveMaximum(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Boolean |
resolveExclusiveMinimum(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Map<String,Object> |
resolveExtensions(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Map<String,Object> |
resolveExtensions(AnnotatedType a,
ArraySchema arraySchema) |
protected ExternalDocumentation |
resolveExternalDocumentation(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected ExternalDocumentation |
resolveExternalDocumentation(ExternalDocumentation externalDocumentation) |
protected String |
resolveFormat(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Set<String> |
resolveIgnoredProperties(Annotation[] annotations) |
protected Set<String> |
resolveIgnoredProperties(com.fasterxml.jackson.databind.util.Annotations a,
Annotation[] annotations) |
protected BigDecimal |
resolveMaximum(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Integer |
resolveMaxItems(AnnotatedType a,
ArraySchema arraySchema) |
protected Integer |
resolveMaxLength(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Integer |
resolveMaxProperties(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected BigDecimal |
resolveMinimum(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Integer |
resolveMinItems(AnnotatedType a,
ArraySchema arraySchema) |
protected Integer |
resolveMinLength(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Integer |
resolveMinProperties(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected BigDecimal |
resolveMultipleOf(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Boolean |
resolveNullable(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected String |
resolvePattern(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Map<String,Schema> |
resolvePatternProperties(com.fasterxml.jackson.databind.JavaType a,
Annotation[] annotations,
ModelConverterContext context) |
protected Boolean |
resolveReadOnly(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected List<String> |
resolveRequiredProperties(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected void |
resolveSchemaMembers(Schema schema,
com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schemaAnnotation) |
protected void |
resolveSchemaMembers(Schema schema,
AnnotatedType annotatedType) |
protected Map<String,Schema> |
resolveSchemaProperties(com.fasterxml.jackson.databind.JavaType a,
Annotation[] annotations,
ModelConverterContext context) |
protected String |
resolveTitle(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected Boolean |
resolveUniqueItems(AnnotatedType a,
ArraySchema arraySchema) |
protected Schema |
resolveWrapping(com.fasterxml.jackson.databind.JavaType type,
ModelConverterContext context,
Schema model) |
protected Boolean |
resolveWriteOnly(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected XML |
resolveXml(com.fasterxml.jackson.databind.introspect.Annotated a,
Annotation[] annotations,
Schema schema) |
protected boolean |
shouldIgnoreClass(Type type) |
_findTypeName, _isSetType, _subTypeName, _typeName, _typeName, _typeQNamepublic static final String SET_PROPERTY_OF_COMPOSED_MODEL_AS_SIBLING
public static final String SET_PROPERTY_OF_ENUMS_AS_REF
public static boolean composedModelPropertiesAsSibling
public static boolean enumsAsRef
public ModelResolver(com.fasterxml.jackson.databind.ObjectMapper mapper)
public ModelResolver(com.fasterxml.jackson.databind.ObjectMapper mapper,
TypeNameResolver typeNameResolver)
public com.fasterxml.jackson.databind.ObjectMapper objectMapper()
public Schema resolve(AnnotatedType annotatedType, ModelConverterContext context, Iterator<ModelConverter> next)
resolve in interface ModelConverterresolve in class AbstractModelConverternext - the chain of model converters to try if this implementation cannot processprotected Type findJsonValueType(com.fasterxml.jackson.databind.BeanDescription beanDesc)
protected boolean _isOptionalType(com.fasterxml.jackson.databind.JavaType propType)
protected boolean ignore(com.fasterxml.jackson.databind.introspect.Annotated member,
XmlAccessorType xmlAccessorTypeAnnotation,
String propName,
Set<String> propertiesToIgnore)
protected boolean hasHiddenAnnotation(com.fasterxml.jackson.databind.introspect.Annotated annotated)
protected boolean ignore(com.fasterxml.jackson.databind.introspect.Annotated member,
XmlAccessorType xmlAccessorTypeAnnotation,
String propName,
Set<String> propertiesToIgnore,
com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef)
protected void applyBeanValidatorAnnotations(Schema property, Annotation[] annotations, Schema parent)
protected List<Class<?>> getComposedSchemaReferencedClasses(Class<?> clazz, Annotation[] ctxAnnotations, Schema schemaAnnotation)
protected String resolveDescription(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected String resolveTitle(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected String resolveFormat(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Map<String,Schema> resolvePatternProperties(com.fasterxml.jackson.databind.JavaType a, Annotation[] annotations, ModelConverterContext context)
protected Map<String,Schema> resolveSchemaProperties(com.fasterxml.jackson.databind.JavaType a, Annotation[] annotations, ModelConverterContext context)
protected Object resolveDefaultValue(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Object resolveExample(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Schema.AccessMode resolveAccessMode(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition propDef, com.fasterxml.jackson.databind.JavaType type, Schema schema)
protected Boolean resolveReadOnly(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Boolean resolveNullable(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected BigDecimal resolveMultipleOf(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Integer resolveMaxLength(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Integer resolveMinLength(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected BigDecimal resolveMinimum(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected BigDecimal resolveMaximum(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Boolean resolveExclusiveMinimum(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Boolean resolveExclusiveMaximum(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected String resolvePattern(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Integer resolveMinProperties(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Integer resolveMaxProperties(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected List<String> resolveRequiredProperties(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Boolean resolveWriteOnly(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected ExternalDocumentation resolveExternalDocumentation(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected ExternalDocumentation resolveExternalDocumentation(ExternalDocumentation externalDocumentation)
protected Boolean resolveDeprecated(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected List<String> resolveAllowableValues(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Map<String,Object> resolveExtensions(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected void resolveDiscriminatorProperty(com.fasterxml.jackson.databind.JavaType type,
ModelConverterContext context,
Schema model)
protected Schema resolveWrapping(com.fasterxml.jackson.databind.JavaType type, ModelConverterContext context, Schema model)
protected Discriminator resolveDiscriminator(com.fasterxml.jackson.databind.JavaType type, ModelConverterContext context)
protected XML resolveXml(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schema)
protected Set<String> resolveIgnoredProperties(com.fasterxml.jackson.databind.util.Annotations a, Annotation[] annotations)
protected Set<String> resolveIgnoredProperties(Annotation[] annotations)
protected Integer resolveMinItems(AnnotatedType a, ArraySchema arraySchema)
protected Integer resolveMaxItems(AnnotatedType a, ArraySchema arraySchema)
protected Boolean resolveUniqueItems(AnnotatedType a, ArraySchema arraySchema)
protected Map<String,Object> resolveExtensions(AnnotatedType a, ArraySchema arraySchema)
protected void resolveSchemaMembers(Schema schema, AnnotatedType annotatedType)
protected void resolveSchemaMembers(Schema schema, com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, Schema schemaAnnotation)
protected boolean shouldIgnoreClass(Type type)
protected String decorateModelName(AnnotatedType type, String originalName)
protected boolean hiddenByJsonView(Annotation[] annotations, AnnotatedType type)
Copyright © 2022. All rights reserved.