Package io.swagger.codegen.v3.utils
Class ModelUtils
java.lang.Object
io.swagger.codegen.v3.utils.ModelUtils
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic io.swagger.v3.oas.models.Operation[]createOperationArray(io.swagger.v3.oas.models.PathItem pathItem) static StringfindCommonPrefixOfVars(List<Object> vars) Returns the common prefix of variables for enum namingstatic CodegenModelgetModelByName(String name, Map<String, Object> models) Searches for the model by name in the map of models and returns itstatic voidprocessCodegenModels(Map<String, CodegenModel> allModels) static voidprocessModelEnums(Map<String, Object> objs) static StringtoEnumVarName(String value) static voidUpdate codegen property's enum by adding "enumVars" (with name and value) 
- 
Constructor Details
- 
ModelUtils
public ModelUtils() 
 - 
 - 
Method Details
- 
getModelByName
Searches for the model by name in the map of models and returns it- Parameters:
 name- Name of the modelmodels- Map of models- Returns:
 - model
 
 - 
createOperationArray
public static io.swagger.v3.oas.models.Operation[] createOperationArray(io.swagger.v3.oas.models.PathItem pathItem)  - 
processCodegenModels
 - 
processModelEnums
 - 
findCommonPrefixOfVars
Returns the common prefix of variables for enum naming- Parameters:
 vars- List of variable names- Returns:
 - the common prefix for naming
 
 - 
updateCodegenPropertyEnum
Update codegen property's enum by adding "enumVars" (with name and value)- Parameters:
 var- list of CodegenProperty
 - 
toEnumVarName
 
 -