reta commented on code in PR #982:
URL: https://github.com/apache/cxf/pull/982#discussion_r945299016
##########
osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java:
##########
@@ -99,6 +112,41 @@ public void testJaxRsPut() throws Exception {
assertStatus(Status.OK, response);
}
+ @Test
+ public void testGetSwaggerUi() {
+ WebTarget swaggerWt = ClientBuilder.newClient().target(SWAGGER_URL)
+ .queryParam("url", "/cxf/jaxrs/openapi.json");
+ Response response = swaggerWt.request().get();
+ String swaggerFileHtml = readResponseAsString(response);
+
+ assertStatus(Status.OK, response);
+ assertTrue(swaggerFileHtml.contains("<html"));
+ assertTrue(swaggerFileHtml.contains("<head>"));
+ assertTrue(swaggerFileHtml.contains("<title>Swagger UI</title>"));
+ assertTrue(swaggerFileHtml.contains("</html>"));
+ }
+
+ @Test
+ public void testGetOpenApiJsonFile() {
+ WebTarget openApiWt =
ClientBuilder.newClient().target(OPEN_API_FILE_URL);
+ Response response = openApiWt.request().get();
+ String openApiJson = readResponseAsString(response);
Review Comment:
```suggestion
String openApiJson = response.readEntity(String.class);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]