Skip to content

Commit

Permalink
Allow document to be httpPayload target
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed May 9, 2020
1 parent e138e6b commit 9817106
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Smithy Changelog

## 1.0.1 (TBD)

### Features

* `httpPayload` can now target document shapes.

## 1.0.0 (2020-05-04)

***Note***: Changes marked with "[BC]" are breaking changes more accurately described in the
Expand Down
8 changes: 4 additions & 4 deletions docs/source/1.0/spec/core/http-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ Summary
Trait selector
.. code-block:: none
structure > :test(member > :test(string, blob, structure, union))
structure > :test(member > :test(string, blob, structure, union, document))
*Structure members that target a string, blob, structure, or union*
*Structure members that target a string, blob, structure, union, or document*
Value type
Annotation trait.
Conflicts with
Expand Down Expand Up @@ -671,8 +671,8 @@ Serialization rules:

#. When a string or blob member is referenced, the raw value is serialized
as the body of the message.
#. When a :ref:`structure` or :ref:`union` is targeted, the shape value
is serialized as a :ref:`protocol-specific <protocolDefinition-trait>`
#. When a :ref:`structure`, :ref:`union`, or document is targeted, the shape
value is serialized as a :ref:`protocol-specific <protocolDefinition-trait>`
document that is sent as the body of the message.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ string httpHeader
string httpPrefixHeaders

/// Binds a single structure member to the body of an HTTP request.
@trait(selector: "structure > :test(member > :test(string, blob, structure, union))",
@trait(selector: "structure > :test(member > :test(string, blob, structure, union, document))",
conflicts: [httpLabel, httpQuery, httpHeader, httpPrefixHeaders],
structurallyExclusive: "member")
@tags(["diff.error.const"])
Expand Down

0 comments on commit 9817106

Please sign in to comment.