Open
Description
This uber-issue tracks work that has to be done to complete the server's implementation of constraint traits.
- Lay the foundation: builders of builders Builders of builders #1342
- Add support for unions with constrained variants. Builders of builders #1342
- Treat
enum
as a constraint trait instead of failing at deserialization time (depends on Unknown enum variants removed from server #1398). Builders of builders #1342 - Collect constraint violations instead of failing with the first one. #1963
- This is part of RFC: Better Constraint Violations #2040.
- Rust docs for constraint violations. #1964
- Better error messages for constraint violations Error messages for deserialization failures and constraint violations #1379
- Implement
disableDefaultValidation
set totrue
, allowing service owners to map from constraint violations to operation errors. See Add server SDK constraint traits RFC #1199 (comment) for details.- This is explained in more detail in RFC: Custom Validation Exceptions #2053.
- Implement the constraint traits:
-
@length
on collection (list
/set
) shapes. #1965 -
length
on map shapes. Builders of builders #1342 -
@length
on non-streaming blob shapes. #1966 -
length
on string shapes. Builders of builders #1342 -
@pattern
on string shapes. #1967 - Detect uses of unsupported regexes early #2026
-
@range
onbyte
,short
,integer
andlong
shapes. #1968 - Update uses of
SetShape
toListShape
#1670
-
- Should we implement @range on float and double shapes? #2007
- Add support for constraint traits on member shapes (constraint trait precedence). #1969
- Update and merge the RFC Add server SDK constraint traits RFC #1199
- Code-generate
constraints.smithy
#2101 - Follow up on Semantics of constrained blob streams for the server smithy#1389
- Follow up on Semantics of constrained event streams for the server smithy#1388
- Move
BuilderGenerator.kt
(the entire file), together with its tests, tocodegen-client
(and rename it toClientBuilderGenerator
). #1970