v0.17.5
This release is backward binary-compatible with the previous releases from the 0.17.x lineage.
However, the generated code produced by this version is not entirely source-compatible with the previous version.
More info below.
Possible breaking changes
This version introduces changes in how the code is rendered that may result in some breakage in userland. We've
carefully architected the changes to reduce the likelihood of breakage happening.
A number of constructs are now rendered not in the companion object of the generated service, but rather in the companion
object of the reified operation type. These constructs include the error types that get generated by operations.
This change has been performed in order to eliminate the risk of collision between the generated types and some type
members present in the smithy4s.Service
interface. This collision, when it happened, was making the code impossible to
compile.
In order to reduce breakage around the error types (which are likely to be used in userland), we have decided to generate
aliases at the location where they used to live. The generated code should not break source compatibility in the large
majority of usage of Smithy4s.
A small minority of users may have to change how they access the generated constructs they may have depended on. This is unlikely,
as the constructs in question are used internally by interpreters via interfaces that haven't changed, and they are not constructs
that are advertised in our documentation. We only expect some possible breakage in advanced usage performed by a handful of
people.
See:
Behavioural changes
Adjust encoding/decoding HTTP query parameters
Changed the handling of the httpQueryParams
(plural) trait so that possible httpQuery
-annotated fields do not take priority
over it during decoding. This means that httpQueryParams
receive the whole set of query parameters, which may induce duplication
with the value contained by overlapping httpQuery
-annotated fields.
On the encoding side, the behaviour is that httpQuery
fields have priority over httpQueryParams
fields.
This is a more faithful implementation of the spec.
See #827
Improvements
Validate model for codegen after transformations
Adds logic to validate the model after pre-processing model transformations (before the code-generation)
See #821
Support time zones in DATE_TIME
parsing
AWS has changed the Smithy specification of the DATE_TIME
timestamp format to precise that numeric offsets should be handled.
This is now the case.
See #844
Dynamic: Add metadata
method
The currently undocumented dynamic
module has received an improvement allowing to access the metadata
of the loaded models via its platform-agnostic interface.
See #823
Bug fixes
Http4s client body
Empty bodies are now correctly using the built-in withEmptyBody
of Http4s, which correctly removes
the Content-Type
header from the request upon usage. This solves issues when Smithy4s is being called
(or calling) strict clients/servers that check this type of thing.
See #826
Handle NaN and Infinity in AWS JSON codecs
The AWS Json protocols specify that NaN
, Infinity
and -Infinity
are valid values for Double
and Float
types.
This is now handled.
See #822
Better handling of special characters when loading Smithy models from dependencies
A bug was preventing dependencies that would have special characters in their absolute paths to be loaded successfully.
This is now fixed.
See #850
Http4s client: Support Byte
parameters in paths
Byte
fields are now correctly supported when used by an httpLabel
member.
See #819
Library updates
- Update alloy-core, alloy-openapi to 0.1.13 by @scala-steward in #828
- Update alloy-core, alloy-openapi to 0.1.14 by @scala-steward in #843
- Update cats-effect to 3.4.7 by @scala-steward in #817
- Update cats-effect to 3.4.8 by @scala-steward in #830
- Update circe-generic, circe-parser to 0.14.5 by @scala-steward in #849
- Update coursier to 2.1.0-RC6 by @scala-steward in #816
- Update coursier to 2.1.0 by @scala-steward in #860
- Update jsoniter-scala-core to 2.21.2 by @scala-steward in #833
- Update jsoniter-scala-core to 2.21.3 by @scala-steward in #855
- Update sbt-sonatype to 3.9.18 by @scala-steward in #857
- Update smithy-build, smithy-model to 1.28.0 by @scala-steward in #835
- Update smithy-build, smithy-model to 1.28.1 by @scala-steward in #858
- Update swagger-ui-dist to 4.16.1 by @scala-steward in #834
- Update swagger-ui-dist to 4.17.0 by @scala-steward in #845
- Update swagger-ui-dist to 4.17.1 by @scala-steward in #852
- Update swagger-ui-dist to 4.18.1 by @scala-steward in #856
- Bump @docusaurus/core from 2.3.0 to 2.3.1 in /modules/website by @dependabot in #838
- Bump @docusaurus/preset-classic from 2.3.0 to 2.3.1 in /modules/website by @dependabot in #840
Full Changelog: v0.17.4...v0.17.5