diff --git a/pom.xml b/pom.xml index 27bab2b5..10303828 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ swagger-inflector jar swagger-inflector - 1.0.10 + 1.0.11-SNAPSHOT https://github.com/swagger-api/swagger-inflector scm:git:git@github.com:swagger-api/swagger-inflector.git @@ -296,6 +296,20 @@ io.swagger swagger-jersey2-jaxrs ${swagger-core-version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + + io.swagger @@ -391,15 +405,31 @@ ${commons-io-version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson.version} + com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.4.6 + ${jackson.version} com.fasterxml.jackson.jaxrs jackson-jaxrs-xml-provider - 2.4.6 + ${jackson.version} org.mockito @@ -425,7 +455,8 @@ 1.5.10 - 1.0.22 + 1.0.24-SNAPSHOT + 2.7.8 2.2 1.2 9.2.9.v20150224 diff --git a/src/test/java/io/swagger/test/examples/ExampleBuilderTest.java b/src/test/java/io/swagger/test/examples/ExampleBuilderTest.java index 1a67294e..2a6329be 100644 --- a/src/test/java/io/swagger/test/examples/ExampleBuilderTest.java +++ b/src/test/java/io/swagger/test/examples/ExampleBuilderTest.java @@ -397,8 +397,8 @@ public void testIssue126Inline() throws Exception { assertEquals(Json.pretty(rep), "{\n" + " \"id\" : 999,\n" + " \"inline\" : {\n" + - " \"last\" : \"string\",\n" + - " \"first\" : \"string\"\n" + + " \"first\" : \"string\",\n" + + " \"last\" : \"string\"\n" + " }\n" + "}"); } diff --git a/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java b/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java index de72a628..188aec96 100644 --- a/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java +++ b/src/test/java/io/swagger/test/integration/responses/SchemaResponseIT.java @@ -76,7 +76,7 @@ public void testIssue130() throws Exception { String response = client.invokeAPI("/issue-130", "GET", new HashMap(), body, new HashMap(), null, null, "application/json", new String[0]); - assertEquals(response, "{\"anIntegerArray\":[99],\"aStringArray\":[\"a string value\"]}"); + assertEquals(response, "{\"aStringArray\":[\"a string value\"],\"anIntegerArray\":[99]}"); } @Test diff --git a/src/test/java/io/swagger/test/validators/NumericValidatorTest.java b/src/test/java/io/swagger/test/validators/NumericValidatorTest.java index 1bd34af3..58938304 100644 --- a/src/test/java/io/swagger/test/validators/NumericValidatorTest.java +++ b/src/test/java/io/swagger/test/validators/NumericValidatorTest.java @@ -163,8 +163,8 @@ public void testInvalidIntegerEnum() throws Exception { public void testValidLongEnum() throws Exception { QueryParameter parameter = new QueryParameter() .name("test") - ._enum(Arrays.asList("1", "2", "3")) - .property(new LongProperty()); + .property(new LongProperty()) + ._enum(Arrays.asList("1", "2", "3")); InputConverter.getInstance().validate(new Long(3), parameter); } @@ -173,8 +173,8 @@ public void testValidLongEnum() throws Exception { public void testInvalidLongEnum() throws Exception { QueryParameter parameter = new QueryParameter() .name("test") - ._enum(Arrays.asList("1", "2", "3")) - .property(new LongProperty()); + .property(new LongProperty()) + ._enum(Arrays.asList("1", "2", "3")); InputConverter.getInstance().validate(new Long(4), parameter); } @@ -183,11 +183,11 @@ public void testInvalidLongEnum() throws Exception { public void testValidDoubleEnum() throws Exception { QueryParameter parameter = new QueryParameter() .name("test") + .property(new DoubleProperty()) ._enum(Arrays.asList( new Double(1).toString(), new Double(2).toString(), - new Double(3).toString())) - .property(new DoubleProperty()); + new Double(3).toString())); InputConverter.getInstance().validate(new Double(3), parameter); } @@ -196,11 +196,11 @@ public void testValidDoubleEnum() throws Exception { public void testInvalidDoubleEnum() throws Exception { QueryParameter parameter = new QueryParameter() .name("test") + .property(new DoubleProperty()) ._enum(Arrays.asList( new Double(1).toString(), new Double(2).toString(), - new Double(3).toString())) - .property(new DoubleProperty()); + new Double(3).toString())); InputConverter.getInstance().validate(new Double(4), parameter); }