Package ubic.gemma.rest.swagger.resolver
Class CustomModelResolver
- java.lang.Object
-
- io.swagger.v3.core.jackson.AbstractModelConverter
-
- io.swagger.v3.core.jackson.ModelResolver
-
- ubic.gemma.rest.swagger.resolver.CustomModelResolver
-
- All Implemented Interfaces:
io.swagger.v3.core.converter.ModelConverter
@Component public class CustomModelResolver extends io.swagger.v3.core.jackson.ModelResolver
ResolveArg
parameters' schema. This should always be added last withModelConverters.addConverter(ModelConverter)
to take priority as it addresses a glitch in the originalModelResolver
.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description CustomModelResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ubic.gemma.core.search.SearchService searchService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.swagger.v3.oas.models.media.Schema
resolve(io.swagger.v3.core.converter.AnnotatedType type, io.swagger.v3.core.converter.ModelConverterContext context, Iterator<io.swagger.v3.core.converter.ModelConverter> chain)
protected List<String>
resolveAllowableValues(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema)
Resolves allowed values for theSearchWebService.search(String, TaxonArg, PlatformArg, List, LimitArg, ExcludeArg)
resultTypes argument.protected String
resolveDescription(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema)
protected Map<String,Object>
resolveExtensions(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema)
-
Methods inherited from class io.swagger.v3.core.jackson.ModelResolver
_addEnumProps, _isOptionalType, addRequiredItem, applyBeanValidatorAnnotations, applyBeanValidatorAnnotations, decorateModelName, findJsonValueType, getComposedSchemaReferencedClasses, hasHiddenAnnotation, hiddenByJsonView, ignore, ignore, objectMapper, resolveAccessMode, resolveDefaultValue, resolveDeprecated, resolveDiscriminator, resolveDiscriminatorProperty, resolveExample, resolveExclusiveMaximum, resolveExclusiveMinimum, resolveExtensions, resolveExternalDocumentation, resolveExternalDocumentation, resolveFormat, resolveIgnoredProperties, resolveIgnoredProperties, resolveMaximum, resolveMaxItems, resolveMaxLength, resolveMaxProperties, resolveMinimum, resolveMinItems, resolveMinLength, resolveMinProperties, resolveMultipleOf, resolveNullable, resolvePattern, resolvePatternProperties, resolveReadOnly, resolveRequiredMode, resolveRequiredProperties, resolveSchemaMembers, resolveSchemaMembers, resolveSchemaProperties, resolveTitle, resolveUniqueItems, resolveWrapping, resolveWriteOnly, resolveXml, shouldIgnoreClass
-
-
-
-
Constructor Detail
-
CustomModelResolver
@Autowired public CustomModelResolver(@Qualifier("swaggerObjectMapper") com.fasterxml.jackson.databind.ObjectMapper objectMapper, ubic.gemma.core.search.SearchService searchService)
-
-
Method Detail
-
resolve
public io.swagger.v3.oas.models.media.Schema resolve(io.swagger.v3.core.converter.AnnotatedType type, io.swagger.v3.core.converter.ModelConverterContext context, Iterator<io.swagger.v3.core.converter.ModelConverter> chain)
- Specified by:
resolve
in interfaceio.swagger.v3.core.converter.ModelConverter
- Overrides:
resolve
in classio.swagger.v3.core.jackson.ModelResolver
-
resolveAllowableValues
protected List<String> resolveAllowableValues(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema)
Resolves allowed values for theSearchWebService.search(String, TaxonArg, PlatformArg, List, LimitArg, ExcludeArg)
resultTypes argument.This ensures that the OpenAPI specification exposes all supported search result types in the
SearchService
as allowable values.- Overrides:
resolveAllowableValues
in classio.swagger.v3.core.jackson.ModelResolver
-
resolveDescription
protected String resolveDescription(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema)
- Overrides:
resolveDescription
in classio.swagger.v3.core.jackson.ModelResolver
-
resolveExtensions
protected Map<String,Object> resolveExtensions(com.fasterxml.jackson.databind.introspect.Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema)
- Overrides:
resolveExtensions
in classio.swagger.v3.core.jackson.ModelResolver
-
-