Package io.micronaut.openapi.visitor
Class SchemaUtils
java.lang.Object
io.micronaut.openapi.visitor.SchemaUtils
Some schema util methods.
- Since:
- 4.5.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final io.swagger.v3.oas.models.media.Schema<?>
static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.swagger.v3.oas.models.media.ArraySchema
arraySchema
(io.swagger.v3.oas.models.media.Schema<?> schema) static void
copyOpenApi
(io.swagger.v3.oas.models.OpenAPI to, io.swagger.v3.oas.models.OpenAPI from) Copy information from oneOpenAPI
object to another.static io.swagger.v3.oas.models.Operation
getOperationOnPathItem
(io.swagger.v3.oas.models.PathItem pathItem, io.micronaut.http.HttpMethod httpMethod) static boolean
isEmptySchema
(io.swagger.v3.oas.models.media.Schema<?> schema) static boolean
isIgnoredHeader
(String headerName) static io.swagger.v3.oas.models.responses.ApiResponse
mergeApiResponse
(io.swagger.v3.oas.models.responses.ApiResponse ar1, io.swagger.v3.oas.models.responses.ApiResponse ar2) static io.swagger.v3.oas.models.media.Content
mergeContent
(io.swagger.v3.oas.models.media.Content c1, io.swagger.v3.oas.models.media.Content c2) static io.swagger.v3.oas.models.headers.Header
mergeHeader
(io.swagger.v3.oas.models.headers.Header h1, io.swagger.v3.oas.models.headers.Header h2) static io.swagger.v3.oas.models.links.Link
mergeLink
(io.swagger.v3.oas.models.links.Link l1, io.swagger.v3.oas.models.links.Link l2) static io.swagger.v3.oas.models.Operation
mergeOperations
(io.swagger.v3.oas.models.Operation op1, io.swagger.v3.oas.models.Operation op2) static io.swagger.v3.oas.models.parameters.Parameter
mergeParameter
(io.swagger.v3.oas.models.parameters.Parameter p1, io.swagger.v3.oas.models.parameters.Parameter p2) static io.swagger.v3.oas.models.parameters.RequestBody
mergeRequestBody
(io.swagger.v3.oas.models.parameters.RequestBody rb1, io.swagger.v3.oas.models.parameters.RequestBody rb2) static io.swagger.v3.oas.models.media.Schema<?>
mergeSchema
(io.swagger.v3.oas.models.media.Schema<?> s1, io.swagger.v3.oas.models.media.Schema<?> s2) static String
prependIfMissing
(String str, String prefix) static void
processExtensions
(Map<CharSequence, Object> map, io.micronaut.core.annotation.AnnotationValue<io.swagger.v3.oas.annotations.extensions.Extension> extension) resolveSchemas
(io.swagger.v3.oas.models.OpenAPI openAPI) static String
static void
setOperationOnPathItem
(io.swagger.v3.oas.models.PathItem pathItem, io.micronaut.http.HttpMethod httpMethod, io.swagger.v3.oas.models.Operation operation)
-
Field Details
-
COMPONENTS_CALLBACKS_PREFIX
- See Also:
-
COMPONENTS_SCHEMAS_PREFIX
- See Also:
-
EMPTY_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_SCHEMA -
EMPTY_ARRAY_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_ARRAY_SCHEMA -
EMPTY_BINARY_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_BINARY_SCHEMA -
EMPTY_BOOLEAN_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_BOOLEAN_SCHEMA -
EMPTY_BYTE_ARRAY_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_BYTE_ARRAY_SCHEMA -
EMPTY_COMPOSED_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_COMPOSED_SCHEMA -
EMPTY_DATE_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_DATE_SCHEMA -
EMPTY_DATE_TIME_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_DATE_TIME_SCHEMA -
EMPTY_EMAIL_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_EMAIL_SCHEMA -
EMPTY_FILE_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_FILE_SCHEMA -
EMPTY_INTEGER_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_INTEGER_SCHEMA -
EMPTY_JSON_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_JSON_SCHEMA -
EMPTY_MAP_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_MAP_SCHEMA -
EMPTY_NUMBER_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_NUMBER_SCHEMA -
EMPTY_OBJECT_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_OBJECT_SCHEMA -
EMPTY_PASSWORD_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_PASSWORD_SCHEMA -
EMPTY_STRING_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_STRING_SCHEMA -
EMPTY_UUID_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_UUID_SCHEMA -
EMPTY_SIMPLE_SCHEMA
public static final io.swagger.v3.oas.models.media.Schema<?> EMPTY_SIMPLE_SCHEMA -
TYPE_OBJECT
- See Also:
-
-
Method Details
-
isEmptySchema
public static boolean isEmptySchema(io.swagger.v3.oas.models.media.Schema<?> schema) -
processExtensions
public static void processExtensions(Map<CharSequence, Object> map, io.micronaut.core.annotation.AnnotationValue<io.swagger.v3.oas.annotations.extensions.Extension> extension) -
prependIfMissing
-
resolveSchemas
-
arraySchema
public static io.swagger.v3.oas.models.media.ArraySchema arraySchema(io.swagger.v3.oas.models.media.Schema<?> schema) -
schemaRef
-
getOperationOnPathItem
public static io.swagger.v3.oas.models.Operation getOperationOnPathItem(io.swagger.v3.oas.models.PathItem pathItem, io.micronaut.http.HttpMethod httpMethod) -
setOperationOnPathItem
public static void setOperationOnPathItem(io.swagger.v3.oas.models.PathItem pathItem, io.micronaut.http.HttpMethod httpMethod, io.swagger.v3.oas.models.Operation operation) -
mergeOperations
public static io.swagger.v3.oas.models.Operation mergeOperations(io.swagger.v3.oas.models.Operation op1, io.swagger.v3.oas.models.Operation op2) -
mergeApiResponse
public static io.swagger.v3.oas.models.responses.ApiResponse mergeApiResponse(io.swagger.v3.oas.models.responses.ApiResponse ar1, io.swagger.v3.oas.models.responses.ApiResponse ar2) -
mergeLink
public static io.swagger.v3.oas.models.links.Link mergeLink(io.swagger.v3.oas.models.links.Link l1, io.swagger.v3.oas.models.links.Link l2) -
mergeHeader
public static io.swagger.v3.oas.models.headers.Header mergeHeader(io.swagger.v3.oas.models.headers.Header h1, io.swagger.v3.oas.models.headers.Header h2) -
mergeParameter
public static io.swagger.v3.oas.models.parameters.Parameter mergeParameter(io.swagger.v3.oas.models.parameters.Parameter p1, io.swagger.v3.oas.models.parameters.Parameter p2) -
mergeRequestBody
public static io.swagger.v3.oas.models.parameters.RequestBody mergeRequestBody(io.swagger.v3.oas.models.parameters.RequestBody rb1, io.swagger.v3.oas.models.parameters.RequestBody rb2) -
mergeContent
public static io.swagger.v3.oas.models.media.Content mergeContent(io.swagger.v3.oas.models.media.Content c1, io.swagger.v3.oas.models.media.Content c2) -
mergeSchema
public static io.swagger.v3.oas.models.media.Schema<?> mergeSchema(io.swagger.v3.oas.models.media.Schema<?> s1, io.swagger.v3.oas.models.media.Schema<?> s2) -
copyOpenApi
public static void copyOpenApi(io.swagger.v3.oas.models.OpenAPI to, io.swagger.v3.oas.models.OpenAPI from) Copy information from oneOpenAPI
object to another.- Parameters:
to
- TheOpenAPI
object to copy tofrom
- TheOpenAPI
object to copy from
-
isIgnoredHeader
-