From ccd0a7730a9739e29b1e7807345cad95b13a1756 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Sat, 22 Feb 2020 21:44:51 -0800 Subject: [PATCH] Rename unsignedPayload and ec2QueryName Now that the aws.api#protocols and aws.api#auth namespaces exist, these traits make more sense to be defined in those namespaces. --- CHANGELOG.md | 9 ++ docs/source/spec/aws-auth.rst | 72 +++++++++- docs/source/spec/aws-core.rst | 123 ------------------ docs/source/spec/aws-query-protocol.rst | 62 +++++++++ .../model/ec2Query/input.smithy | 2 +- .../model/ec2Query/main.smithy | 4 +- .../model/ec2Query/xml-structs.smithy | 2 +- smithy-aws-traits/README.md | 94 +------------ .../{ => auth}/UnsignedPayloadTrait.java | 4 +- .../{ => protocols}/Ec2QueryNameTrait.java | 4 +- ...re.amazon.smithy.model.traits.TraitService | 4 +- .../resources/META-INF/smithy/aws.api.json | 19 --- .../resources/META-INF/smithy/aws.auth.json | 9 ++ .../META-INF/smithy/aws.protocols.json | 10 ++ .../{ => auth}/UnsignedPayloadTraitTest.java | 2 +- .../{ => auth}/unsigned-request-payload.json | 2 +- .../aws/traits/errorfiles/ec2-query-name.json | 2 +- 17 files changed, 175 insertions(+), 249 deletions(-) rename smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/{ => auth}/UnsignedPayloadTrait.java (91%) rename smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/{ => protocols}/Ec2QueryNameTrait.java (90%) rename smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/{ => auth}/UnsignedPayloadTraitTest.java (96%) rename smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/{ => auth}/unsigned-request-payload.json (76%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 497caa7ea05..365acc306fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Smithy Changelog +## 0.10.0 (2020-??-??) + +### Breaking changes + +* aws.api#ec2QueryName was renamed to `aws.protocols#ec2QueryName`. +* aws.api#unsignedPayload was renamed to `aws.auth#unsignedPayload` and no longer takes an array of values. + All auth schemes that honor this trait should be considered unsigned when this trait is applied. + + ## 0.9.7 (2020-01-15) ### Features diff --git a/docs/source/spec/aws-auth.rst b/docs/source/spec/aws-auth.rst index 7530c76b9e8..21594cf36e4 100644 --- a/docs/source/spec/aws-auth.rst +++ b/docs/source/spec/aws-auth.rst @@ -14,8 +14,9 @@ This document defines AWS authentication schemes. .. _aws.auth#sigv4-trait: +------------------------ ``aws.auth#sigv4`` trait -======================== +------------------------ Trait summary The ``aws.auth#sigv4`` trait adds support for `AWS signature version 4`_ @@ -78,10 +79,75 @@ Trait value } +.. _aws.auth#unsignedPayload-trait: + +---------------------------------- +``aws.auth#unsignedPayload`` trait +---------------------------------- + +Summary + Indicates that the payload of an operation is not to be part of the + signature computed for the request of an operation. +Trait selector + ``operation`` +Value type + Annotation trait + +Most requests sent to AWS services require that the payload of the request is +signed. However, in some cases, a service that streams large amounts of data +with an unknown size at the time a request is initiated might require that the +payload of a request is not signed. + +The following example defines an operation that indicates the payload of the +operation MUST NOT be used as part of the request signature calculation: + +.. tabs:: + + .. code-tab:: smithy + + use aws.auth#unsignedPayload + + @unsignedPayload + operation PutThings { + input: PutThingsInput, + output: PutThingsOutput + } + + .. code-tab:: json + + { + "smithy": "0.5.0", + "shapes": { + "smithy.example#PutThings": { + "type": "operation", + "input": { + "target": "smithy.example#PutThingsInput" + }, + "output": { + "target": "smithy.example#PutThingsOutput" + }, + "traits": { + "aws.auth#unsignedPayload": true + } + } + } + } + + +Unsigned Payloads and signature version 4 +========================================= + +Using an unsigned payload with `AWS signature version 4`_ requires that the +literal string ``UNSIGNED-PAYLOAD`` is used when constructing a +`canonical request`_, and the same value is sent in the +`x-amz-content-sha256`_ header when sending an HTTP request. + + .. _aws.auth#cognitoUserPools-trait: +------------------------- aws.auth#cognitoUserPools -========================= +------------------------- Trait summary The ``aws.auth#cognitoUserPools`` trait adds support for @@ -123,3 +189,5 @@ Trait value .. _AWS signature version 4: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html .. _credential scope: https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html .. _Amazon Cognito User Pools: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html +.. _canonical request: https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html +.. _x-amz-content-sha256: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html diff --git a/docs/source/spec/aws-core.rst b/docs/source/spec/aws-core.rst index 165657e51c9..ef0ae67cc66 100644 --- a/docs/source/spec/aws-core.rst +++ b/docs/source/spec/aws-core.rst @@ -831,127 +831,6 @@ plane unless an operation or resource is marked with the } } -.. _aws.api#unsignedPayload-trait: - ---------------------------------- -``aws.api#unsignedPayload`` trait ---------------------------------- - -Summary - Indicates that the payload of an operation is not to be part of the - signature computed for the request of an operation. -Trait selector - ``operation`` -Value type - Annotation trait - -Most requests sent to AWS services require that the payload of the request is -signed. However, in some cases, a service that streams large amounts of data -with an unknown size at the time a request is initiated might require that the -payload of a request is not signed. - -The following example defines an operation that indicates the payload of the -operation MUST NOT be used as part of the request signature calculation: - -.. tabs:: - - .. code-tab:: smithy - - use aws.api#unsignedPayload - - @unsignedPayload - operation PutThings { - input: PutThingsInput, - output: PutThingsOutput - } - - .. code-tab:: json - - { - "smithy": "0.5.0", - "shapes": { - "smithy.example#PutThings": { - "type": "operation", - "input": { - "target": "smithy.example#PutThingsInput" - }, - "output": { - "target": "smithy.example#PutThingsOutput" - }, - "traits": { - "aws.api#unsignedPayload": true - } - } - } - } - - -Unsigned Payloads and signature version 4 -========================================= - -Using an unsigned payload with `AWS signature version 4`_ requires that the -literal string ``UNSIGNED-PAYLOAD`` is used when constructing a -`canonical request`_, and the same value is sent in the -`x-amz-content-sha256`_ header when sending an HTTP request. - -.. _aws.api#ec2QueryName-trait: - ---------------------------------- -``aws.api#ec2QueryName`` trait ---------------------------------- - -Summary - Indicates the serialized name of a structure member when that structure is - serialized for the input of an EC2 operation. -Trait selector - ``member:of(structure)`` -Value type - ``string`` - -It is very important to note that the ``aws.api#ec2QueryName`` ONLY applies -when serializing an INPUT. For example, given the following Smithy model: - -.. tabs:: - - .. code-tab:: smithy - - structure MyStruct { - @ec2QueryName("foo") - bar: String - } - - .. code-tab:: json - - { - "smithy": "0.5.0", - "shapes": { - "smithy.example#MyStruct": { - "type": "structure", - "members": { - "bar": { - "target": "smithy.api#String", - "traits": { - "aws.api#ec2QueryName": "foo" - } - } - } - } - } - } - -The serialization of this structure as an input is: - -:: - - MyStruct.bar=baz - -The serialization of the structure as an (XML) output is: - -.. code-block:: xml - - - baz - .. _endpoint-discovery: @@ -1438,8 +1317,6 @@ existing AWS services. .. _AWS CloudFormation service name: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws.template-resource-type-ref.html .. _ARN service namespace: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces .. _AWS signature version 4: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html -.. _canonical request: https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html -.. _x-amz-content-sha256: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html .. _Amazon Resource Name (ARN): https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html .. _AWS Service Namespaces: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces .. _CloudFormation resource type: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html diff --git a/docs/source/spec/aws-query-protocol.rst b/docs/source/spec/aws-query-protocol.rst index f5621c93c1e..86a204bfb3b 100644 --- a/docs/source/spec/aws-query-protocol.rst +++ b/docs/source/spec/aws-query-protocol.rst @@ -102,4 +102,66 @@ Value type } } + +.. _aws.protocols#ec2QueryName-trait: + +------------------------------------ +``aws.protocols#ec2QueryName`` trait +------------------------------------ + +Summary + Indicates the serialized name of a structure member when that structure is + serialized for the input of an EC2 operation using the + ``aws.protocols#ec2Query`` protocol. +Trait selector + ``member:of(structure)`` +Value type + ``string`` + +It is very important to note that the ``aws.protocols#ec2QueryName`` ONLY applies +when serializing an INPUT. For example, given the following Smithy model: + +.. tabs:: + + .. code-tab:: smithy + + structure MyStruct { + @ec2QueryName("foo") + bar: String + } + + .. code-tab:: json + + { + "smithy": "0.5.0", + "shapes": { + "smithy.example#MyStruct": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String", + "traits": { + "aws.protocols#ec2QueryName": "foo" + } + } + } + } + } + } + +The serialization of this structure as an input is: + +:: + + MyStruct.bar=baz + +The serialization of the structure as an (XML) output is: + +.. code-block:: xml + + + baz + + + *TODO: Add specifications, protocol examples, etc.* diff --git a/smithy-aws-protocol-tests/model/ec2Query/input.smithy b/smithy-aws-protocol-tests/model/ec2Query/input.smithy index ab3eca18428..844745d705e 100644 --- a/smithy-aws-protocol-tests/model/ec2Query/input.smithy +++ b/smithy-aws-protocol-tests/model/ec2Query/input.smithy @@ -4,7 +4,7 @@ $version: "0.5.0" namespace aws.protocoltests.ec2 -use aws.api#ec2QueryName +use aws.protocols#ec2QueryName use aws.protocols#ec2Query use aws.protocoltests.shared#EpochSeconds use aws.protocoltests.shared#FooEnum diff --git a/smithy-aws-protocol-tests/model/ec2Query/main.smithy b/smithy-aws-protocol-tests/model/ec2Query/main.smithy index 7f8f6daf461..ed280d12ff9 100644 --- a/smithy-aws-protocol-tests/model/ec2Query/main.smithy +++ b/smithy-aws-protocol-tests/model/ec2Query/main.smithy @@ -4,10 +4,10 @@ // // 1. EC2 does not support the xmlFlattened trait on input. All lists are flattened. // 2. EC2 does not utilize input maps. -// 3. EC2 uses a trait called aws.api#ec2QueryName that is used when serializing +// 3. EC2 uses a trait called aws.protocols#ec2QueryName that is used when serializing // query string input parameters. If this trait is found, then it is used. // This trait has no effect on output serialization. -// 4. EC2 input parameters not marked with aws.api#ec2QueryName fall back to +// 4. EC2 input parameters not marked with aws.protocols#ec2QueryName fall back to // using xmlName. If xmlName is set, then the first letter is uppercased // and serialized in the query. // 5. Because lists are always considered flattened, the member name of a list, diff --git a/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy b/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy index c3aad98752c..90becb1136d 100644 --- a/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy +++ b/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy @@ -4,7 +4,7 @@ $version: "0.5.0" namespace aws.protocoltests.ec2 -use aws.api#ec2QueryName +use aws.protocols#ec2QueryName use aws.protocols#ec2Query use aws.protocoltests.shared#FooEnum use aws.protocoltests.shared#FooEnumList diff --git a/smithy-aws-traits/README.md b/smithy-aws-traits/README.md index 31a763e79ce..c780a986450 100644 --- a/smithy-aws-traits/README.md +++ b/smithy-aws-traits/README.md @@ -2,95 +2,5 @@ Provides traits and validators that are used by most AWS services. -See the Smithy specification for details on how these traits are used. - -## `aws.api` Traits - -* `aws.api#service`: Configures a Smithy service as an AWS service. -* `aws.api#arn`: Defines the ARN template of a Smithy resource. -* `aws.api#arnReference`: Indicates that a string shape contains an ARN. -* `aws.api#unsignedPayload`: Configures that request payload of an - operation as unsigned. - -## `aws.iam` Traits - -* `aws.iam#actionPermissionDescription`: Defines the description of what - providing access to an operation entails. -* `aws.iam#conditionKeys`: Applies condition keys to an operation or resource. -* `aws.iam#defineConditionKeys`: Defines the condition keys used in - a service. -* `aws.iam#disableConditionKeyInference`: Disables the automatic inference of - condition keys of a resource. -* `aws.iam#requiredActions`: Defines the actions that a principal must be - authorized to invoke in addition to the targeted operation order to invoke - an operation - -## Example usage - -Example usage: - -```smithy -$version: "0.5.0" -namespace ns.foo - -@aws.api#service(sdkId: "Some Value") -service SomeService { - version: "2018-03-17", - resources: [SomeResource, RootArnResource, AbsoluteResource], -} - -// This resource has an ARN, but no identifier. -@aws.api#arn(template: "rootArnResource") -resource RootArnResource {} - -// This resource has an ARN and MUST provide a placeholder for its -// identifier. -@aws.api#arn(template: "someresource/{someId}") -resource SomeResource { - identifiers: { - someId: SomeResourceId, - childId: ChildResourceId, - }, - resources: [ChildResource], -} - -// This resource has an ARN and MUST provide placeholders for all of its -// identifiers. This relative ARN does not include a region or account ID. -@aws.api#arn( - template: "someresource/{someId}/{childId}", - noRegion: true, - noAccount: true) -resource ChildResource { - identifiers: { - someId: SomeResourceId, - childId: ChildResourceId, - }, - resources: [AnotherChild], -} - -resource AnotherChild { - identifiers: { - someId: SomeResourceId, - childId: ChildResourceId, - }, -} - -// This resource uses an ARN as its identifier, so its ARN template is absolute. -@aws.api#arn( - template: "{arn}", - absolute: true) -resource AbsoluteResource { - identifiers: { - arn: AbsoluteResourceArn - }, -} - -@aws.api#arnReference( - type: "AWS::SomeService::AbsoluteResource", - service: 'ns.foo#SomeService', - resource: 'ns.foo#AbsoluteResource') -string AbsoluteResourceArn - -string SomeResourceId -string ChildResourceId -``` +See the [Smithy specification](https://awslabs.github.io/smithy/spec/) +for details on how these traits are used. diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/UnsignedPayloadTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/UnsignedPayloadTrait.java similarity index 91% rename from smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/UnsignedPayloadTrait.java rename to smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/UnsignedPayloadTrait.java index e41cc732afe..54a2574ad42 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/UnsignedPayloadTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/UnsignedPayloadTrait.java @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -package software.amazon.smithy.aws.traits; +package software.amazon.smithy.aws.traits.auth; import software.amazon.smithy.model.FromSourceLocation; import software.amazon.smithy.model.SourceLocation; @@ -24,7 +24,7 @@ * Indicates that the payload of an operation is not to be signed. */ public final class UnsignedPayloadTrait extends BooleanTrait { - public static final ShapeId ID = ShapeId.from("aws.api#unsignedPayload"); + public static final ShapeId ID = ShapeId.from("aws.auth#unsignedPayload"); public UnsignedPayloadTrait(FromSourceLocation sourceLocation) { super(ID, sourceLocation.getSourceLocation()); diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/Ec2QueryNameTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/protocols/Ec2QueryNameTrait.java similarity index 90% rename from smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/Ec2QueryNameTrait.java rename to smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/protocols/Ec2QueryNameTrait.java index b77fc0aa362..fe7ff4a0294 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/Ec2QueryNameTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/protocols/Ec2QueryNameTrait.java @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -package software.amazon.smithy.aws.traits; +package software.amazon.smithy.aws.traits.protocols; import software.amazon.smithy.model.SourceLocation; import software.amazon.smithy.model.shapes.ShapeId; @@ -24,7 +24,7 @@ * serialized for the input of an EC2 operation. */ public class Ec2QueryNameTrait extends StringTrait { - public static final ShapeId ID = ShapeId.from("aws.api#ec2QueryName"); + public static final ShapeId ID = ShapeId.from("aws.protocols#ec2QueryName"); public Ec2QueryNameTrait(String value, SourceLocation sourceLocation) { super(ID, value, sourceLocation); diff --git a/smithy-aws-traits/src/main/resources/META-INF/services/software.amazon.smithy.model.traits.TraitService b/smithy-aws-traits/src/main/resources/META-INF/services/software.amazon.smithy.model.traits.TraitService index 821f7eb2d14..00555335967 100644 --- a/smithy-aws-traits/src/main/resources/META-INF/services/software.amazon.smithy.model.traits.TraitService +++ b/smithy-aws-traits/src/main/resources/META-INF/services/software.amazon.smithy.model.traits.TraitService @@ -5,7 +5,7 @@ software.amazon.smithy.aws.traits.ControlPlaneTrait$Provider software.amazon.smithy.aws.traits.DataPlaneTrait$Provider software.amazon.smithy.aws.traits.DataTrait$Provider software.amazon.smithy.aws.traits.ServiceTrait$Provider -software.amazon.smithy.aws.traits.UnsignedPayloadTrait$Provider +software.amazon.smithy.aws.traits.auth.UnsignedPayloadTrait$Provider software.amazon.smithy.aws.traits.iam.ActionPermissionDescriptionTrait$Provider software.amazon.smithy.aws.traits.iam.ConditionKeysTrait$Provider software.amazon.smithy.aws.traits.iam.DefineConditionKeysTrait$Provider @@ -20,7 +20,7 @@ software.amazon.smithy.aws.traits.apigateway.MockIntegrationTrait$Provider software.amazon.smithy.aws.traits.clientendpointdiscovery.ClientEndpointDiscoveryTrait$Provider software.amazon.smithy.aws.traits.clientendpointdiscovery.ClientEndpointDiscoveryIdTrait$Provider software.amazon.smithy.aws.traits.clientendpointdiscovery.ClientDiscoveredEndpointTrait$Provider -software.amazon.smithy.aws.traits.Ec2QueryNameTrait$Provider +software.amazon.smithy.aws.traits.protocols.Ec2QueryNameTrait$Provider software.amazon.smithy.aws.traits.protocols.AwsQueryTrait$Provider software.amazon.smithy.aws.traits.protocols.Ec2QueryTrait$Provider software.amazon.smithy.aws.traits.protocols.RestJson1Trait$Provider diff --git a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.json b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.json index c49acc4707a..077aa4cbb95 100644 --- a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.json +++ b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.json @@ -73,15 +73,6 @@ "smithy.api#documentation": "Marks a string as containing an ARN." } }, - "aws.api#unsignedPayload": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": "operation" - }, - "smithy.api#documentation": "Indicates that the request payload of a signed request is not to be used as part of the signature." - } - }, "aws.api#data": { "type": "string", "traits": { @@ -218,16 +209,6 @@ }, "smithy.api#documentation": "Configures endpoint discovery for the service." } - }, - "aws.api#ec2QueryName": { - "type": "string", - "traits": { - "smithy.api#trait": { - "selector": "member:of(structure)" - }, - "smithy.api#documentation": "Indicates the serialized name of a structure member when that structure is serialized for the input of an EC2 operation.", - "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z_0-9-]*$" - } } } } diff --git a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.auth.json b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.auth.json index 84cf466da91..4d23d47359c 100644 --- a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.auth.json +++ b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.auth.json @@ -22,6 +22,15 @@ "smithy.api#externalDocumentation": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" } }, + "aws.auth#unsignedPayload": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": "operation" + }, + "smithy.api#documentation": "Indicates that the request payload of a signed request is not to be used as part of the signature." + } + }, "aws.auth#cognitoUserPools": { "type": "structure", "members": { diff --git a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.json b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.json index 3c324268243..321d07458a2 100644 --- a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.json +++ b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.json @@ -96,6 +96,16 @@ "smithy.api#deprecated": true } }, + "aws.protocols#ec2QueryName": { + "type": "string", + "traits": { + "smithy.api#trait": { + "selector": "member:of(structure)" + }, + "smithy.api#documentation": "Indicates the serialized name of a structure member when that structure is serialized for the input of an EC2 operation.", + "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z_0-9-]*$" + } + }, "aws.protocols#StringList": { "type": "list", "member": { diff --git a/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/UnsignedPayloadTraitTest.java b/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/auth/UnsignedPayloadTraitTest.java similarity index 96% rename from smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/UnsignedPayloadTraitTest.java rename to smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/auth/UnsignedPayloadTraitTest.java index fd70d6bd7e8..421dd31a5eb 100644 --- a/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/UnsignedPayloadTraitTest.java +++ b/smithy-aws-traits/src/test/java/software/amazon/smithy/aws/traits/auth/UnsignedPayloadTraitTest.java @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -package software.amazon.smithy.aws.traits; +package software.amazon.smithy.aws.traits.auth; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/unsigned-request-payload.json b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/auth/unsigned-request-payload.json similarity index 76% rename from smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/unsigned-request-payload.json rename to smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/auth/unsigned-request-payload.json index c306b9186fa..1d353cc7f80 100644 --- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/unsigned-request-payload.json +++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/auth/unsigned-request-payload.json @@ -4,7 +4,7 @@ "ns.foo#Unsigned1": { "type": "operation", "traits": { - "aws.api#unsignedPayload": true + "aws.auth#unsignedPayload": true } } } diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/ec2-query-name.json b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/ec2-query-name.json index 39b99e0bc08..05b4b73dbdb 100644 --- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/ec2-query-name.json +++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/ec2-query-name.json @@ -8,7 +8,7 @@ "target": "smithy.api#String", "traits": { "smithy.api#xmlName": "ipv6AddressSet", - "aws.api#ec2QueryName": "Ipv6Addresses" + "aws.protocols#ec2QueryName": "Ipv6Addresses" } } }