From f9cd80deeda15f8dbdb7689a988d0b9a8bca7f6c Mon Sep 17 00:00:00 2001 From: Sheldon Young Date: Wed, 12 May 2021 06:29:51 -0700 Subject: [PATCH] [scala-sttp] Bump minor versions of libraries, SBT and Scala (#9356) --- docs/generators/scala-sttp.md | 6 +++--- .../codegen/languages/ScalaSttpClientCodegen.java | 6 +++--- .../src/main/resources/scala-sttp/build.sbt.mustache | 4 ++-- .../scala-sttp/project/build.properties.mustache | 3 ++- samples/client/petstore/scala-sttp/build.sbt | 10 +++++----- .../petstore/scala-sttp/project/build.properties | 3 ++- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 5f0c9f7e6ad..77891a59141 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -13,8 +13,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|jodaTimeVersion|The version of joda-time library| |2.10.6| -|json4sVersion|The version of json4s library| |3.6.8| +|jodaTimeVersion|The version of joda-time library| |2.10.10| +|json4sVersion|The version of json4s library| |3.6.11| |jsonLibrary|Json library to use. Possible values are: json4s and circe.| |json4s| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| @@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |null| -|sttpClientVersion|The version of sttp client| |2.2.0| +|sttpClientVersion|The version of sttp client| |2.2.9| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java index 68ae83dc061..18ad2632440 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java @@ -44,15 +44,15 @@ import static org.openapitools.codegen.utils.StringUtils.camelize; public class ScalaSttpClientCodegen extends AbstractScalaCodegen implements CodegenConfig { private static final StringProperty STTP_CLIENT_VERSION = new StringProperty("sttpClientVersion", "The version of " + - "sttp client", "2.2.0"); + "sttp client", "2.2.9"); private static final BooleanProperty USE_SEPARATE_ERROR_CHANNEL = new BooleanProperty("separateErrorChannel", "Whether to return response as " + "F[Either[ResponseError[ErrorType], ReturnType]]] or to flatten " + "response's error raising them through enclosing monad (F[ReturnType]).", true); private static final StringProperty JODA_TIME_VERSION = new StringProperty("jodaTimeVersion", "The version of " + - "joda-time library", "2.10.6"); + "joda-time library", "2.10.10"); private static final StringProperty JSON4S_VERSION = new StringProperty("json4sVersion", "The version of json4s " + - "library", "3.6.8"); + "library", "3.6.11"); private static final StringProperty CIRCE_VERSION = new StringProperty("circeVersion", "The version of circe " + "library", "0.13.0"); private static final JsonLibraryProperty JSON_LIBRARY_PROPERTY = new JsonLibraryProperty(); diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache index a20ba532f44..3072a54368c 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache @@ -2,8 +2,8 @@ version := "{{artifactVersion}}" name := "{{artifactId}}" organization := "{{groupId}}" -scalaVersion := "2.13.2" -crossScalaVersions := Seq(scalaVersion.value, "2.12.10") +scalaVersion := "2.13.5" +crossScalaVersions := Seq(scalaVersion.value, "2.12.13") libraryDependencies ++= Seq( "com.softwaremill.sttp.client" %% "core" % "{{sttpClientVersion}}", diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/project/build.properties.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/project/build.properties.mustache index 654fe70c42c..51e30dcd1b3 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/project/build.properties.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/project/build.properties.mustache @@ -1 +1,2 @@ -sbt.version=1.3.12 +sbt.version=1.5.0 + diff --git a/samples/client/petstore/scala-sttp/build.sbt b/samples/client/petstore/scala-sttp/build.sbt index e7d77cdd2db..1b13385dba1 100644 --- a/samples/client/petstore/scala-sttp/build.sbt +++ b/samples/client/petstore/scala-sttp/build.sbt @@ -2,13 +2,13 @@ version := "1.0.0" name := "scala-sttp-petstore" organization := "org.openapitools" -scalaVersion := "2.13.2" -crossScalaVersions := Seq(scalaVersion.value, "2.12.10") +scalaVersion := "2.13.5" +crossScalaVersions := Seq(scalaVersion.value, "2.12.13") libraryDependencies ++= Seq( - "com.softwaremill.sttp.client" %% "core" % "2.2.0", - "com.softwaremill.sttp.client" %% "json4s" % "2.2.0", - "org.json4s" %% "json4s-jackson" % "3.6.8" + "com.softwaremill.sttp.client" %% "core" % "2.2.9", + "com.softwaremill.sttp.client" %% "json4s" % "2.2.9", + "org.json4s" %% "json4s-jackson" % "3.6.11" ) scalacOptions := Seq( diff --git a/samples/client/petstore/scala-sttp/project/build.properties b/samples/client/petstore/scala-sttp/project/build.properties index 654fe70c42c..51e30dcd1b3 100644 --- a/samples/client/petstore/scala-sttp/project/build.properties +++ b/samples/client/petstore/scala-sttp/project/build.properties @@ -1 +1,2 @@ -sbt.version=1.3.12 +sbt.version=1.5.0 +