Skip to content

Commit

Permalink
Update Smithy IDL ABNF Docs
Browse files Browse the repository at this point in the history
- Smithy 1.0: Update all ABNF to match ABNF RFC
- Smithy 2.0: Update IDL ABNF, XmlName ABNF, and minor doc fixes
  • Loading branch information
Steven Yuan authored and syall committed Aug 19, 2022
1 parent 94a7820 commit 2a922c7
Show file tree
Hide file tree
Showing 18 changed files with 331 additions and 292 deletions.
8 changes: 4 additions & 4 deletions docs/source-1.0/spec/aws/aws-ec2-query-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ resolved using the following process:
* - Member location
- Default value
* - ``structure`` member
- The :token:`member name <smithy:shape_id_member>` capitalized
- The :token:`member name <smithy:ShapeIdMember>` capitalized
* - ``union`` member
- The :token:`member name <smithy:shape_id_member>` capitalized
- The :token:`member name <smithy:ShapeIdMember>` capitalized


----------------
Expand Down Expand Up @@ -351,7 +351,7 @@ of the ``Errors`` tag is an ``Error`` tag which contains the serialized error
structure members.

Serialized error shapes MUST also contain an additional child element ``Code``
that contains only the :token:`shape name <smithy:identifier>` of the error's
that contains only the :token:`shape name <smithy:Identifier>` of the error's
:ref:`shape-id`. This can be used to distinguish which specific error has been
serialized in the response.

Expand All @@ -368,7 +368,7 @@ serialized in the response.
<RequestId>foo-id</RequestId>
</Response>
* ``Code``: The :token:`shape name <smithy:identifier>` of the error's
* ``Code``: The :token:`shape name <smithy:Identifier>` of the error's
:ref:`shape-id`.
* ``RequestId``: Contains a unique identifier for the associated request.

Expand Down
2 changes: 1 addition & 1 deletion docs/source-1.0/spec/aws/aws-json-1_1-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The following example defines a service that requires the use of
.. |quoted shape name| replace:: ``awsJson1_1``
.. |protocol content type| replace:: ``application/x-amz-json-1.1``
.. |protocol error type contents| replace:: :token:`shape name <smithy:identifier>`
.. |protocol error type contents| replace:: :token:`shape name <smithy:Identifier>`
.. |protocol test link| replace:: https://github.com/awslabs/smithy/tree/main/smithy-aws-protocol-tests/model/awsJson1_1
.. include:: aws-json.rst.template

Expand Down
6 changes: 3 additions & 3 deletions docs/source-1.0/spec/aws/aws-json.rst.template
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ The |quoted shape name| protocol uses the following headers:
`RFC 7230 Section 3.3.2`_.
* - ``X-Amz-Target``
- true for requests
- The value of this header is the :token:`shape name <smithy:identifier>` of the
- The value of this header is the :token:`shape name <smithy:Identifier>` of the
service's :ref:`shape-id` joined to the
:token:`shape name <smithy:identifier>` of the operation's :ref:`shape-id`,
:token:`shape name <smithy:Identifier>` of the operation's :ref:`shape-id`,
separated by a single period (``.``) character.

For example, the value for the operation ``ns.example#MyOp`` of the
Expand Down Expand Up @@ -188,7 +188,7 @@ There are two difference between :ref:`awsJson1_0 <aws.protocols#awsJson1_0-trai
Second, error type serialization is different. In ``awsJson1_0``, servers SHOULD
send the error shape's full :ref:`shape-id` in the ``__type`` field of the body.
In ``awsJson1_1``, servers SHOULD only send the error's
:token:`shape name <smithy:identifier>`. However, clients MUST accept either behavior
:token:`shape name <smithy:Identifier>`. However, clients MUST accept either behavior
for both protocols. See `Operation error serialization`_ for full details on how to
deserialize errors for |quoted shape name|.

Expand Down
6 changes: 3 additions & 3 deletions docs/source-1.0/spec/aws/aws-query-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ resolved using the following process:
* - ``map`` value
- The string literal "value"
* - ``structure`` member
- The :token:`member name <smithy:shape_id_member>`
- The :token:`member name <smithy:ShapeIdMember>`
* - ``union`` member
- The :token:`member name <smithy:shape_id_member>`
- The :token:`member name <smithy:ShapeIdMember>`


Example requests
Expand Down Expand Up @@ -436,7 +436,7 @@ following process:

1. Use the value of the ``code`` member of the :ref:`aws.protocols#awsQueryError-trait`
applied to the error structure, if present.
2. The :token:`shape name <smithy:identifier>` of the error's :ref:`shape-id`.
2. The :token:`shape name <smithy:Identifier>` of the error's :ref:`shape-id`.


.. smithy-trait:: aws.protocols#awsQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Requests MUST include the following key value pairs in the serialized body:
* - Key
- Value
* - ``Action``
- The :token:`shape name <smithy:identifier>` of the operation's :ref:`shape-id`.
- The :token:`shape name <smithy:Identifier>` of the operation's :ref:`shape-id`.
* - ``Version``
- The value of the :ref:`"version" property of the service <service>`.

Expand Down
2 changes: 1 addition & 1 deletion docs/source-1.0/spec/aws/aws-restjson1-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ is contained. New server-side protocol implementations MUST use a header field
named ``X-Amzn-Errortype``. Clients MUST accept any one of the following: an
additional header with the name ``X-Amzn-Errortype``, a body field with the
name ``__type``, or a body field named ``code``. The value of this component
SHOULD contain only the :token:`shape name <smithy:identifier>` of the error's
SHOULD contain only the :token:`shape name <smithy:Identifier>` of the error's
:ref:`shape-id`.

Legacy server-side protocol implementations sometimes include additional
Expand Down
4 changes: 2 additions & 2 deletions docs/source-1.0/spec/aws/aws-restxml-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ contains the serialized error structure members, unless bound to another
location with HTTP protocol bindings.

Serialized error shapes MUST also contain an additional child element ``Code``
that contains only the :token:`shape name <smithy:identifier>` of the error's
that contains only the :token:`shape name <smithy:Identifier>` of the error's
:ref:`shape-id`. This can be used to distinguish which specific error has been
serialized in the response.

Expand Down Expand Up @@ -295,7 +295,7 @@ Error responses contain the following nested elements:
* ``Error``: A container for the encountered error.
* ``Type``: One of "Sender" or "Receiver"; whomever is at fault from the
service perspective.
* ``Code``: The :token:`shape name <smithy:identifier>` of the error's
* ``Code``: The :token:`shape name <smithy:Identifier>` of the error's
:ref:`shape-id`.
* ``RequestId``: Contains a unique identifier for the associated request.

Expand Down
2 changes: 1 addition & 1 deletion docs/source-1.0/spec/core/behavior-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ member in the previously referenced structure. Paths MUST adhere to the
following ABNF.

.. productionlist:: smithy
path :`identifier` *("." `identifier`)
path :`Identifier` *("." `Identifier`)
The following example defines a paginated operation which uses a result
wrapper where the output token and items are referenced by paths.
Expand Down
Loading

0 comments on commit 2a922c7

Please sign in to comment.