Skip to content

Commit 9dcfa78

Browse files
srchasesyall
andauthored
Add set to list doc section (#1346)
* Add set to list doc section * Fix syntax highlighting * Update docs/source-2.0/guides/migrating-idl-1-to-2.rst Co-authored-by: Steven Yuan <s.yuan.all@gmail.com>
1 parent 6ad3d10 commit 9dcfa78

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

docs/source-2.0/guides/migrating-idl-1-to-2.rst

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,38 @@ Needs to be updated to:
113113
}
114114
115115
116+
Convert set shapes to list shapes
117+
=================================
118+
119+
The set shape was deprecated for IDL 2.0. Each set shape must be replaced by a
120+
list shape with the :ref:`uniqueItems-trait`.
121+
122+
For example, the following set:
123+
124+
.. code-block:: smithy
125+
126+
$version "1.0"
127+
128+
namespace smithy.example
129+
130+
set StringSet {
131+
member: String
132+
}
133+
134+
Needs to be updated to:
135+
136+
.. code-block:: smithy
137+
138+
$version "2"
139+
140+
namespace smithy.example
141+
142+
@uniqueItems
143+
list StringSet {
144+
member: String
145+
}
146+
147+
116148
Add the default trait to streaming blobs
117149
========================================
118150

@@ -209,7 +241,7 @@ needed to model an operation. For example, the following model:
209241
210242
can be updated to:
211243

212-
.. code-block::
244+
.. code-block:: smithy
213245
214246
$version: "2"
215247

0 commit comments

Comments
 (0)