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

Fix httpQuery selector #534

Merged
merged 1 commit into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/source/1.0/spec/core/http-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,10 @@ Trait selector
.. code-block:: none

structure > member
:test(> simpleType:not(document),
> collection > member > simpleType:not(document)))
:test(> :test(string, number, boolean, timestamp),
> collection > member > :test(string, number, boolean, timestamp))

*Structure members that target non-document simple types or collections of non-document simple types*
*Structure members that target string, number, boolean, or timestamp; or a list/set of said types*
Value type
``string`` value defining the name of the query string parameter. The
query string value MUST NOT be empty. This trait is ignored when
Expand All @@ -791,7 +791,6 @@ Serialization rules:
* Multiple members of a structure MUST NOT case-sensitively target the same
query string parameter.
* boolean values are serialized as ``true`` or ``false``.
* blob values are base64 encoded when serialized in the query string.
* timestamp values are serialized as an :rfc:`3339`
``date-time`` string (e.g., ``1985-04-12T23:20:50.52Z``). The
:ref:`timestampFormat-trait` MAY be used to use a custom serialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ structure httpLabel {}
/// Binds an operation input structure member to a query string parameter.
@trait(selector: """
structure > member
:test(> simpleType:not(document),
> collection > member > simpleType:not(document)))""",
:test(> :test(string, number, boolean, timestamp),
> collection > member > :test(string, number, boolean, timestamp))""",
conflicts: [httpLabel, httpHeader, httpPrefixHeaders, httpPayload])
@length(min: 1)
@tags(["diff.error.const"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package software.amazon.smithy.openapi.fromsmithy.protocols;

import software.amazon.smithy.jsonschema.Schema;
import software.amazon.smithy.model.shapes.BlobShape;
import software.amazon.smithy.model.shapes.CollectionShape;
import software.amazon.smithy.model.shapes.ListShape;
import software.amazon.smithy.model.shapes.MemberShape;
Expand Down Expand Up @@ -92,12 +91,4 @@ public Schema timestampShape(TimestampShape shape) {
.format("date-time")
.build();
}

// Query string blobs in Smithy must be base64 encoded, so this
// code grabs the referenced shape and creates an inline schema that
// explicitly defines the necessary styles.
@Override
public Schema blobShape(BlobShape shape) {
return schema.toBuilder().ref(null).type("string").format("byte").build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class AwsRestJson1ProtocolTest {
"adds-json-document-bodies.json",
"adds-path-timestamp-format.json",
"adds-query-timestamp-format.json",
"adds-query-blob-format.json",
"adds-header-timestamp-format.json",
"adds-header-mediatype-format.json",
"supports-payloads.json",
Expand Down

This file was deleted.

This file was deleted.