Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle list with @uniqueItems trait in server code generation #1701

Closed
DavidOgunsAWS opened this issue Sep 2, 2022 · 1 comment
Closed

Comments

@DavidOgunsAWS
Copy link
Contributor

Smithy 2.0 introduced the uniqueItems constraint trait for lists and is the recommended type + constraint to replace (now removed from IDL) SetShape. This constraint trait is only expected to be handled with server side request validation, but clients should not care.

Further notes:

  • uniqueItems trait requires the List member type have specific value equality semantics which should align fairly well with Rust types and traits.
  • SetShape class still exists for 1.0 model processing compatibility. SetShape is a subclass of ListShape so handling of ListShape with the uniqueItems trait should (in many cases) satisfy Set handling as well in 1.0 models unless the prior implementation of Sets had further semantics that do not apply to List/uniqueItems.
@DavidOgunsAWS
Copy link
Contributor Author

Closing as duplicate of #1670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant