use of fish.payara.microprofile.openapi.impl.model.responses.APIResponseImpl in project Payara by payara.
the class ResponseTest method apiResponseSchemaTest.
@Test
public void apiResponseSchemaTest() {
APIResponses responses = getDocument().getPaths().getPathItem("/test/response/schema").getGET().getResponses();
checkResponseCode(responses, 202, "custom description");
final APIResponseImpl response = (APIResponseImpl) responses.getAPIResponse("202");
checkMediaTypesExist(response, APPLICATION_JSON, APPLICATION_XML);
checkSchemaDescriptions(response, "Custom Response");
}
use of fish.payara.microprofile.openapi.impl.model.responses.APIResponseImpl in project Payara by payara.
the class ResponseTest method inheritedMediaTypeTest.
@Test
public void inheritedMediaTypeTest() {
APIResponses responses = getDocument().getPaths().getPathItem("/test/response").getGET().getResponses();
// Test the 200 response
checkResponseCode(responses, 200, "success");
final APIResponseImpl response = (APIResponseImpl) responses.getAPIResponse("200");
checkMediaTypesExist(response, APPLICATION_JSON, APPLICATION_XML);
checkSchemaDescriptions(response, "hello!");
}
use of fish.payara.microprofile.openapi.impl.model.responses.APIResponseImpl in project Payara by payara.
the class ResponseTest method defaultAsyncVoidSchemaTest.
@Test
public void defaultAsyncVoidSchemaTest() {
APIResponses responses = getDocument().getPaths().getPathItem("/test/response/schema").getHEAD().getResponses();
checkResponseCode(responses, 200);
final APIResponseImpl response = (APIResponseImpl) responses.getAPIResponse("200");
checkMediaTypesExist(response, APPLICATION_JSON, APPLICATION_XML);
checkSchemaDescriptions(response, "Custom Response");
}
use of fish.payara.microprofile.openapi.impl.model.responses.APIResponseImpl in project Payara by payara.
the class ResponseTest method defaultPutVoidSchemaTest.
@Test
public void defaultPutVoidSchemaTest() {
APIResponses responses = getDocument().getPaths().getPathItem("/test/response/schema").getPUT().getResponses();
checkResponseCode(responses, 204);
final APIResponseImpl response = (APIResponseImpl) responses.getAPIResponse("204");
checkMediaTypesExist(response, APPLICATION_JSON, APPLICATION_XML);
checkSchemaDescriptions(response, "Custom Response");
}
Aggregations