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 modelvoidregisterType(java.lang.String typeName, java.lang.String typeId)Add model name as is without adjustingvoidregisterUniqueType(java.lang.String typeName, java.lang.String typeId)Register model name to keep it uniquevoidsetEqualityFor(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:UniqueTypeNameAdapterProvides information about model names- Specified by:
getNamesin 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:UniqueTypeNameAdapterReturns type for the model- Specified by:
getTypeNamein 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:UniqueTypeNameAdapterAdd model name as is without adjusting- Specified by:
registerTypein 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:UniqueTypeNameAdapterRegister model name to keep it unique- Specified by:
registerUniqueTypein 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:UniqueTypeNameAdapterSets equality of two models to make sure, that models will be treated as one- Specified by:
setEqualityForin interfaceUniqueTypeNameAdapter- Parameters:
typeIdOf- - id of current model typetypeIdTo- - id of existing model type
-
-