A collection of commonly used Smithy shapes.
Alloy is smithy library that contains traits and protocols that are not currently provided by the smithy standard library. Alloy can be seen as a companion library to the smithy standard library (smithy.api
).
The goals of alloy are :
- provide traits aiming at expressing protobuf/gRPC semantics in smithy
- provide traits allowing to capture patterns and constraints that are common in the industry (some related to http APIs, some more general)
The core alloy library, containing shapes and validators, is published to Maven Central at the following coordinates.
com.disneystreaming.alloy:alloy-core:x.y.z
It contains, in particular, traits and validators associated to the following aspects :
Alloy provides a number of constraint and behavioural traits that may be leverage by tooling and protocols.
Alloy defines a number of behavioural traits that can be leveraged by protocols to tweak serialisation. In particular for the following formats :
Alloy defines two protocols :
Alloy provides a suite of protocol tests that utilise the [AWS HTTP Protocol Compliance Test Module]("https://smithy.io/2.0/additional-specs/http-protocol-compliance-tests.html. These tests accompany the specification of the alloy#simpleRestJson
protocol, allowing implementations of that protocol to build confidence that the implemented behaviour is correct as per the specification.
These tests are available on maven central at the following coordinates :
com.disneystreaming.alloy:alloy-protocol-tests:x.y.z
> ./mill __.publishLocal
> ./mill __.test