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

Document awsQuery protocol #700

Merged
merged 2 commits into from
Feb 3, 2021
Merged

Document awsQuery protocol #700

merged 2 commits into from
Feb 3, 2021

Conversation

kstich
Copy link
Contributor

@kstich kstich commented Feb 2, 2021

This fleshes out the documentation for the awsQuery protocol.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -538,7 +538,7 @@ table.hlist {

code {
font-size: 90%;
background-color: #f2f2f2;
background-color: #e9e9e9;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly darker to be visible in dark background table rows without being obnoxious in light backgrounds.

* - Key
- Value
* - ``Action``
- The name of the operation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically the operation's shape name ( :token:`shape name ` )

Comment on lines 150 to 152
* "&" is used to separate parameter key-value pairs.
* "=" is used to separate parameter names from values.
* "." is used to separate nested parameter name segments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameter -> member ?

Comment on lines 207 to 234
* - ``list``
- Each value provided in the list is serialized as a separate key with
a "." separator, ``member``, a "." separator, and a ``1`` indexed
incrementing counter appended to the container's key. The :ref:`xmlName-trait`
can be used to serialize a property using a custom name instead of
``member``. The :ref:`xmlFlattened-trait` can be used to unwrap the
values into a containing structure or union, with the key not
containing the initial "." separator and ``member`` segment.
* - ``set``
- A set is serialized identically as a ``list`` shape, but only contains
unique values.
* - ``map``
- Each key and value in each pair provided in the map is serialized as a
separate key with a "." separator, ``entry``, a "." separator, a ``1``
indexed incrementing counter, a "." separator, and a ``key`` or
``value`` segment appended to the container's key. The :ref:`xmlName-trait`
can be used to serialize a property using custom names instead of
``member``, ``key``, or ``value``. The :ref:`xmlFlattened-trait` can be
used to unwrap the values into a containing structure or union, with
the key not containing the initial "." separator and ``entry`` segment.
* - ``structure``
- Each member value provided for the structure is serialized as a
separate key with a "." separator and the member name appended to the
container's key. The :ref:`xmlName-trait` can be used to serialize a
property using a custom name.
* - ``union``
- A union is serialized identically as a ``structure`` shape, but only a
single member can be set to a non-null value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could use inlined examples

- Request entity
* - ``list``
- Each value provided in the list is serialized as a separate key with
a "." separator, ``member``, a "." separator, and a ``1`` indexed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically the string member. The mixing of quotes and ticks is a bit odd here. The same applies the the other entries

Comment on lines 210 to 212
incrementing counter appended to the container's key. The :ref:`xmlName-trait`
can be used to serialize a property using a custom name instead of
``member``. The :ref:`xmlFlattened-trait` can be used to unwrap the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To what are the traits applied
ditto for member and structure

property using a custom name.
* - ``union``
- A union is serialized identically as a ``structure`` shape, but only a
single member can be set to a non-null value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define how one serializes a null value. Also empty string

:ref:`timestampFormat <timestampFormat-trait>` MAY be used to
customize timestamp serialization.
* - ``document``
- Undefined. Document shapes are not recommended for use in XML based
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording in the request section is better as it calls out that this protocol specifically doesn't support it

Comment on lines 304 to 332
* - ``list``
- XML element. Each value provided in the list is serialized as a nested
XML element with the name ``member``. The :ref:`xmlName-trait` can be
used to serialize a property using a custom name. The
:ref:`xmlFlattened-trait` can be used to unwrap the values into a
containing structure or union, with the value XML element using the
structure or union member name.
* - ``set``
- XML element. A set is serialized identically as a ``list`` shape,
but only contains unique values.
* - ``map``
- XML element. Each key-value pair provided in the map is serialized in
a nested XML element with the name ``entry`` that contains nested
elements ``key`` and ``value`` for the pair. The :ref:`xmlName-trait`
can be used to serialize key or value properties using a custom name,
it cannot be used to influence the ``entry`` name. The
:ref:`xmlFlattened-trait` can be used to unwrap the entries into a
containing structure or union, with the entry XML element using the
structure or union member name.
* - ``structure``
- XML element. Each member value provided for the structure is
serialized as a nested XML element where the element name is the
same as the member name. The :ref:`xmlName-trait` can be used to
serialize a property using a custom name. The :ref:`xmlAttribute-trait`
can be used to serialize a property in an attribute of the containing
element.
* - ``union``
- XML element. A union is serialized identically as a ``structure``
shape, but only a single member can be set to a non-null value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could also use inline examples, or links to the specific sections of the serializing xml shapes page

This fleshes out the documentation for the `awsQuery` protocol.
@kstich kstich force-pushed the query_protocol_docs branch 4 times, most recently from 0359a7b to acc2c04 Compare February 3, 2021 03:16
Comment on lines 142 to 144
1. Use the value of the ``ec2QueryName`` trait applied to the member, if
present.
2. Use the value of the ``xmlName`` trait applied to the member with the first
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These traits should be ref'd

-----------------------------

Error responses in the ``ec2Query`` protocol are wrapped within an XML root
node named ``ErrorS``. A nested element, named ``Error``, contains the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The s in errors should be lowercased

Comment on lines +148 to +165
.. list-table::
:header-rows: 1
:widths: 50 50

* - Member location
- Default value
* - ``list`` member
- The string literal "member"
* - ``set`` member
- The string literal "member"
* - ``map`` key
- The string literal "key"
* - ``map`` value
- The string literal "value"
* - ``structure`` member
- The :token:`member name <shape_id_member>`
* - ``union`` member
- The :token:`member name <shape_id_member>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should show up in normal query too

This adds documentation for ec2Query by abstracting out the docs
for awsQuery and including substitutions for the differences.

Examples for awsQuery have been added as well.
@kstich kstich merged commit 61cffbe into main Feb 3, 2021
@kstich kstich deleted the query_protocol_docs branch February 3, 2021 18:14
@kstich kstich mentioned this pull request Feb 22, 2021
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

Successfully merging this pull request may close these issues.

2 participants