Package org.openl.rules.openapi.impl
Class OpenAPITypeUtils
- java.lang.Object
-
- org.openl.rules.openapi.impl.OpenAPITypeUtils
-
public class OpenAPITypeUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static PatternARRAY_MATCHERstatic StringBOOLEANstatic StringBOOLEAN_PRIMITIVEstatic StringDATEstatic StringDEFAULT_RUNTIME_CONTEXTstatic StringDOUBLEstatic StringDOUBLE_PRIMITIVEstatic StringFLOATstatic StringFLOAT_PRIMITIVEstatic StringINTEGERstatic StringINTEGER_PRIMITIVEstatic StringLINK_TO_DEFAULT_RUNTIME_CONTEXTstatic StringLONGstatic StringLONG_PRIMITIVEstatic StringOBJECTprotected static Map<String,TypeInfo>PRIMITIVE_CLASSESstatic TypeInfoRUNTIME_CONTEXT_TYPEstatic StringSCHEMAS_LINKstatic TypeInfoSPREADSHEET_RESULT_TYPEstatic StringSTRINGprotected static Map<String,TypeInfo>WRAPPER_CLASSES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeInfoextractType(OpenAPIRefResolver openAPIRefResolver, io.swagger.v3.oas.models.media.Schema<?> schema, boolean allowPrimitiveTypes)static Map<String,io.swagger.v3.oas.models.media.Schema>getAllProperties(io.swagger.v3.oas.models.media.ComposedSchema cs, io.swagger.v3.oas.models.OpenAPI openAPI)static StringgetArrayClassName(String javaName, int dim)static Map<String,List<String>>getChildrenMap(io.swagger.v3.oas.models.OpenAPI openAPI)static Map<String,io.swagger.v3.oas.models.media.Schema>getFieldsOfChild(io.swagger.v3.oas.models.media.ComposedSchema cs)static StringgetJavaDefaultValue(TypeInfo type)static StringgetParentName(io.swagger.v3.oas.models.media.ComposedSchema composedSchema, io.swagger.v3.oas.models.OpenAPI openAPI)static StringgetSimpleName(String ref)static StringgetSimpleValue(String type)static StringgetSpreadsheetArrayClassName(int dim)static booleanisComplexSchema(OpenAPIRefResolver openAPIRefResolver, io.swagger.v3.oas.models.media.Schema<?> foundSchema)static booleanisPrimitiveType(String type)static booleanisSimpleType(String type)static StringremoveArrayBrackets(String type)
-
-
-
Field Detail
-
SCHEMAS_LINK
public static final String SCHEMAS_LINK
- See Also:
- Constant Field Values
-
DEFAULT_RUNTIME_CONTEXT
public static final String DEFAULT_RUNTIME_CONTEXT
- See Also:
- Constant Field Values
-
LINK_TO_DEFAULT_RUNTIME_CONTEXT
public static final String LINK_TO_DEFAULT_RUNTIME_CONTEXT
- See Also:
- Constant Field Values
-
RUNTIME_CONTEXT_TYPE
public static final TypeInfo RUNTIME_CONTEXT_TYPE
-
SPREADSHEET_RESULT_TYPE
public static final TypeInfo SPREADSHEET_RESULT_TYPE
-
OBJECT
public static final String OBJECT
- See Also:
- Constant Field Values
-
DATE
public static final String DATE
- See Also:
- Constant Field Values
-
BOOLEAN
public static final String BOOLEAN
- See Also:
- Constant Field Values
-
STRING
public static final String STRING
- See Also:
- Constant Field Values
-
INTEGER
public static final String INTEGER
- See Also:
- Constant Field Values
-
LONG
public static final String LONG
- See Also:
- Constant Field Values
-
FLOAT
public static final String FLOAT
- See Also:
- Constant Field Values
-
DOUBLE
public static final String DOUBLE
- See Also:
- Constant Field Values
-
DOUBLE_PRIMITIVE
public static final String DOUBLE_PRIMITIVE
- See Also:
- Constant Field Values
-
FLOAT_PRIMITIVE
public static final String FLOAT_PRIMITIVE
- See Also:
- Constant Field Values
-
BOOLEAN_PRIMITIVE
public static final String BOOLEAN_PRIMITIVE
- See Also:
- Constant Field Values
-
INTEGER_PRIMITIVE
public static final String INTEGER_PRIMITIVE
- See Also:
- Constant Field Values
-
LONG_PRIMITIVE
public static final String LONG_PRIMITIVE
- See Also:
- Constant Field Values
-
ARRAY_MATCHER
public static final Pattern ARRAY_MATCHER
-
-
Method Detail
-
extractType
public static TypeInfo extractType(OpenAPIRefResolver openAPIRefResolver, io.swagger.v3.oas.models.media.Schema<?> schema, boolean allowPrimitiveTypes)
-
isComplexSchema
public static boolean isComplexSchema(OpenAPIRefResolver openAPIRefResolver, io.swagger.v3.oas.models.media.Schema<?> foundSchema)
-
getSpreadsheetArrayClassName
public static String getSpreadsheetArrayClassName(int dim)
-
isSimpleType
public static boolean isSimpleType(String type)
-
isPrimitiveType
public static boolean isPrimitiveType(String type)
-
getParentName
public static String getParentName(io.swagger.v3.oas.models.media.ComposedSchema composedSchema, io.swagger.v3.oas.models.OpenAPI openAPI)
-
getChildrenMap
public static Map<String,List<String>> getChildrenMap(io.swagger.v3.oas.models.OpenAPI openAPI)
-
getFieldsOfChild
public static Map<String,io.swagger.v3.oas.models.media.Schema> getFieldsOfChild(io.swagger.v3.oas.models.media.ComposedSchema cs)
-
getAllProperties
public static Map<String,io.swagger.v3.oas.models.media.Schema> getAllProperties(io.swagger.v3.oas.models.media.ComposedSchema cs, io.swagger.v3.oas.models.OpenAPI openAPI)
-
-