use [email protected] as the default contact value for SwaggerFeature; Fix the test assertEquals' param order
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2fffaca8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2fffaca8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2fffaca8 Branch: refs/heads/master Commit: 2fffaca8844f89f7b676169c6dd55f51187c3550 Parents: dc6fe38 Author: Akitoshi Yoshida <[email protected]> Authored: Tue Aug 11 16:59:02 2015 +0200 Committer: Akitoshi Yoshida <[email protected]> Committed: Wed Aug 12 12:08:29 2015 +0200 ---------------------------------------------------------------------- .../cxf/jaxrs/swagger/AbstractSwaggerFeature.java | 2 +- .../AbstractSwaggerServiceDescriptionTest.java | 14 +++++++------- .../cxf/systest/jaxrs/description/swagger2-json.txt | 2 +- .../cxf/systest/jaxrs/description/swagger2-yaml.txt | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/2fffaca8/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java ---------------------------------------------------------------------- diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java index 66b65b8..6dfa001 100644 --- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java +++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java @@ -33,7 +33,7 @@ abstract class AbstractSwaggerFeature extends AbstractFeature { private String basePath; private String title = "Sample REST Application"; private String description = "The Application"; - private String contact = "[email protected]"; + private String contact = "[email protected]"; private String license = "Apache 2.0 License"; private String licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.html"; http://git-wip-us.apache.org/repos/asf/cxf/blob/2fffaca8/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java index 723f680..354c92a 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java @@ -163,9 +163,8 @@ public abstract class AbstractSwaggerServiceDescriptionTest extends AbstractBusC try { final Response r = client.get(); assertEquals(Status.OK.getStatusCode(), r.getStatus()); - + JSONAssert.assertEquals( - IOUtils.readStringFromStream((InputStream)r.getEntity()), Json.createObjectBuilder() .add("apiVersion", "1.0.0") .add("swaggerVersion", "1.2") @@ -178,10 +177,11 @@ public abstract class AbstractSwaggerServiceDescriptionTest extends AbstractBusC .add("info", Json.createObjectBuilder() .add("title", "Sample REST Application") .add("description", "The Application") - .add("contact", "[email protected]") + .add("contact", "[email protected]") .add("license", "Apache 2.0 License") .add("licenseUrl", "http://www.apache.org/licenses/LICENSE-2.0.html") - ).build().toString(), false); + ).build().toString(), + IOUtils.readStringFromStream((InputStream)r.getEntity()), false); } finally { client.close(); } @@ -194,9 +194,8 @@ public abstract class AbstractSwaggerServiceDescriptionTest extends AbstractBusC try { final Response r = client.get(); assertEquals(Status.OK.getStatusCode(), r.getStatus()); - + JSONAssert.assertEquals( - IOUtils.readStringFromStream((InputStream)r.getEntity()), Json.createObjectBuilder() .add("apiVersion", "1.0.0") .add("swaggerVersion", "1.2") @@ -211,7 +210,8 @@ public abstract class AbstractSwaggerServiceDescriptionTest extends AbstractBusC .add(Json.createObjectBuilder() .add("path", "/bookstore") .add("operations", Json.createArrayBuilder().add(GET_METHOD_SPEC)))) - .add("models", BOOK_MODEL_SPEC).build().toString(), false); + .add("models", BOOK_MODEL_SPEC).build().toString(), + IOUtils.readStringFromStream((InputStream)r.getEntity()), false); } finally { client.close(); } http://git-wip-us.apache.org/repos/asf/cxf/blob/2fffaca8/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt index 299fcdd..cba1c72 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-json.txt @@ -2,7 +2,7 @@ "info":{"description":"The Application", "version":"1.0.0", "title":"Sample REST Application", - "contact":{"name":"[email protected]"}, + "contact":{"name":"[email protected]"}, "license":{"name":"Apache 2.0 License", "url":"http://www.apache.org/licenses/LICENSE-2.0.html"}}, "host":"localhost", http://git-wip-us.apache.org/repos/asf/cxf/blob/2fffaca8/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt index c007f85..5f95ae9 100644 --- a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt +++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/description/swagger2-yaml.txt @@ -5,7 +5,7 @@ info: version: "1.0.0" title: "Sample REST Application" contact: - name: "[email protected]" + name: "[email protected]" license: name: "Apache 2.0 License" url: "http://www.apache.org/licenses/LICENSE-2.0.html"
