Package org.springdoc.core.converters
Class AdditionalModelsConverter
java.lang.Object
org.springdoc.core.converters.AdditionalModelsConverter
- All Implemented Interfaces:
io.swagger.v3.core.converter.ModelConverter
public class AdditionalModelsConverter
extends Object
implements io.swagger.v3.core.converter.ModelConverter
The type Additional models converter.
- Author:
- bnasslahsen
-
Constructor Summary
ConstructorDescriptionAdditionalModelsConverter
(ObjectMapperProvider springDocObjectMapper) Instantiates a new Additional models converter. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
disableReplacement
(Class clazz) Disable replacement.static Class
Gets replacement.static void
replaceParameterObjectWithClass
(Class source, Class target) Replace ParameterObject with class.static void
replaceWithClass
(Class source, Class target) Replace with class.static void
replaceWithSchema
(Class source, io.swagger.v3.oas.models.media.Schema target) Replace with schema.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) Resolve schema.
-
Constructor Details
-
AdditionalModelsConverter
Instantiates a new Additional models converter.- Parameters:
springDocObjectMapper
- the spring doc object mapper
-
-
Method Details
-
replaceWithClass
Replace with class.- Parameters:
source
- the sourcetarget
- the target
-
replaceWithSchema
Replace with schema.- Parameters:
source
- the sourcetarget
- the target
-
replaceParameterObjectWithClass
Replace ParameterObject with class.- Parameters:
source
- the sourcetarget
- the target
-
getParameterObjectReplacement
Gets replacement.- Parameters:
clazz
- the clazz- Returns:
- the replacement
-
disableReplacement
Disable replacement.- Parameters:
clazz
- the clazz
-
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) Resolve schema.- Specified by:
resolve
in interfaceio.swagger.v3.core.converter.ModelConverter
- Parameters:
type
- the typecontext
- the contextchain
- the chain- Returns:
- the schema
-