Skip to content

Releases: disneystreaming/smithy4s

v0.16.2 - more Scala Native support, fix AWS timestamp issue

27 Sep 00:36
e0626b4
Compare
Choose a tag to compare

In this release, we've added support for Scala Native in the http4s integration module, as well as the (still experimental) AWS modules. This is thanks to the work of @armanbilge et al. on bringing the Typelevel world closer to the Native world.

Additionally, a regression in timestamp formatting for AWS has been fixed (#471), so your JVM/JS/Native apps should be able to talk to (a subset of) AWS services again. Give it a try!

What's Changed

Full Changelog: v0.16.1...v0.16.2

v0.16.1: Sharing specs, Mill support & more

16 Sep 18:26
f0ecffb
Compare
Choose a tag to compare

NOTE: Use 0.16.1 not 0.16.0, the latter is a botched release that only contains a subset of the changes.

This release is huge! Thanks to all the contributors.

The 0.16.1 release breaks both source and binary compatibility.

At a high level, here are the changes you can look forward to in the release:

Support for the @httpResponseCode trait - #377

You can mark a member of your output structure with @httpResponseCode and expect smithy to use that value when rendering a http response, on the server, or to fill that value from the response status code, on the client.

Support for sharing specifications across modules (sbt or mill) (similar to how you depend on another module Scala code in sbt with the dependsOn setting) - #432

Multiple people came naturally to this kind of project setup where you have multiple module and you may want to have common code and specification live a given module that your other modules depends on. With this release, it's totally doable. See this page for more information

Mill support - #450

Now your mill modules can also use Smithy4s code generation. See this page for more information.

Decline integration is effect-agnostic - #429

Previous version use CommandIOApp which requires cats.effect. 0.16.1 version will allow you to use the effect system of your choice.

Builder pattern to create your clients - #447

New API looks like:

SimpleRestJsonBuilder(HelloWorldService)
    .client(client)
    .uri(Uri.unsafeFromString("http://localhost:9000"))
    .resource

More details below.

What's Changed

Full Changelog: v0.15.3...v0.16.1

v0.15.3 - bug fixes, customization for default rendering

08 Sep 14:11
024be74
Compare
Choose a tag to compare

This release brings several fixes to bugs we've found in the previous ones. Notable changes:

Allow customizing the rendering of default values (#414)

This adds the ability to change how default values appear in the generated sources. Take a look at the documentation for more!

Fixes to defaults in mixins - #423, #425

Fixes some issues that you could encounter in situations where you're generating code for a structure with default values inherited from a mixin.

Collision detection #412

Fixes some issues with code generation where a name conflicts with the Scala standard library.

Exhaustively capture the codegen input for cache invalidation #438

Helps avoid the issues where codegen wouldn't be triggered after the inputs are changed.

Other changes

Full Changelog: v0.15.2...v0.15.3

v0.15.2 - CLI module, bugfixes, dynamic module improvements

24 Aug 17:34
c9839db
Compare
Choose a tag to compare

This release adds a new module - decline - providing integration with the Decline library. It provides the ability to easily get a command line interface for any service implementation or client.

Additionally, the release fixes a couple bugs like #389, as well as adding support for Smithy 2.0 enum and intEnum shapes in the Dynamic module.

This release enables a previously disabled feature of the http4s clients&servers (as well as other code using the json module's codec support) - encoding intEnum as a JSON number.

Finally, MiMa checks have been enabled, so we'll track binary compatibility more seriously in future releases.

Full changelog

New Contributors

Full Changelog: v0.15.1...v0.15.2

v0.15.1 - Initialization bug fix

19 Aug 03:40
71d70db
Compare
Choose a tag to compare

Following the introduction of refinements a bug slipped in. It's a tricky one that only shows up at runtime, under some conditions. See #383 and related PR for more info.

What's Changed

Full Changelog: v0.15.0...v0.15.1

v0.15.0 : Smithy 2.0 support, custom type refinements

18 Aug 10:26
b96cc5b
Compare
Choose a tag to compare

The 0.15.0 release breaks both source and binary compatibility

This is a very exciting release for us, as it makes Smithy4s compatible with Smithy 2.0

Highlights

Adds support for smithy 2.0, which brings a number of very interesting features. In particular :

  • mixins, which allow to drastically DRY your specifications when multiple shapes share a number of elements
  • defaults, which allow to specify default values for the fields of your structure types
  • enums/int enums, which make enumerations a lot nicer to write/read in smithy

Adds support for custom refinements

This provides a mechanism for the user to plug some datatypes of their own in the generated code. These can be validated against
user-defined rules, via an implicit instance provided by the user (or a third party). Smithy4s forces this customisation to be driven by smithy traits, which allow specifications to retain a formally-indicative nature of the behaviour of APIs. These refinements are wired in all decoding logic exercised by smithy4s, which means they are taken into account whether the data is found in headers, query parameters, path parameters, or bodies of the http requests/responses.

See the documentation for more details.

Better collision avoidance in the rendered code

Some care has been put in the generated code to facilitate collision avoidance between what exists and what is generated, without relying on fully-qualified-names by default. Although there may still be edge cases, this approach means the generated code retains a reasonably pleasant-to-read nature, which we have found to be important to users.

Fixes

  • When the @jsonName trait is used on structure members, potential error messages should expose the correct expectations
  • Fixes an issue that would lead clients to decode error payloads as the wrong error type

What's Changed

Full Changelog: v0.14.2...v0.15.0

v0.14.2: more efficient parsing of json objects/arrays

19 Jul 11:16
75f4242
Compare
Choose a tag to compare

Highlights :

  • More efficient parsing of json objects/arrays. As usual, kudos to @plokhotnyuk for his amazing work on optimising the json parsing.
  • It's now easier to set up smithy4s in other SBT configurations than Compile. See here

What's Changed

Full Changelog: v0.14.1...v0.14.2

v0.14.1: bug fix (swagger-ui)

13 Jul 10:29
ca86b08
Compare
Choose a tag to compare

Fixes a bug that would lead callers to get 404'd on the default swagger-ui path.

What's Changed

Full Changelog: v0.14.0...v0.14.1

v0.14.0: Scala-native support, improvements across the board

12 Jul 12:55
081bc16
Compare
Choose a tag to compare

The 0.14.0 release breaks binary compatibility, as well as source compatibility (in a few places) with the previous versions.

It does however achieves a number of significant improvements across the boards, in terms of user experience, performance and maintainability.

Special thanks to @plokhotnyuk, @schmeedy, @yisraelU, @daddykotex

Highlights

  • The core/json/dynamic modules are now published for scala-native (scala 3 only for the time being)
  • The http4s-swagger-ui module has received an overhaul, in order to avoid relying on a javascript function that presented a security issue, but also to allow for users to easily serve several specifications at the same time.
  • Having union members target the Unit shape now leads to the corresponding type be rendered as a case object in Scala.
  • A mechanism was added for users to be able to opt-in Vector and IndexedSeq Scala types when using smithy list shape.
  • The Timestamp construct was overhauled to unify its modelling across the different platforms, and received a massive performance improvement for parsing/serialising.
  • Modified the SBT plugin to have SBT pre-fetch the artifacts before calling the Smithy4s code-generation, making it more respectful to other settings (such as repository credentials)
  • The smithy4s.schema.Schema construct was reworked to unify the collections under a common abstraction, and the smithy4s.schema.SchemaVisitor construct was also changed to reduce the likelihood of a common mistake related to memoisation of union encoders .

What's Changed

New Contributors

Full Changelog: v0.13.7...v0.14.0

v0.13.7 : fix unused import

27 Jun 10:11
29d1f89
Compare
Choose a tag to compare

Highlights :

  • Fix an issue that would lead to unused imports being rendered when the input of an operation has a collection member from another namespace.
  • Fix a potential resource leak in the EC2/ECS AWS credentials provider

What's Changed

Full Changelog: v0.13.6...v0.13.7