Package io.vertx.openapi.contract
Interface MediaType
-
- All Superinterfaces:
OpenAPIObject
public interface MediaType extends OpenAPIObject
This interface represents the most important attributes of an OpenAPI Operation.
Operation V3.1
Operation V3.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
APPLICATION_HAL_JSON
static String
APPLICATION_JSON
static String
APPLICATION_JSON_UTF8
static String
APPLICATION_OCTET_STREAM
static String
MULTIPART_FORM_DATA
static List<String>
SUPPORTED_MEDIA_TYPES
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getIdentifier()
JsonSchema
getSchema()
This method returns the schema defined in the media type.static boolean
isMediaTypeSupported(String type)
-
Methods inherited from interface io.vertx.openapi.contract.OpenAPIObject
getExtensions, getOpenAPIModel
-
-
-
-
Field Detail
-
APPLICATION_JSON
static final String APPLICATION_JSON
- See Also:
- Constant Field Values
-
APPLICATION_JSON_UTF8
static final String APPLICATION_JSON_UTF8
- See Also:
- Constant Field Values
-
MULTIPART_FORM_DATA
static final String MULTIPART_FORM_DATA
- See Also:
- Constant Field Values
-
APPLICATION_HAL_JSON
static final String APPLICATION_HAL_JSON
- See Also:
- Constant Field Values
-
APPLICATION_OCTET_STREAM
static final String APPLICATION_OCTET_STREAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
isMediaTypeSupported
static boolean isMediaTypeSupported(String type)
-
getSchema
JsonSchema getSchema()
This method returns the schema defined in the media type. In OpenAPI 3.1 it is allowed to define an empty media type model. In this case the method returns null.- Returns:
- the schema defined in the media type model, or null in case no media type model was defined.
-
getIdentifier
String getIdentifier()
- Returns:
- the identifier like application/json
-
-