Package io.vertx.openapi.validation
Interface ValidatableResponse
-
public interface ValidatableResponse
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ValidatableResponse
create(int statusCode)
Creates a newValidatableResponse
object based on the passed parameters.static ValidatableResponse
create(int statusCode, Buffer body, String contentType)
Creates a newValidatableResponse
object based on the passed parameters.static ValidatableResponse
create(int statusCode, Map<String,String> headers)
Creates a newValidatableResponse
object based on the passed parameters.static ValidatableResponse
create(int statusCode, Map<String,String> headers, Buffer body, String contentType)
Creates a newValidatableResponse
object based on the passed parameters.ResponseParameter
getBody()
String
getContentType()
Map<String,ResponseParameter>
getHeaders()
int
getStatusCode()
-
-
-
Method Detail
-
create
static ValidatableResponse create(int statusCode)
Creates a newValidatableResponse
object based on the passed parameters.- Parameters:
statusCode
- The related status code- Returns:
- a
ValidatableResponse
object
-
create
static ValidatableResponse create(int statusCode, Map<String,String> headers)
Creates a newValidatableResponse
object based on the passed parameters.- Parameters:
statusCode
- The related status codeheaders
- The related headers- Returns:
- a
ValidatableResponse
object
-
create
static ValidatableResponse create(int statusCode, Buffer body, String contentType)
Creates a newValidatableResponse
object based on the passed parameters.- Parameters:
statusCode
- The related status codebody
- The related bodycontentType
- The related content type- Returns:
- a
ValidatableResponse
object - Throws:
IllegalArgumentException
- in case body is passed without contentType.
-
create
static ValidatableResponse create(int statusCode, Map<String,String> headers, Buffer body, String contentType)
Creates a newValidatableResponse
object based on the passed parameters.- Parameters:
statusCode
- The related status codeheaders
- The related headersbody
- The related bodycontentType
- The related content type- Returns:
- a
ValidatableResponse
object - Throws:
IllegalArgumentException
- in case body is passed without contentType.
-
getHeaders
Map<String,ResponseParameter> getHeaders()
- Returns:
- the header parameters.
-
getBody
ResponseParameter getBody()
- Returns:
- the body.
-
getContentType
String getContentType()
-
getStatusCode
int getStatusCode()
-
-