Skip to content

Commit a5d859c

Browse files
committed
Add missing circe-generic dependency, and the corresponding circeVersion property.
1 parent d333ee6 commit a5d859c

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

docs/generators/scala-sttp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2020
| ------ | ----------- | ------ | ------- |
2121
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
2222
|apiPackage|package for generated api classes| |null|
23+
|circeVersion|The version of circe library| |0.14.1|
2324
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for JDK 1.8+)</dd></dl>|java8|
2425
|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
2526
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ public class ScalaSttpClientCodegen extends AbstractScalaCodegen implements Code
4949
"joda-time library", "2.10.13");
5050
private static final StringProperty JSON4S_VERSION = new StringProperty("json4sVersion", "The version of json4s " +
5151
"library", "3.6.11");
52-
52+
private static final StringProperty CIRCE_VERSION = new StringProperty("circeVersion", "The version of circe " +
53+
"library", "0.14.1");
5354
private static final JsonLibraryProperty JSON_LIBRARY_PROPERTY = new JsonLibraryProperty();
5455

5556
public static final String DEFAULT_PACKAGE_NAME = "org.openapitools.client";
5657
private static final PackageProperty PACKAGE_PROPERTY = new PackageProperty();
5758

5859
private static final List<Property<?>> properties = Arrays.asList(
5960
STTP_CLIENT_VERSION, USE_SEPARATE_ERROR_CHANNEL, JODA_TIME_VERSION,
60-
JSON4S_VERSION, JSON_LIBRARY_PROPERTY, PACKAGE_PROPERTY);
61+
JSON4S_VERSION, CIRCE_VERSION, JSON_LIBRARY_PROPERTY, PACKAGE_PROPERTY);
6162

6263
private final Logger LOGGER = LoggerFactory.getLogger(ScalaSttpClientCodegen.class);
6364

modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ libraryDependencies ++= Seq(
1515
"org.json4s" %% "json4s-jackson" % "{{json4sVersion}}"
1616
{{/json4s}}
1717
{{#circe}}
18-
"com.softwaremill.sttp.client3" %% "circe" % "{{sttpClientVersion}}"
18+
"com.softwaremill.sttp.client3" %% "circe" % "{{sttpClientVersion}}",
19+
"io.circe" %% "circe-generic" % "{{circeVersion}}"
1920
{{/circe}}
2021
)
2122

0 commit comments

Comments
 (0)