v0.18.4
This release fixes a bunch of bugs and introduces some minor semantic changes. Make sure to review them!
What's Changed
Update meaning of required
in both codegen and runtime by @Baccata in #1301
Adjusts the behavior of required fields with defaults. Most importantly, it changes the behavior when the following conditions are all true:
@required
is present on a member@default
(or=
shorthand) is present on that member- the runtime value matches the default
e.g. @required s: String = "foo"
with a runtime value of "foo"
.
In past releases, JSON codecs would not write such fields when serializing your data, unless configured to do so with the withExplicitDefaultsEncoding
option. Starting with this release, @required
fields will always be serialized in JSON, Documents and XML (as well as any other codecs that use getUnlessDefault
or foreachUnlessDefault
).
This isn't yet fixed in AWS ec2Query codecs. A fix is in the works.
Additional changelog information
Changes the behaviour of Field#getUnlessDefault
and Field#foreachUnlessDefault
to always take the value into consideration when the smithy.api#required
trait is present on the field. This leads to field values being always serialised even when their values match their defaults, as this abides by least-surprise-principle.
Fix LSP rendering of the repository by @daddykotex in #1293
Fixes sbt's and mill's rendering of Maven repositories in smithy4sUpdateLSPConfig
and smithy4s.codegen.LSP/updateConfig
, respectively.
Avoid duplicate repos/deps/imports in the smithy-build.json by @daddykotex in #1299
In some cases, it was possible that using the LSP config tasks in sbt/mill would result in a repository appearing on the list more than once. This fix removes such duplication.
AwsCredentialsProvider should allow Instance Metadata Service base URI to be overridden using environment variable by @bpholt in #1306
Adds the ability to configure the base URI of the AWS Metadata Service with the AWS_EC2_METADATA_SERVICE_ENDPOINT
variable, which is consistent with some official AWS SDKs.
Escape astrisks following slashes in documentation by @bpholt in #1304
Add support for Unit primitives when unfolding typed nodes by @denisrosca in #1325
Fixes an issue (#1297) in which Unit values couldn't be rendered in Smithy traits.
- fix: Do not evaluate traits of traits members recursively by @ghostbuster91 in #1305
Fixes an issue (#1296) in which the code generator would fail with a stack overflow when rendering some recursive traits.
Library updates and internal changes
- Update os-lib to 0.9.2 by @scala-steward in #1288
- Update fs2-core, fs2-io to 3.9.3 by @scala-steward in #1291
- Update PULL_REQUEST_TEMPLATE.md for checkboxes by @daddykotex in #1294
- Update smithy-build, smithy-model to 1.41.0 by @scala-steward in #1292
- Update http4s-circe, http4s-client, ... to 0.23.24 by @scala-steward in #1298
- Update smithy-build, smithy-model to 1.41.1 by @scala-steward in #1303
- Update sbt-sonatype to 3.10.0 by @scala-steward in #1302
- Update sbt-bloop to 1.5.12 by @scala-steward in #1309
- Update coursier to 2.1.8 by @scala-steward in #1311
- Update mill-main, mill-main-api, ... to 0.11.6 by @scala-steward in #1310
- Update swagger-ui-dist to 5.9.4 by @scala-steward in #1314
- Update webjars-locator to 0.50 by @scala-steward in #1313
- Update sbt-bloop to 1.5.13 by @scala-steward in #1322
- Update jsoniter-scala-core, ... to 2.25.0 by @scala-steward in #1318
New Contributors
Full Changelog: v0.18.3...v0.18.4