Package springfox.documentation.schema
Class TypeNameIndexingAdapter
- java.lang.Object
-
- springfox.documentation.schema.TypeNameIndexingAdapter
-
- All Implemented Interfaces:
UniqueTypeNameAdapter
public class TypeNameIndexingAdapter extends java.lang.Object implements UniqueTypeNameAdapter
-
-
Constructor Summary
Constructors Constructor Description TypeNameIndexingAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getNames()
Provides information about model namesjava.util.Optional<java.lang.String>
getTypeName(java.lang.String typeId)
Returns type for the modelvoid
registerType(java.lang.String typeName, java.lang.String typeId)
Add model name as is without adjustingvoid
registerUniqueType(java.lang.String typeName, java.lang.String typeId)
Register model name to keep it uniquevoid
setEqualityFor(java.lang.String typeIdOf, java.lang.String typeIdTo)
Sets equality of two models to make sure, that models will be treated as one
-
-
-
Method Detail
-
getNames
public java.util.Map<java.lang.String,java.lang.String> getNames()
Description copied from interface:UniqueTypeNameAdapter
Provides information about model names- Specified by:
getNames
in interfaceUniqueTypeNameAdapter
- Returns:
- a map with Models id and name
-
getTypeName
public java.util.Optional<java.lang.String> getTypeName(java.lang.String typeId)
Description copied from interface:UniqueTypeNameAdapter
Returns type for the model- Specified by:
getTypeName
in interfaceUniqueTypeNameAdapter
- Parameters:
typeId
- - id of model type- Returns:
- Optional of a model names
-
registerType
public void registerType(java.lang.String typeName, java.lang.String typeId)
Description copied from interface:UniqueTypeNameAdapter
Add model name as is without adjusting- Specified by:
registerType
in interfaceUniqueTypeNameAdapter
- Parameters:
typeName
- - string representation of the models nametypeId
- - id of model type
-
registerUniqueType
public void registerUniqueType(java.lang.String typeName, java.lang.String typeId)
Description copied from interface:UniqueTypeNameAdapter
Register model name to keep it unique- Specified by:
registerUniqueType
in interfaceUniqueTypeNameAdapter
- Parameters:
typeName
- - string representation of the models nametypeId
- - id of model type
-
setEqualityFor
public void setEqualityFor(java.lang.String typeIdOf, java.lang.String typeIdTo)
Description copied from interface:UniqueTypeNameAdapter
Sets equality of two models to make sure, that models will be treated as one- Specified by:
setEqualityFor
in interfaceUniqueTypeNameAdapter
- Parameters:
typeIdOf
- - id of current model typetypeIdTo
- - id of existing model type
-
-