Smithy specification#
This is the specification of Smithy 2.0, an interface definition language and set of tools used to build clients, servers, and other kinds of artifacts through model transformations.
Conventions used in this document#
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. This specification makes use of the Augmented Backus-Naur Form (ABNF) RFC 5234 notation, including the core rules defined in Appendix B of that document.
Please report technical errors and ambiguities in this specification to the Smithy GitHub repository at https://github.com/smithy-lang/smithy. This specification is open source; contributions are welcome.
Examples#
Unless declared otherwise, example Smithy models given in this specification are written using the Smithy interface definition language (IDL) syntax. Complementary JSON AST examples are provided alongside Smithy IDL examples where appropriate.
Table of contents#
- 1. The Smithy model
- 2. Simple types
- 3. Aggregate types
- 4. Service types
- 5. Mixins
- 6. Constraint traits
- 7. Type refinement traits
- 8. Documentation traits
- 9. Behavior traits
- 10. Resource traits
- 11. Authentication traits
- 12. Serialization and Protocol traits
- 13. Streaming
- 14. HTTP bindings
- 15. Endpoint traits
- 16. Selectors
- 17. Model validation
- 18. Smithy IDL
- 19. JSON AST