From a01ab652f5903b68017006171a5f4e1bba6d739d Mon Sep 17 00:00:00 2001 From: Nadezhda Makarkina Date: Fri, 28 Aug 2015 16:01:24 +0300 Subject: [PATCH] Fixes #1203: scala and junit dependencies have been deleted --- modules/swagger-core/pom.xml | 41 +----------- .../java/io/swagger/ObjectPropertyTest.java | 30 ++++++--- modules/swagger-hibernate-validations/pom.xml | 6 +- modules/swagger-jaxrs/pom.xml | 9 +-- .../test/java/io/swagger/PostParamTest.java | 4 +- .../src/test/java/io/swagger/ReaderTest.java | 2 +- .../java/io/swagger/ResourceTest1343.java | 4 +- .../io/swagger/resources/Resource1343.java | 56 ++++++++-------- modules/swagger-jersey-jaxrs/pom.xml | 10 --- modules/swagger-jersey2-jaxrs/pom.xml | 7 +- modules/swagger-models/pom.xml | 4 +- modules/swagger-mule/pom.xml | 11 ---- pom.xml | 65 ------------------- 13 files changed, 63 insertions(+), 186 deletions(-) diff --git a/modules/swagger-core/pom.xml b/modules/swagger-core/pom.xml index 2d4cac9bb8..c3197b8537 100644 --- a/modules/swagger-core/pom.xml +++ b/modules/swagger-core/pom.xml @@ -66,16 +66,6 @@ org.apache.commons commons-lang3 - - org.scalatest - scalatest_2.10 - test - - - junit - junit - test - org.slf4j slf4j-api @@ -121,27 +111,6 @@ swagger-models ${project.parent.version} - - - com.fasterxml.jackson.module - jackson-module-scala_2.10 - ${jackson-scala-version} - test - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-annotations - - - com.google.guava - guava - - - joda-time joda-time @@ -187,12 +156,6 @@ ${logback-version} provided - - org.scala-lang - scala-library - ${scala-version} - test - javax.validation validation-api @@ -211,8 +174,8 @@ 1.1.0.Final - 0.50 + 0.80 0.0 - 3 + 2 diff --git a/modules/swagger-core/src/test/java/io/swagger/ObjectPropertyTest.java b/modules/swagger-core/src/test/java/io/swagger/ObjectPropertyTest.java index b3f7a4d852..bb5759532c 100644 --- a/modules/swagger-core/src/test/java/io/swagger/ObjectPropertyTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/ObjectPropertyTest.java @@ -2,24 +2,34 @@ import static org.testng.Assert.assertTrue; -import io.swagger.converter.ModelConverters; -import io.swagger.matchers.SerializationMatchers; -import io.swagger.models.*; -import io.swagger.models.properties.*; +import io.swagger.models.ModelImpl; +import io.swagger.models.properties.ObjectProperty; +import io.swagger.models.properties.Property; +import io.swagger.models.properties.StringProperty; import io.swagger.util.Json; -import org.apache.commons.io.IOUtils; import org.testng.annotations.Test; import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.Map; public class ObjectPropertyTest { - @org.junit.Test //(description = "convert a model with object properties") + @Test (description = "convert a model with object properties") public void readModelWithObjectProperty() throws IOException { - String json = "{\n\"properties\": {\n\"id\": {\n\"type\": \"string\"\n},\n\"someObject\": {\n\"type\": \"object\",\n\"properties\": {\n\"innerId\": {\n\"type\": \"string\"\n}\n}\n}\n}\n}"; + String json = "{" + + " \"properties\":{" + + " \"id\":{" + + " \"type\":\"string\"" + + " }," + + " \"someObject\":{" + + " \"type\":\"object\"," + + " \"properties\":{" + + " \"innerId\":{" + + " \"type\":\"string\"" + + " }" + + " }" + + " }" + + " }" + + "}"; ModelImpl model = Json.mapper().readValue(json, ModelImpl.class); diff --git a/modules/swagger-hibernate-validations/pom.xml b/modules/swagger-hibernate-validations/pom.xml index f62f1fd11d..0b3b2771ba 100644 --- a/modules/swagger-hibernate-validations/pom.xml +++ b/modules/swagger-hibernate-validations/pom.xml @@ -88,8 +88,8 @@ 5.1.3.Final - 0.35 - 0.00 - 2 + 0.50 + 0.90 + 0 diff --git a/modules/swagger-jaxrs/pom.xml b/modules/swagger-jaxrs/pom.xml index 4914206f96..f469e8b0fd 100644 --- a/modules/swagger-jaxrs/pom.xml +++ b/modules/swagger-jaxrs/pom.xml @@ -57,11 +57,6 @@ - - junit - junit - test - com.fasterxml.jackson.dataformat jackson-dataformat-yaml @@ -148,8 +143,8 @@ - 0.29 + 0.60 0.00 - 5 + 3 diff --git a/modules/swagger-jaxrs/src/test/java/io/swagger/PostParamTest.java b/modules/swagger-jaxrs/src/test/java/io/swagger/PostParamTest.java index c9da2c40fb..944eca421f 100644 --- a/modules/swagger-jaxrs/src/test/java/io/swagger/PostParamTest.java +++ b/modules/swagger-jaxrs/src/test/java/io/swagger/PostParamTest.java @@ -13,10 +13,10 @@ import io.swagger.resources.PostParamResource; import org.testng.annotations.Test; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; public class PostParamTest { private static final String BODY = "body"; diff --git a/modules/swagger-jaxrs/src/test/java/io/swagger/ReaderTest.java b/modules/swagger-jaxrs/src/test/java/io/swagger/ReaderTest.java index 4a6a6ef711..86ad1fc3d9 100644 --- a/modules/swagger-jaxrs/src/test/java/io/swagger/ReaderTest.java +++ b/modules/swagger-jaxrs/src/test/java/io/swagger/ReaderTest.java @@ -111,7 +111,7 @@ public void scanConsumesProducesValuesWithoutClassLevelAnnotations() { assertEquals(getPut(swagger, "/{id}/value").getProduces().get(0), TEXT_PLAIN); } - @org.junit.Test//(description = "scan class level and field level annotations") + @Test(description = "scan class level and field level annotations") public void scanClassAndFieldLevelAnnotations() { Swagger swagger = getSwagger(ResourceWithKnownInjections.class); diff --git a/modules/swagger-jaxrs/src/test/java/io/swagger/ResourceTest1343.java b/modules/swagger-jaxrs/src/test/java/io/swagger/ResourceTest1343.java index 72a7c6427d..1eb2bc42dd 100644 --- a/modules/swagger-jaxrs/src/test/java/io/swagger/ResourceTest1343.java +++ b/modules/swagger-jaxrs/src/test/java/io/swagger/ResourceTest1343.java @@ -14,9 +14,9 @@ private Swagger getSwagger(Class resource) { return reader.read(resource); } - @org.junit.Test///(description = "scan resource 1343") + @Test(description = "scan resource 1343") public void scanResource1343() { Swagger swagger = getSwagger(Resource1343.class); Json.prettyPrint(swagger); } -} \ No newline at end of file +} diff --git a/modules/swagger-jaxrs/src/test/java/io/swagger/resources/Resource1343.java b/modules/swagger-jaxrs/src/test/java/io/swagger/resources/Resource1343.java index 3a3094fab6..3858a0b490 100644 --- a/modules/swagger-jaxrs/src/test/java/io/swagger/resources/Resource1343.java +++ b/modules/swagger-jaxrs/src/test/java/io/swagger/resources/Resource1343.java @@ -10,40 +10,40 @@ import javax.xml.bind.annotation.XmlRootElement; @Path("/v1") -@Api(value="root") +@Api(value = "root") @XmlRootElement public class Resource1343 { - RestApplication _application = null; + RestApplication _application = null; - @GET - @Path("/{dbkey}") - @ApiOperation(value="Retrieve a database resource") - public DatabaseResource getDatabase(@ApiParam(name="dbkey",value="Database key") @PathParam("dbkey") String dbKey) throws Exception { - return new DatabaseResource(this, dbKey); - } + @GET + @Path("/{dbkey}") + @ApiOperation(value = "Retrieve a database resource") + public DatabaseResource getDatabase(@ApiParam(name = "dbkey", value = "Database key") @PathParam("dbkey") String dbKey) throws Exception { + return new DatabaseResource(this, dbKey); + } - public ComplicatedObject nothing() { - return null; - } + public ComplicatedObject nothing() { + return null; + } - public RestApplication getApplication() { - return _application; - } - - static class RestApplication { - public Integer id; - public String name; - } + public RestApplication getApplication() { + return _application; + } - static class DatabaseResource { - public String databaseName; + static class RestApplication { + public Integer id; + public String name; + } - public DatabaseResource(Object parent, String key) { + static class DatabaseResource { + public String databaseName; + + public DatabaseResource(Object parent, String key) { + + } + } + static class ComplicatedObject { + public Integer id; } - } - - static class ComplicatedObject { - public Integer id; - } -} \ No newline at end of file +} diff --git a/modules/swagger-jersey-jaxrs/pom.xml b/modules/swagger-jersey-jaxrs/pom.xml index affe1ecc54..2d9ec2afd9 100644 --- a/modules/swagger-jersey-jaxrs/pom.xml +++ b/modules/swagger-jersey-jaxrs/pom.xml @@ -56,16 +56,6 @@ - - org.scalatest - scalatest_2.10 - test - - - junit - junit - test - io.swagger swagger-jaxrs diff --git a/modules/swagger-jersey2-jaxrs/pom.xml b/modules/swagger-jersey2-jaxrs/pom.xml index 51e9df212e..86f6c1b6e6 100644 --- a/modules/swagger-jersey2-jaxrs/pom.xml +++ b/modules/swagger-jersey2-jaxrs/pom.xml @@ -60,11 +60,6 @@ javax.servlet servlet-api - - junit - junit - test - io.swagger swagger-jaxrs @@ -100,7 +95,7 @@ - 0.35 + 0.50 0.00 2 diff --git a/modules/swagger-models/pom.xml b/modules/swagger-models/pom.xml index 336e91f43e..bcba20a6c8 100644 --- a/modules/swagger-models/pom.xml +++ b/modules/swagger-models/pom.xml @@ -80,9 +80,9 @@ 1.1.0.Final - 0.00 + 0.07 0.0 - 100 + 40 diff --git a/modules/swagger-mule/pom.xml b/modules/swagger-mule/pom.xml index 850a23c734..49be8ee944 100644 --- a/modules/swagger-mule/pom.xml +++ b/modules/swagger-mule/pom.xml @@ -34,17 +34,6 @@ - - org.scalatest - scalatest_2.10 - test - ${scala-test-version} - - - junit - junit - test - io.swagger swagger-jaxrs diff --git a/pom.xml b/pom.xml index 90ffac7420..c39bb88373 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ - src/main/scala src/main/scripts target/classes target/test-classes @@ -105,44 +104,6 @@ - - net.alchim31.maven - scala-maven-plugin - - - - add-source - compile - testCompile - - - - - - incremental - - - -Xmx384m - - - -target:jvm-1.6 - -deprecation - - - - run-scalatest - org.scalatest.tools.Runner - - -p - ${project.build.testOutputDirectory} - - - -Xmx512m - - - - - org.apache.maven.plugins maven-surefire-plugin @@ -158,7 +119,6 @@ test - none:none org.testng:testng @@ -329,11 +289,6 @@ - - net.alchim31.maven - scala-maven-plugin - ${scala-maven-plugin-version} - org.apache.maven.plugins maven-gpg-plugin @@ -402,9 +357,6 @@ auth - - samples/scala-oauth-authorization-server - @@ -489,18 +441,6 @@ ${commons-lang-version} compile - - org.scalatest - scalatest_2.10 - ${scala-test-version} - test - - - junit - junit - ${junit-version} - test - org.testng testng @@ -558,27 +498,22 @@ 2.2 2.1.5-M2 - 2.10.4 2.3.4 2.5 1.13 2.1 2.4.5 - 2.4.5-1 2.4.5 1.0.1 - 4.8.2 6.9.4 1.9.5 2.18.1 1.0.0 3.2.1 1.6.3 - 2.2.2 8.1.11.v20130520 2.5 - 3.1.5 0.90 0.90 0