Skip to content

v0.17.5

Compare
Choose a tag to compare
@kubukoz kubukoz released this 15 Mar 21:50
· 138 commits to series/0.17 since this release
374d3e5

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

Full Changelog: v0.17.4...v0.17.5