Introducing Smithy IDL 2.1
Developer Tools Blog
This article announces Smithy IDL 2.1, which adds three new syntax features to the open-source Interface Definition Language for defining services.
- Inline collection declarations allow lists and maps to be declared directly in member targets using [Target] and {KeyTarget: ValueTarget} syntax
- Tagged string literals (#re, #b, #hex, #timestamp) eliminate double-escaping and improve readability for regex patterns, binary values, and timestamps
- Member index shorthand (1. id: String) provides compact syntax for declaring wire order of structure members using the idx trait
- All features resolve to existing AST constructs, ensuring backward compatibility with IDL 2.0 models
- Adoption is per-file by changing $version to "2.1" at the top of each file
Smithy IDL 2.1 maintains full backward compatibility while providing cleaner, more readable syntax for service definitions across multiple programming languages.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.