Skip to content

Commit

Permalink
Make uniqueItems trait selector match set shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling authored and Michael Dowling committed Feb 24, 2022
1 parent 73e301c commit 937574b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions docs/source/1.0/spec/core/constraint-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -606,15 +606,13 @@ in a response.

.. warning:
This trait has been deprecated. It may be removed in future versions. Set
shapes should be used instead.
This trait has been deprecated and will be removed in future versions of
Smithy. Set shapes should be used instead.
Summary
Indicates that the items in a :ref:`list` MUST be unique.
Trait selector
``:test(list > member > simpleType)``

*A list that targets any simple type.*
``:test(list > member > :test(string, blob, byte, short, integer, long, bigDecimal, bigInteger))``
Value type
Annotation trait.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ structure recommended {
structure sparse {}

/// Indicates that the items in a list MUST be unique.
@trait(selector: "list")
@trait(selector: ":test(list > member > :test(string, blob, byte, short, integer, long, bigDecimal, bigInteger))")
@deprecated(message: "The uniqueItems trait has been deprecated in favor of using sets.", since: "2.0")
structure uniqueItems {}

Expand Down

0 comments on commit 937574b

Please sign in to comment.