diff --git a/.generator/templates/libraries/rest-assured/api.mustache b/.generator/templates/libraries/rest-assured/api.mustache index 1d1a5d9ae54..4e784645989 100644 --- a/.generator/templates/libraries/rest-assured/api.mustache +++ b/.generator/templates/libraries/rest-assured/api.mustache @@ -30,11 +30,8 @@ public class {{classname}} { private RequestSpecBuilder reqSpec; - private JSON json; - private {{classname}}(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - this.json = new JSON(); } public static {{classname}} {{classVarName}}(RequestSpecBuilder reqSpec) { @@ -53,26 +50,6 @@ public class {{classname}} { {{/operation}} {{/operations}} - /** - * Get JSON - * - * @return JSON object - */ - public JSON getJSON() { - return json; - } - - /** - * Set JSON - * - * @param json JSON object - * @return {{classname}} - */ - public {{classname}} setJSON(JSON json) { - this.json = json; - return this; - } - /** * Customise request specification */ @@ -152,7 +129,7 @@ public class {{classname}} { */ public {{{returnType}}} executeAs(Function handler) { Type type = new TypeToken<{{{returnType}}}>(){}.getType(); - return getJSON().deserialize(execute(handler).asString(), type); + return execute(handler).as(type); } {{/returnType}} {{#bodyParams}} @@ -161,7 +138,7 @@ public class {{classname}} { * @param {{paramName}} ({{{dataType}}}) {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} */ public {{operationIdCamelCase}}Oper body({{{dataType}}} {{paramName}}) { - reqSpec.setBody(getJSON().serialize({{paramName}})); + reqSpec.setBody({{paramName}}); return this; } {{/bodyParams}} diff --git a/.generator/templates/libraries/rest-assured/build.gradle.mustache b/.generator/templates/libraries/rest-assured/build.gradle.mustache index fc67b62d13e..54b90483f4c 100644 --- a/.generator/templates/libraries/rest-assured/build.gradle.mustache +++ b/.generator/templates/libraries/rest-assured/build.gradle.mustache @@ -95,7 +95,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.15" - rest_assured_version = "3.0.6" + rest_assured_version = "3.1.0" junit_version = "4.12" gson_version = "2.6.1" gson_fire_version = "1.8.2" diff --git a/.generator/templates/libraries/rest-assured/build.sbt.mustache b/.generator/templates/libraries/rest-assured/build.sbt.mustache index 289345c3a0a..68f3eff08d0 100644 --- a/.generator/templates/libraries/rest-assured/build.sbt.mustache +++ b/.generator/templates/libraries/rest-assured/build.sbt.mustache @@ -10,7 +10,7 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.15", - "io.rest-assured" % "scala-support" % "3.0.6", + "io.rest-assured" % "scala-support" % "3.1.0", "com.google.code.gson" % "gson" % "2.6.1", "io.gsonfire" % "gson-fire" % "1.8.2" % "compile", {{#joda}} diff --git a/.generator/templates/libraries/rest-assured/pom.mustache b/.generator/templates/libraries/rest-assured/pom.mustache index 80f043340c2..1d0c1711389 100644 --- a/.generator/templates/libraries/rest-assured/pom.mustache +++ b/.generator/templates/libraries/rest-assured/pom.mustache @@ -246,7 +246,7 @@ UTF-8 1.5.15 - 3.0.6 + 3.1.0 2.6.1 1.8.2 1.0.0