This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new d94cb21 Updating SwaggerToOpenApi conversion test to request
swagger.jsin immediately after openapi.json
d94cb21 is described below
commit d94cb21921b03e21a89db601e653ff92b19fecdd
Author: Sergey Beryozkin <[email protected]>
AuthorDate: Wed Dec 27 12:58:28 2017 +0000
Updating SwaggerToOpenApi conversion test to request swagger.jsin
immediately after openapi.json
---
.../description/AbstractSwagger2ServiceDescriptionTest.java | 11 +++++++----
.../jaxrs/description/SwaggerToOpenApiConversionTest.java | 8 ++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
index ea07e36..28e2ed4 100644
---
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
+++
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
@@ -133,8 +133,13 @@ public abstract class
AbstractSwagger2ServiceDescriptionTest extends AbstractBus
protected void doTestApiListingIsProperlyReturnedJSON() throws Exception {
doTestApiListingIsProperlyReturnedJSON(false);
}
- protected void doTestApiListingIsProperlyReturnedJSON(boolean
useXForwarded) throws Exception {
- final WebClient client = createWebClient("/swagger.json");
+ protected void doTestApiListingIsProperlyReturnedJSON(boolean
useXForwarded) throws Exception {
+
doTestApiListingIsProperlyReturnedJSON(createWebClient("/swagger.json"),
+ useXForwarded);
+ checkUiResource();
+ }
+ protected static void doTestApiListingIsProperlyReturnedJSON(final
WebClient client,
+ boolean
useXForwarded) throws Exception {
if (useXForwarded) {
client.header("USE_XFORWARDED", true);
}
@@ -184,8 +189,6 @@ public abstract class
AbstractSwagger2ServiceDescriptionTest extends AbstractBus
} finally {
client.close();
}
-
- checkUiResource();
}
@Test
diff --git
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/SwaggerToOpenApiConversionTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/SwaggerToOpenApiConversionTest.java
index af18a66..712b1da 100644
---
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/SwaggerToOpenApiConversionTest.java
+++
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/SwaggerToOpenApiConversionTest.java
@@ -153,6 +153,9 @@ public class SwaggerToOpenApiConversionTest extends
AbstractBusClientServerTestB
assertEquals(1, schemas.size());
JsonMapObject secSchemes = comps.getJsonMapProperty("securitySchemes");
assertEquals(1, secSchemes.size());
+
+ // Finally check swagger.json can still be generated.
+ doTestSwagger2JSON();
}
private void verifyBookStoreGet(JsonMapObject bookstore) {
JsonMapObject bookstoreGet = bookstore.getJsonMapProperty("get");
@@ -259,4 +262,9 @@ public class SwaggerToOpenApiConversionTest extends
AbstractBusClientServerTestB
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
return wc;
}
+
+ private void doTestSwagger2JSON() throws Exception {
+ final WebClient client = createWebClient("/swagger.json");
+
AbstractSwagger2ServiceDescriptionTest.doTestApiListingIsProperlyReturnedJSON(client,
false);
+ }
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].