Skip to content

Commit b02a089

Browse files
committed
Add a note to inline colletsion to the map section as well
1 parent c8b5df7 commit b02a089

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

docs/source-2.0/spec/aggregate-types.rst

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ The following example defines a list with a string member from the
2727
member: String
2828
}
2929
30+
.. versionadded:: 2.1
31+
Lists can be declared inline in member target positions using ``[Target]``
32+
syntax. Inline lists produce a synthetic shape that is shared across all
33+
members using the same target type. See :ref:`idl-inline-collections`.
34+
35+
.. code-block:: smithy
36+
37+
structure Example {
38+
names: [String]
39+
}
40+
3041
3142
List member optionality
3243
-----------------------
@@ -50,18 +61,6 @@ The shape ID of the member of a list is the list shape ID followed by
5061
``$member``. For example, the shape ID of the list member in the above
5162
example is ``smithy.example#MyList$member``.
5263

53-
.. versionadded:: 2.1
54-
Lists can be declared inline in member target positions using ``[Target]``
55-
syntax. Inline lists produce a synthetic shape that is shared across all
56-
members using the same target type. See :ref:`idl-inline-collections`.
57-
58-
.. code-block:: smithy
59-
60-
structure Example {
61-
names: [String]
62-
}
63-
64-
6564
.. _map:
6665

6766
Map
@@ -83,6 +82,17 @@ The following example defines a map of strings to integers:
8382
value: Integer
8483
}
8584
85+
.. versionadded:: 2.1
86+
maps can be declared inline in member target positions using ``{Key: Value]``
87+
syntax. Inline maps produce a synthetic shape that is shared across all
88+
members using the same key and value target types. See :ref:`idl-inline-collections`.
89+
90+
.. code-block:: smithy
91+
92+
structure Example {
93+
tags: {String: String}
94+
}
95+
8696
8797
Map member optionality
8898
----------------------

0 commit comments

Comments
 (0)