diff --git a/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/default-config-settings.smithy b/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/default-config-settings.smithy
index 2c013ccc4dd..9c47559bf13 100644
--- a/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/default-config-settings.smithy
+++ b/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/default-config-settings.smithy
@@ -6,8 +6,10 @@ use aws.protocols#restJson1
@restJson1
service MyService {
- version: "2020-07-02",
- operations: [HasDefault]
+ version: "2020-07-02"
+ operations: [
+ HasDefault
+ ]
}
@http(method: "POST", uri: "/defaults")
@@ -20,7 +22,7 @@ operation HasDefault {
foo: String = ""
bar: StringList = []
baz: DefaultEnum = "FOO"
- withAlphaOnlyRef: Foo_Baz,
+ withAlphaOnlyRef: Foo_Baz
anInt: Long
}
}
diff --git a/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/effective-authorizers.smithy b/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/effective-authorizers.smithy
index d861d2a5120..6822b648071 100644
--- a/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/effective-authorizers.smithy
+++ b/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/effective-authorizers.smithy
@@ -4,11 +4,15 @@ namespace smithy.example
@aws.auth#sigv4(name: "someservice")
@aws.apigateway#authorizer("foo")
@aws.apigateway#authorizers(
- foo: {scheme: "aws.auth#sigv4", type: "aws", uri: "arn:foo"},
- baz: {scheme: "aws.auth#sigv4", type: "aws", uri: "arn:baz"})
+ foo: { scheme: "aws.auth#sigv4", type: "aws", uri: "arn:foo" }
+ baz: { scheme: "aws.auth#sigv4", type: "aws", uri: "arn:baz" }
+)
service ServiceA {
- version: "2019-06-17",
- operations: [OperationA, OperationB]
+ version: "2019-06-17"
+ operations: [
+ OperationA
+ OperationB
+ ]
}
// Inherits the authorizer of ServiceA
diff --git a/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/unsupported-http-checksum.smithy b/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/unsupported-http-checksum.smithy
index 6aa55545e2d..2b6786e3081 100644
--- a/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/unsupported-http-checksum.smithy
+++ b/smithy-aws-apigateway-openapi/src/test/resources/software/amazon/smithy/aws/apigateway/openapi/unsupported-http-checksum.smithy
@@ -5,49 +5,50 @@ use aws.protocols#restJson1
@restJson1
service MyService {
- version: "2020-07-02",
- operations: [ValidEnums,],
+ version: "2020-07-02"
+ operations: [
+ ValidEnums
+ ]
}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@http(method: "GET", uri: "/unsupported")
@readonly
@suppress(["UnstableTrait"])
operation ValidEnums {
- input: ValidEnumsInput,
- output: ValidEnumsOutput,
-
+ input: ValidEnumsInput
+ output: ValidEnumsOutput
}
structure ValidEnumsInput {
@httpQuery("requestAlgorithm")
- requestAlgorithm: RequestAlgorithm,
+ requestAlgorithm: RequestAlgorithm
@httpQuery("validationMode")
- validationMode: ValidationMode,
+ validationMode: ValidationMode
}
structure ValidEnumsOutput {}
@enum([
{
- value: "CRC32C",
+ value: "CRC32C"
name: "CRC32C"
- },
+ }
{
- value: "CRC32",
+ value: "CRC32"
name: "CRC32"
- },
+ }
{
- value: "SHA1",
+ value: "SHA1"
name: "SHA1"
- },
+ }
{
- value: "SHA256",
+ value: "SHA256"
name: "SHA256"
}
])
@@ -55,7 +56,7 @@ string RequestAlgorithm
@enum([
{
- value: "ENABLED",
+ value: "ENABLED"
name: "ENABLED"
}
])
diff --git a/smithy-aws-apigateway-traits/src/main/resources/META-INF/smithy/aws.apigateway.smithy b/smithy-aws-apigateway-traits/src/main/resources/META-INF/smithy/aws.apigateway.smithy
index 0d605bb3f14..5355842ed49 100644
--- a/smithy-aws-apigateway-traits/src/main/resources/META-INF/smithy/aws.apigateway.smithy
+++ b/smithy-aws-apigateway-traits/src/main/resources/META-INF/smithy/aws.apigateway.smithy
@@ -6,9 +6,7 @@ use aws.api#arnReference
/// Specifies the source of the caller identifier that will be used to throttle
/// API methods that require a key.
-@externalDocumentation(
- "Developer Guide": "https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-api-key-source.html"
-)
+@externalDocumentation("Developer Guide": "https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-api-key-source.html")
@internal
@tags(["internal"])
@trait(selector: "service")
@@ -35,9 +33,7 @@ map authorizers {
@tags(["internal"])
@trait(
selector: ":test(service, resource, operation)"
- conflicts: [
- "aws.apigateway#mockIntegration"
- ]
+ conflicts: ["aws.apigateway#mockIntegration"]
)
structure integration {
/// The type of integration with the specified backend.
@@ -109,9 +105,7 @@ structure integration {
@tags(["internal"])
@trait(
selector: ":test(service, resource, operation)"
- conflicts: [
- "aws.apigateway#integration"
- ]
+ conflicts: ["aws.apigateway#integration"]
)
structure mockIntegration {
/// Specifies how a request payload of unmapped content type is passed
@@ -141,11 +135,7 @@ string requestValidator
@private
structure AuthorizerDefinition {
/// The Smithy authentication scheme used by the client (e.g, aws.v4).
- @idRef(
- selector: "[trait|authDefinition]"
- failWhenMissing: true
- errorMessage: "The scheme of an authorizer definition must reference an auth trait"
- )
+ @idRef(selector: "[trait|authDefinition]", failWhenMissing: true, errorMessage: "The scheme of an authorizer definition must reference an auth trait")
@required
scheme: String
@@ -351,6 +341,7 @@ enum PassThroughBehavior {
enum PayloadFormatVersion {
/// Specifies 1.0 version of the format used by the authorizer
V1_0 = "1.0"
+
/// Specifies 2.0 version of the format used by the authorizer
V2_0 = "2.0"
}
diff --git a/smithy-aws-apigateway-traits/src/test/resources/software/amazon/smithy/aws/apigateway/traits/effective-authorizers.smithy b/smithy-aws-apigateway-traits/src/test/resources/software/amazon/smithy/aws/apigateway/traits/effective-authorizers.smithy
index d814281e17d..f7bfdafdec7 100644
--- a/smithy-aws-apigateway-traits/src/test/resources/software/amazon/smithy/aws/apigateway/traits/effective-authorizers.smithy
+++ b/smithy-aws-apigateway-traits/src/test/resources/software/amazon/smithy/aws/apigateway/traits/effective-authorizers.smithy
@@ -5,12 +5,19 @@ use aws.auth#sigv4
@sigv4(name: "service")
@aws.apigateway#authorizer("foo")
@aws.apigateway#authorizers(
- foo: {scheme: sigv4, type: "aws", uri: "arn:foo"},
- baz: {scheme: sigv4, type: "aws", uri: "arn:foo"})
+ foo: { scheme: sigv4, type: "aws", uri: "arn:foo" }
+ baz: { scheme: sigv4, type: "aws", uri: "arn:foo" }
+)
service ServiceA {
- version: "2019-06-17",
- operations: [OperationA, OperationB],
- resources: [ResourceA, ResourceB],
+ version: "2019-06-17"
+ operations: [
+ OperationA
+ OperationB
+ ]
+ resources: [
+ ResourceA
+ ResourceB
+ ]
}
// Inherits the authorizer of ServiceA
@@ -22,7 +29,10 @@ operation OperationB {}
// Inherits the authorizer of ServiceA
resource ResourceA {
- operations: [OperationC, OperationD]
+ operations: [
+ OperationC
+ OperationD
+ ]
}
// Inherits the authorizer of ServiceA
@@ -35,7 +45,10 @@ operation OperationD {}
// Overrides the authorizer of ServiceA
@aws.apigateway#authorizer("baz")
resource ResourceB {
- operations: [OperationE, OperationF]
+ operations: [
+ OperationE
+ OperationF
+ ]
}
// Inherits the authorizer of ResourceB
@@ -47,10 +60,17 @@ operation OperationF {}
@sigv4(name: "service")
@aws.apigateway#authorizers(
- foo: {scheme: sigv4, type: "aws", uri: "arn:foo"},
- baz: {scheme: sigv4, type: "aws", uri: "arn:foo"})
+ foo: { scheme: sigv4, type: "aws", uri: "arn:foo" }
+ baz: { scheme: sigv4, type: "aws", uri: "arn:foo" }
+)
service ServiceB {
- version: "2019-06-17",
- operations: [OperationA, OperationB],
- resources: [ResourceA, ResourceB],
+ version: "2019-06-17"
+ operations: [
+ OperationA
+ OperationB
+ ]
+ resources: [
+ ResourceA
+ ResourceB
+ ]
}
diff --git a/smithy-aws-cloudformation-traits/src/main/resources/META-INF/smithy/aws.cloudformation.smithy b/smithy-aws-cloudformation-traits/src/main/resources/META-INF/smithy/aws.cloudformation.smithy
index d27bcf886e4..813fcd4a6d4 100644
--- a/smithy-aws-cloudformation-traits/src/main/resources/META-INF/smithy/aws.cloudformation.smithy
+++ b/smithy-aws-cloudformation-traits/src/main/resources/META-INF/smithy/aws.cloudformation.smithy
@@ -6,9 +6,13 @@ namespace aws.cloudformation
/// additional identifier for the resource.
@unstable
@trait(
- selector: "structure > :test(member > string)",
- conflicts: [cfnExcludeProperty],
- breakingChanges: [{change: "remove"}]
+ selector: "structure > :test(member > string)"
+ conflicts: [cfnExcludeProperty]
+ breakingChanges: [
+ {
+ change: "remove"
+ }
+ ]
)
structure cfnAdditionalIdentifier {}
@@ -16,8 +20,12 @@ structure cfnAdditionalIdentifier {}
/// to differ from a structure member name used in the model.
@unstable
@trait(
- selector: "structure > member",
- breakingChanges: [{change: "any"}]
+ selector: "structure > member"
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
string cfnName
@@ -25,13 +33,13 @@ string cfnName
/// CloudFormation resource definitions.
@unstable
@trait(
- selector: "structure > member",
- conflicts: [
- cfnAdditionalIdentifier,
- cfnMutability,
- cfnDefaultValue
- ],
- breakingChanges: [{change: "add"}]
+ selector: "structure > member"
+ conflicts: [cfnAdditionalIdentifier, cfnMutability, cfnDefaultValue]
+ breakingChanges: [
+ {
+ change: "add"
+ }
+ ]
)
structure cfnExcludeProperty {}
@@ -39,7 +47,7 @@ structure cfnExcludeProperty {}
/// for the property of the CloudFormation resource.
@unstable
@trait(
- selector: "resource > operation -[input, output]-> structure > member",
+ selector: "resource > operation -[input, output]-> structure > member"
conflicts: [cfnExcludeProperty]
)
structure cfnDefaultValue {}
@@ -48,7 +56,7 @@ structure cfnDefaultValue {}
/// when part of a CloudFormation resource.
@unstable
@trait(
- selector: "structure > member",
+ selector: "structure > member"
conflicts: [cfnExcludeProperty]
)
enum cfnMutability {
@@ -69,13 +77,11 @@ enum cfnMutability {
/// member is also marked with the `@additionalIdentifier` trait.
CREATE = "create"
-
/// Indicates that the CloudFormation property generated from this
/// member can be returned by a `read` or `list` request, but
/// cannot be set by the user.
READ = "read"
-
/// Indicates that the CloudFormation property generated from this
/// member can be specified by the user, but cannot be returned by a
/// `read` or `list` request. MUST NOT be set if the member is also
@@ -86,16 +92,20 @@ enum cfnMutability {
/// Indicates that a Smithy resource is a CloudFormation resource.
@unstable
@trait(
- selector: "resource",
- breakingChanges: [{change: "presence"}]
+ selector: "resource"
+ breakingChanges: [
+ {
+ change: "presence"
+ }
+ ]
)
structure cfnResource {
/// Provides a custom CloudFormation resource name.
- name: String,
+ name: String
/// A list of additional shape IDs of structures that will have their
/// properties added to the CloudFormation resource.
- additionalSchemas: StructureIdList,
+ additionalSchemas: StructureIdList
}
@private
diff --git a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/cfn-resources.smithy b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/cfn-resources.smithy
index 63a37135587..07d17bb1878 100644
--- a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/cfn-resources.smithy
+++ b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/cfn-resources.smithy
@@ -6,29 +6,27 @@ use aws.cloudformation#cfnResource
@cfnResource
resource FooResource {
- identifiers: {
- fooId: FooId
- }
+ identifiers: { fooId: FooId }
}
@cfnResource(
- name: "CustomResource",
+ name: "CustomResource"
additionalSchemas: [ExtraBarRequest]
)
resource BarResource {
- identifiers: {
- barId: BarId
- },
- operations: [ExtraBarOperation],
+ identifiers: { barId: BarId }
+ operations: [
+ ExtraBarOperation
+ ]
}
operation ExtraBarOperation {
- input: ExtraBarRequest,
+ input: ExtraBarRequest
}
structure ExtraBarRequest {
@required
- barId: BarId,
+ barId: BarId
}
string FooId
diff --git a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/additionalschemas-conflict.smithy b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/additionalschemas-conflict.smithy
index 4703d33711f..d023389a60e 100644
--- a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/additionalschemas-conflict.smithy
+++ b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/additionalschemas-conflict.smithy
@@ -5,32 +5,32 @@ namespace smithy.example
use aws.cloudformation#cfnResource
service AdditionalSchemasConflict {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- AdditionalSchemasConflictResource,
- ],
+ AdditionalSchemasConflictResource
+ ]
}
-@cfnResource(additionalSchemas: [AdditionalSchemasConflictProperties])
+@cfnResource(
+ additionalSchemas: [AdditionalSchemasConflictProperties]
+)
resource AdditionalSchemasConflictResource {
- identifiers: {
- fooId: String,
- },
- create: CreateAdditionalSchemasConflictResource,
+ identifiers: { fooId: String }
+ create: CreateAdditionalSchemasConflictResource
}
operation CreateAdditionalSchemasConflictResource {
- input: CreateAdditionalSchemasConflictResourceRequest,
+ input: CreateAdditionalSchemasConflictResourceRequest
output: CreateAdditionalSchemasConflictResourceResponse
}
@input
structure CreateAdditionalSchemasConflictResourceRequest {
- bar: String,
+ bar: String
}
structure AdditionalSchemasConflictProperties {
- bar: Boolean,
+ bar: Boolean
}
@output
diff --git a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/deconflict-by-excluding.smithy b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/deconflict-by-excluding.smithy
index cbe2e7caacf..175335ba010 100644
--- a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/deconflict-by-excluding.smithy
+++ b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/deconflict-by-excluding.smithy
@@ -2,37 +2,37 @@ $version: "2.0"
namespace smithy.example
-use aws.cloudformation#cfnResource
use aws.cloudformation#cfnExcludeProperty
+use aws.cloudformation#cfnResource
service AdditionalSchemasDeconflicted {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- AdditionalSchemasDeconflictedResource,
- ],
+ AdditionalSchemasDeconflictedResource
+ ]
}
-@cfnResource(additionalSchemas: [AdditionalSchemasDeconflictedProperties])
+@cfnResource(
+ additionalSchemas: [AdditionalSchemasDeconflictedProperties]
+)
resource AdditionalSchemasDeconflictedResource {
- identifiers: {
- fooId: String,
- },
- create: CreateAdditionalSchemasDeconflictedResource,
+ identifiers: { fooId: String }
+ create: CreateAdditionalSchemasDeconflictedResource
}
operation CreateAdditionalSchemasDeconflictedResource {
- input: CreateAdditionalSchemasDeconflictedResourceRequest,
+ input: CreateAdditionalSchemasDeconflictedResourceRequest
output: CreateAdditionalSchemasDeconflictedResourceResponse
}
@input
structure CreateAdditionalSchemasDeconflictedResourceRequest {
@cfnExcludeProperty
- bar: String,
+ bar: String
}
structure AdditionalSchemasDeconflictedProperties {
- bar: Boolean,
+ bar: Boolean
}
@output
diff --git a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/invalid-additional-schemas-shape.smithy b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/invalid-additional-schemas-shape.smithy
index 8d075f278de..aa411aae9e6 100644
--- a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/invalid-additional-schemas-shape.smithy
+++ b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/invalid-additional-schemas-shape.smithy
@@ -5,21 +5,19 @@ namespace smithy.example
use aws.cloudformation#cfnResource
service InvalidAdditionalSchemasShape {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- InvalidAdditionalSchemasShapeResource,
- ],
+ InvalidAdditionalSchemasShapeResource
+ ]
}
@cfnResource(
- additionalSchemas: [ListShape]
+ additionalSchemas: [ListShape]
)
resource InvalidAdditionalSchemasShapeResource {
- identifiers: {
- fooId: String,
- },
- create: CreateInvalidAdditionalSchemasShapeResource,
- read: GetInvalidAdditionalSchemasShapeResource,
+ identifiers: { fooId: String }
+ create: CreateInvalidAdditionalSchemasShapeResource
+ read: GetInvalidAdditionalSchemasShapeResource
}
list ListShape {
@@ -27,13 +25,13 @@ list ListShape {
}
operation CreateInvalidAdditionalSchemasShapeResource {
- input: CreateInvalidAdditionalSchemasShapeResourceRequest,
+ input: CreateInvalidAdditionalSchemasShapeResourceRequest
output: CreateInvalidAdditionalSchemasShapeResourceResponse
}
@input
structure CreateInvalidAdditionalSchemasShapeResourceRequest {
- bar: String,
+ bar: String
}
@output
@@ -41,18 +39,17 @@ structure CreateInvalidAdditionalSchemasShapeResourceResponse {}
@readonly
operation GetInvalidAdditionalSchemasShapeResource {
- input: GetInvalidAdditionalSchemasShapeResourceRequest,
- output: GetInvalidAdditionalSchemasShapeResourceResponse,
+ input: GetInvalidAdditionalSchemasShapeResourceRequest
+ output: GetInvalidAdditionalSchemasShapeResourceResponse
}
@input
structure GetInvalidAdditionalSchemasShapeResourceRequest {
@required
- fooId: String,
+ fooId: String
}
@output
structure GetInvalidAdditionalSchemasShapeResourceResponse {
- bar: String,
+ bar: String
}
-
diff --git a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/lifecycle-conflict.smithy b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/lifecycle-conflict.smithy
index e7511d04852..36a35c3a8a6 100644
--- a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/lifecycle-conflict.smithy
+++ b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/errorfiles/lifecycle-conflict.smithy
@@ -5,29 +5,27 @@ namespace smithy.example
use aws.cloudformation#cfnResource
service LifecycleConflict {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- LifecycleConflictResource,
- ],
+ LifecycleConflictResource
+ ]
}
@cfnResource
resource LifecycleConflictResource {
- identifiers: {
- fooId: String,
- },
- create: CreateLifecycleConflictResource,
- read: GetLifecycleConflictResource,
+ identifiers: { fooId: String }
+ create: CreateLifecycleConflictResource
+ read: GetLifecycleConflictResource
}
operation CreateLifecycleConflictResource {
- input: CreateLifecycleConflictResourceRequest,
+ input: CreateLifecycleConflictResourceRequest
output: CreateLifecycleConflictResourceResponse
}
@input
structure CreateLifecycleConflictResourceRequest {
- bar: String,
+ bar: String
}
@output
@@ -35,18 +33,17 @@ structure CreateLifecycleConflictResourceResponse {}
@readonly
operation GetLifecycleConflictResource {
- input: GetLifecycleConflictResourceRequest,
- output: GetLifecycleConflictResourceResponse,
+ input: GetLifecycleConflictResourceRequest
+ output: GetLifecycleConflictResourceResponse
}
@input
structure GetLifecycleConflictResourceRequest {
@required
- fooId: String,
+ fooId: String
}
@output
structure GetLifecycleConflictResourceResponse {
- bar: Boolean,
+ bar: Boolean
}
-
diff --git a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/test-service.smithy b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/test-service.smithy
index bd25ef59eca..9010d612d10 100644
--- a/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/test-service.smithy
+++ b/smithy-aws-cloudformation-traits/src/test/resources/software/amazon/smithy/aws/cloudformation/traits/test-service.smithy
@@ -2,232 +2,238 @@ $version: "2.0"
namespace smithy.example
-use aws.cloudformation#cfnResource
use aws.cloudformation#cfnAdditionalIdentifier
+use aws.cloudformation#cfnDefaultValue
use aws.cloudformation#cfnExcludeProperty
use aws.cloudformation#cfnMutability
-use aws.cloudformation#cfnDefaultValue
+use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- FooResource,
- BarResource,
- ],
+ FooResource
+ BarResource
+ ]
}
/// The Foo resource is cool.
@cfnResource
resource FooResource {
- identifiers: {
- fooId: FooId,
- },
- create: CreateFooOperation,
- read: GetFooOperation,
- update: UpdateFooOperation,
+ identifiers: { fooId: FooId }
+ create: CreateFooOperation
+ read: GetFooOperation
+ update: UpdateFooOperation
}
operation CreateFooOperation {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
- fooValidCreateProperty: String,
-
- fooValidCreateReadProperty: String,
-
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidCreateProperty: String
+ fooValidCreateReadProperty: String
+ fooValidFullyMutableProperty: ComplexProperty
}
structure CreateFooResponse {
- fooId: FooId,
+ fooId: FooId
}
@readonly
operation GetFooOperation {
- input: GetFooRequest,
- output: GetFooResponse,
+ input: GetFooRequest
+ output: GetFooResponse
}
structure GetFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
}
structure GetFooResponse {
@cfnDefaultValue
- fooId: FooId,
+ fooId: FooId
- fooValidReadProperty: String,
+ fooValidReadProperty: String
- fooValidCreateReadProperty: String,
+ fooValidCreateReadProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
operation UpdateFooOperation {
- input: UpdateFooRequest,
- output: UpdateFooResponse,
+ input: UpdateFooRequest
+ output: UpdateFooResponse
}
structure UpdateFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
@cfnMutability("write")
- fooValidWriteProperty: String,
+ fooValidWriteProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
structure UpdateFooResponse {
- fooId: FooId,
-
- fooValidReadProperty: String,
-
- fooValidFullyMutableProperty: ComplexProperty,
+ fooId: FooId
+ fooValidReadProperty: String
+ fooValidFullyMutableProperty: ComplexProperty
}
/// A Bar resource, not that kind of bar though.
-@cfnResource(name: "Bar", additionalSchemas: [ExtraBarRequest])
+@cfnResource(
+ name: "Bar"
+ additionalSchemas: [ExtraBarRequest]
+)
resource BarResource {
- identifiers: {
- barId: BarId,
- },
- put: PutBarOperation,
- read: GetBarOperation,
- operations: [ExtraBarOperation],
- resources: [BazResource],
+ identifiers: { barId: BarId }
+ put: PutBarOperation
+ read: GetBarOperation
+ operations: [
+ ExtraBarOperation
+ ]
+ resources: [
+ BazResource
+ ]
}
@idempotent
operation PutBarOperation {
- input: PutBarRequest,
+ input: PutBarRequest
}
structure PutBarRequest {
@required
- barId: BarId,
+ barId: BarId
- barImplicitFullProperty: String,
+ barImplicitFullProperty: String
}
@readonly
operation GetBarOperation {
- input: GetBarRequest,
- output: GetBarResponse,
+ input: GetBarRequest
+ output: GetBarResponse
}
structure GetBarRequest {
@required
- barId: BarId,
+ barId: BarId
@cfnAdditionalIdentifier
- arn: String,
+ arn: String
}
structure GetBarResponse {
- barId: BarId,
- barImplicitReadProperty: String,
- barImplicitFullProperty: String,
+ barId: BarId
+
+ barImplicitReadProperty: String
+
+ barImplicitFullProperty: String
@cfnMutability("full")
- barExplicitMutableProperty: String,
+ barExplicitMutableProperty: String
}
operation ExtraBarOperation {
- input: ExtraBarRequest,
+ input: ExtraBarRequest
}
structure ExtraBarRequest {
@required
- barId: BarId,
+ barId: BarId
- barValidAdditionalProperty: String,
+ barValidAdditionalProperty: String
@cfnExcludeProperty
- barValidExcludedProperty: String,
+ barValidExcludedProperty: String
}
/// This is an herb.
-@cfnResource("name": "Basil")
+@cfnResource(name: "Basil")
resource BazResource {
- identifiers: {
- barId: BarId,
- bazId: BazId,
- },
- create: CreateBazOperation,
- read: GetBazOperation,
- update: UpdateBazOperation,
+ identifiers: { barId: BarId, bazId: BazId }
+ create: CreateBazOperation
+ read: GetBazOperation
+ update: UpdateBazOperation
}
operation CreateBazOperation {
- input: CreateBazRequest,
- output: CreateBazResponse,
+ input: CreateBazRequest
+ output: CreateBazResponse
}
structure CreateBazRequest {
@required
- barId: BarId,
+ barId: BarId
+
+ bazExplicitMutableProperty: String
+
+ bazImplicitCreateProperty: String
- bazExplicitMutableProperty: String,
- bazImplicitCreateProperty: String,
- bazImplicitFullyMutableProperty: String,
- bazImplicitWriteProperty: String,
+ bazImplicitFullyMutableProperty: String
+
+ bazImplicitWriteProperty: String
}
structure CreateBazResponse {
- barId: BarId,
- bazId: BazId,
+ barId: BarId
+ bazId: BazId
}
@readonly
operation GetBazOperation {
- input: GetBazRequest,
- output: GetBazResponse,
+ input: GetBazRequest
+ output: GetBazResponse
}
structure GetBazRequest {
@required
- barId: BarId,
+ barId: BarId
@required
- bazId: BazId,
+ bazId: BazId
}
structure GetBazResponse {
- barId: BarId,
- bazId: BazId,
+ barId: BarId
+
+ bazId: BazId
@cfnMutability("full")
- bazExplicitMutableProperty: String,
- bazImplicitCreateProperty: String,
- bazImplicitReadProperty: String,
- bazImplicitFullyMutableProperty: String,
+ bazExplicitMutableProperty: String
+
+ bazImplicitCreateProperty: String
+
+ bazImplicitReadProperty: String
+
+ bazImplicitFullyMutableProperty: String
}
operation UpdateBazOperation {
- input: UpdateBazRequest,
- output: UpdateBazResponse,
+ input: UpdateBazRequest
+ output: UpdateBazResponse
}
structure UpdateBazRequest {
@required
- barId: BarId,
+ barId: BarId
@required
- bazId: BazId,
+ bazId: BazId
+
+ bazImplicitWriteProperty: String
- bazImplicitWriteProperty: String,
- bazImplicitFullyMutableProperty: String,
+ bazImplicitFullyMutableProperty: String
}
structure UpdateBazResponse {
- barId: BarId,
- bazId: BazId,
- bazImplicitWriteProperty: String,
- bazImplicitFullyMutableProperty: String,
+ barId: BarId
+ bazId: BazId
+ bazImplicitWriteProperty: String
+ bazImplicitFullyMutableProperty: String
}
string FooId
@@ -237,6 +243,6 @@ string BarId
string BazId
structure ComplexProperty {
- property: String,
- another: String,
+ property: String
+ another: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/complex-resource.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/complex-resource.smithy
index dc044ddf7b0..f3bb5b655c5 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/complex-resource.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/complex-resource.smithy
@@ -1,119 +1,126 @@
namespace smithy.example
use aws.cloudformation#cfnAdditionalIdentifier
-use aws.cloudformation#cfnResource
use aws.cloudformation#cfnExcludeProperty
use aws.cloudformation#cfnMutability
+use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- Foo,
- ],
+ Foo
+ ]
}
/// Definition of Example::TestService::Foo Resource Type
-@cfnResource(additionalSchemas: [FooProperties])
+@cfnResource(
+ additionalSchemas: [FooProperties]
+)
resource Foo {
- identifiers: {
- fooId: String,
- },
- create: CreateFoo,
- read: GetFoo,
- update: UpdateFoo,
+ identifiers: { fooId: String }
+ create: CreateFoo
+ read: GetFoo
+ update: UpdateFoo
}
@http(method: "POST", uri: "/foos", code: 200)
operation CreateFoo {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
@cfnMutability("full")
- tags: TagList,
+ tags: TagList
@cfnMutability("write")
- secret: String,
+ secret: String
+
+ fooAlias: String
+
+ mutableProperty: ComplexProperty
+
+ createProperty: ComplexProperty
- fooAlias: String,
+ writeProperty: ComplexProperty
- mutableProperty: ComplexProperty,
- createProperty: ComplexProperty,
- writeProperty: ComplexProperty,
- createWriteProperty: ArbitraryMap,
+ createWriteProperty: ArbitraryMap
}
structure CreateFooResponse {
- fooId: String,
+ fooId: String
}
@readonly
@http(method: "GET", uri: "/foos/{fooId}", code: 200)
operation GetFoo {
- input: GetFooRequest,
- output: GetFooResponse,
+ input: GetFooRequest
+ output: GetFooResponse
}
structure GetFooRequest {
@httpLabel
@required
- fooId: String,
+ fooId: String
@httpQuery("fooAlias")
@cfnAdditionalIdentifier
- fooAlias: String,
+ fooAlias: String
}
structure GetFooResponse {
- fooId: String,
+ fooId: String
@httpResponseCode
@cfnExcludeProperty
- responseCode: Integer,
+ responseCode: Integer
@cfnMutability("read")
- updatedAt: Timestamp,
+ updatedAt: Timestamp
- mutableProperty: ComplexProperty,
- createProperty: ComplexProperty,
- readProperty: ComplexProperty,
+ mutableProperty: ComplexProperty
+
+ createProperty: ComplexProperty
+
+ readProperty: ComplexProperty
}
@idempotent
@http(method: "PUT", uri: "/foos/{fooId}", code: 200)
operation UpdateFoo {
- input: UpdateFooRequest,
+ input: UpdateFooRequest
}
structure UpdateFooRequest {
@httpLabel
@required
- fooId: String,
+ fooId: String
+
+ fooAlias: String
+
+ writeProperty: ComplexProperty
- fooAlias: String,
- writeProperty: ComplexProperty,
- mutableProperty: ComplexProperty,
+ mutableProperty: ComplexProperty
}
structure FooProperties {
- addedProperty: String,
+ addedProperty: String
@cfnMutability("full")
- barProperty: String,
+ barProperty: String
@cfnMutability("create-and-read")
- immutableSetting: Boolean,
+ immutableSetting: Boolean
@cfnMutability("read")
- createdAt: Timestamp,
+ createdAt: Timestamp
@cfnMutability("write")
- password: String,
+ password: String
}
structure ComplexProperty {
- anotherProperty: String,
+ anotherProperty: String
}
list TagList {
@@ -121,6 +128,6 @@ list TagList {
}
map ArbitraryMap {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-and-read-mutability.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-and-read-mutability.smithy
index 0fc58e2d258..46f10c579af 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-and-read-mutability.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-and-read-mutability.smithy
@@ -4,18 +4,20 @@ use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [CreateAndRead]
+ version: "2020-07-02"
+ resources: [
+ CreateAndRead
+ ]
}
-@cfnResource(additionalSchemas: [FooProperties])
+@cfnResource(
+ additionalSchemas: [FooProperties]
+)
resource CreateAndRead {
- identifiers: {
- fooId: String,
- },
+ identifiers: { fooId: String }
}
structure FooProperties {
@cfnMutability("create-and-read")
- immutableSetting: Boolean,
+ immutableSetting: Boolean
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-write-mutability.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-write-mutability.smithy
index b188bc94185..c227ab93e70 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-write-mutability.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/create-write-mutability.smithy
@@ -1,34 +1,29 @@
namespace smithy.example
-use aws.cloudformation#cfnAdditionalIdentifier
use aws.cloudformation#cfnResource
-use aws.cloudformation#cfnExcludeProperty
-use aws.cloudformation#cfnMutability
service TestService {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- CreateWrite,
- ],
+ CreateWrite
+ ]
}
@cfnResource
resource CreateWrite {
- identifiers: {
- fooId: String,
- },
- create: CreateFoo,
+ identifiers: { fooId: String }
+ create: CreateFoo
}
operation CreateFoo {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
- createWriteProperty: String,
+ createWriteProperty: String
}
structure CreateFooResponse {
- fooId: String,
+ fooId: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/full-mutability.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/full-mutability.smithy
index 9c2b2fecfc2..a8d6c61fd76 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/full-mutability.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/full-mutability.smithy
@@ -4,35 +4,37 @@ use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [Full]
+ version: "2020-07-02"
+ resources: [
+ Full
+ ]
}
-@cfnResource(additionalSchemas: [FooProperties])
+@cfnResource(
+ additionalSchemas: [FooProperties]
+)
resource Full {
- identifiers: {
- fooId: String,
- },
- create: CreateFoo,
+ identifiers: { fooId: String }
+ create: CreateFoo
}
operation CreateFoo {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
@cfnMutability("full")
- tags: TagList,
+ tags: TagList
}
structure CreateFooResponse {
- fooId: String,
+ fooId: String
}
structure FooProperties {
@cfnMutability("full")
- barProperty: String,
+ barProperty: String
}
list TagList {
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/nested-properties.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/nested-properties.smithy
index 9ba3c85238a..45fcaf9c819 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/nested-properties.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/nested-properties.smithy
@@ -2,22 +2,19 @@ $version: "2.0"
namespace smithy.example
-use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [Forecast]
+ version: "2020-07-02"
+ resources: [
+ Forecast
+ ]
}
-@cfnResource()
+@cfnResource
resource Forecast {
- identifiers: {
- forecastId: String
- }
- properties: {
- chanceOfRain: Float
- }
+ identifiers: { forecastId: String }
+ properties: { chanceOfRain: Float }
read: GetForecast
put: PutForecast
create: CreateForecast
@@ -30,6 +27,7 @@ operation GetForecast {
@required
forecastId: String
}
+
output := {
@nestedProperties
forecastData: ForecastData
@@ -41,6 +39,7 @@ operation PutForecast {
input := {
@required
forecastId: String
+
@nestedProperties
forecastData: ForecastData
}
@@ -57,6 +56,7 @@ operation UpdateForecast {
input := {
@required
forecastId: String
+
@nestedProperties
forecastData: ForecastData
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/put-lifecycle.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/put-lifecycle.smithy
index e2d77d5549c..e19344317a9 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/put-lifecycle.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/put-lifecycle.smithy
@@ -4,39 +4,41 @@ use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [PutResource]
+ version: "2020-07-02"
+ resources: [
+ PutResource
+ ]
}
-@cfnResource(additionalSchemas: [FooProperties])
+@cfnResource(
+ additionalSchemas: [FooProperties]
+)
resource PutResource {
- identifiers: {
- fooId: String,
- },
- put: PutFoo,
+ identifiers: { fooId: String }
+ put: PutFoo
}
@idempotent
operation PutFoo {
- input: PutFooRequest,
- output: PutFooResponse,
+ input: PutFooRequest
+ output: PutFooResponse
}
structure PutFooRequest {
@required
- fooId: String,
+ fooId: String
@cfnMutability("full")
- tags: TagList,
+ tags: TagList
}
structure PutFooResponse {
- fooId: String,
+ fooId: String
}
structure FooProperties {
@cfnMutability("full")
- barProperty: String,
+ barProperty: String
}
list TagList {
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/queue-example.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/queue-example.smithy
index 9b394e4cbc9..e4becc8e98e 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/queue-example.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/queue-example.smithy
@@ -3,34 +3,30 @@ $version: "2.0"
namespace smithy.example
use aws.cloudformation#cfnAdditionalIdentifier
-use aws.cloudformation#cfnName
-use aws.cloudformation#cfnResource
use aws.cloudformation#cfnExcludeProperty
use aws.cloudformation#cfnMutability
+use aws.cloudformation#cfnName
+use aws.cloudformation#cfnResource
service TestService {
- version: "2012-11-05",
+ version: "2012-11-05"
resources: [
- Queue,
+ Queue
]
}
/// Definition of Smithy::TestService::Queue Resource Type
@cfnResource(
- additionalSchemas: [
- GetQueueUrlResult,
- AttributeStructure,
- ])
+ additionalSchemas: [GetQueueUrlResult, AttributeStructure]
+)
resource Queue {
// The QueueName is the literal identifier, but access
// in other operations is handled through the QueueUrl.
- identifiers: {
- QueueName: String,
- },
- put: CreateQueue,
+ identifiers: { QueueName: String }
+ put: CreateQueue
operations: [
- GetQueueUrl,
- ],
+ GetQueueUrl
+ ]
}
// This structure is necessary to handle the way these queue
@@ -40,87 +36,90 @@ resource Queue {
structure AttributeStructure {
@cfnMutability("read")
@cfnAdditionalIdentifier
- Arn: String,
- ContentBasedDeduplication: Boolean,
+ Arn: String
+
+ ContentBasedDeduplication: Boolean
@range(min: 0, max: 900)
- DelaySeconds: Integer,
+ DelaySeconds: Integer
@cfnMutability("create-and-read")
- FifoQueue: Boolean,
- KmsMasterKeyId: String,
+ FifoQueue: Boolean
+
+ KmsMasterKeyId: String
@range(min: 60, max: 86400)
- KmsDataKeyReusePeriodSeconds: Integer,
+ KmsDataKeyReusePeriodSeconds: Integer
@range(min: 1024, max: 262144)
- MaximumMessageSize: Integer,
+ MaximumMessageSize: Integer
@range(min: 60, max: 1209600)
- MessageRetentionPeriod: Integer,
+ MessageRetentionPeriod: Integer
@range(min: 0, max: 20)
- ReceiveMessageWaitTimeSeconds: Integer,
- RedrivePolicy: RedrivePolicy,
+ ReceiveMessageWaitTimeSeconds: Integer
+
+ RedrivePolicy: RedrivePolicy
@range(min: 0, max: 43200)
- VisibilityTimeout: Integer,
+ VisibilityTimeout: Integer
}
@internal
structure RedrivePolicy {
- deadLetterTargetArn: String,
- maxReceiveCount: Integer,
+ deadLetterTargetArn: String
+ maxReceiveCount: Integer
}
@idempotent
operation CreateQueue {
- input: CreateQueueRequest,
- output: CreateQueueResult,
+ input: CreateQueueRequest
+ output: CreateQueueResult
errors: [
- QueueDeletedRecently,
- QueueNameExists,
- ],
+ QueueDeletedRecently
+ QueueNameExists
+ ]
}
operation GetQueueUrl {
- input: GetQueueUrlRequest,
- output: GetQueueUrlResult,
+ input: GetQueueUrlRequest
+ output: GetQueueUrlResult
errors: [
- QueueDoesNotExist,
- ],
+ QueueDoesNotExist
+ ]
}
structure CreateQueueRequest {
@cfnName("Tags")
@cfnMutability("full")
- tags: TagMap,
+ tags: TagMap
@required
- QueueName: String,
+ QueueName: String
// Exclude this property because we've modeled explicitly
// as the AttributeStructure structure.
@cfnExcludeProperty
- Attributes: QueueAttributeMap,
+ Attributes: QueueAttributeMap
}
structure CreateQueueResult {
- QueueUrl: String,
+ QueueUrl: String
}
structure GetQueueUrlRequest {
- QueueOwnerAWSAccountId: String,
+ QueueOwnerAWSAccountId: String
@required
- QueueName: String,
+ QueueName: String
}
structure GetQueueUrlResult {
@cfnAdditionalIdentifier
@cfnMutability("read")
@cfnName("URL")
- QueueUrl: String,
+ QueueUrl: String
}
@error("client")
@@ -136,72 +135,70 @@ structure QueueDoesNotExist {}
structure QueueNameExists {}
map QueueAttributeMap {
- key: QueueAttributeName,
-
- value: String,
+ key: QueueAttributeName
+ value: String
}
map TagMap {
- key: TagKey,
-
- value: TagValue,
+ key: TagKey
+ value: TagValue
}
@enum([
{
- value: "All",
- },
+ value: "All"
+ }
{
- value: "Policy",
- },
+ value: "Policy"
+ }
{
- value: "VisibilityTimeout",
- },
+ value: "VisibilityTimeout"
+ }
{
- value: "MaximumMessageSize",
- },
+ value: "MaximumMessageSize"
+ }
{
- value: "MessageRetentionPeriod",
- },
+ value: "MessageRetentionPeriod"
+ }
{
- value: "ApproximateNumberOfMessages",
- },
+ value: "ApproximateNumberOfMessages"
+ }
{
- value: "ApproximateNumberOfMessagesNotVisible",
- },
+ value: "ApproximateNumberOfMessagesNotVisible"
+ }
{
- value: "CreatedTimestamp",
- },
+ value: "CreatedTimestamp"
+ }
{
- value: "LastModifiedTimestamp",
- },
+ value: "LastModifiedTimestamp"
+ }
{
- value: "QueueArn",
- },
+ value: "QueueArn"
+ }
{
- value: "ApproximateNumberOfMessagesDelayed",
- },
+ value: "ApproximateNumberOfMessagesDelayed"
+ }
{
- value: "DelaySeconds",
- },
+ value: "DelaySeconds"
+ }
{
- value: "ReceiveMessageWaitTimeSeconds",
- },
+ value: "ReceiveMessageWaitTimeSeconds"
+ }
{
- value: "RedrivePolicy",
- },
+ value: "RedrivePolicy"
+ }
{
- value: "FifoQueue",
- },
+ value: "FifoQueue"
+ }
{
- value: "ContentBasedDeduplication",
- },
+ value: "ContentBasedDeduplication"
+ }
{
- value: "KmsMasterKeyId",
- },
+ value: "KmsMasterKeyId"
+ }
{
- value: "KmsDataKeyReusePeriodSeconds",
- },
+ value: "KmsDataKeyReusePeriodSeconds"
+ }
])
string QueueAttributeName
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/read-mutability.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/read-mutability.smithy
index f044d17d142..ddd77901a90 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/read-mutability.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/read-mutability.smithy
@@ -4,22 +4,24 @@ use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [Read]
+ version: "2020-07-02"
+ resources: [
+ Read
+ ]
}
-@cfnResource(additionalSchemas: [FooProperties])
+@cfnResource(
+ additionalSchemas: [FooProperties]
+)
resource Read {
- identifiers: {
- fooId: String,
- },
- read: GetFoo,
+ identifiers: { fooId: String }
+ read: GetFoo
}
@readonly
operation GetFoo {
- input: GetFooRequest,
- output: GetFooResponse,
+ input: GetFooRequest
+ output: GetFooResponse
}
structure GetFooRequest {
@@ -29,10 +31,10 @@ structure GetFooRequest {
structure GetFooResponse {
@cfnMutability("read")
- updatedAt: Timestamp,
+ updatedAt: Timestamp
}
structure FooProperties {
@cfnMutability("read")
- createdAt: Timestamp,
+ createdAt: Timestamp
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/required-output.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/required-output.smithy
index a98e6c29cd0..ef44dde4aa0 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/required-output.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/required-output.smithy
@@ -1,62 +1,61 @@
namespace smithy.example
-use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [RequiredOutput]
+ version: "2020-07-02"
+ resources: [
+ RequiredOutput
+ ]
}
@cfnResource
resource RequiredOutput {
- identifiers: {
- fooId: String,
- },
- create: CreateFoo,
- read: ReadFoo,
+ identifiers: { fooId: String }
+ create: CreateFoo
+ read: ReadFoo
}
operation CreateFoo {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
@required
- tags: TagList,
+ tags: TagList
}
structure CreateFooResponse {
@required
- fooId: String,
+ fooId: String
}
@readonly
operation ReadFoo {
- input: ReadFooRequest,
- output: ReadFooResponse,
+ input: ReadFooRequest
+ output: ReadFooResponse
}
structure ReadFooRequest {
@required
- fooId: String,
+ fooId: String
}
@output
structure ReadFooResponse {
@required
- fooId: String,
+ fooId: String
// This property should be included as required since is also part
// of the request as @required
@required
- tags: TagList,
+ tags: TagList
// This property should NOT be included as required since is only
// part of an output structure.
@required
- lastUpdate: Timestamp,
+ lastUpdate: Timestamp
}
list TagList {
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/write-mutability.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/write-mutability.smithy
index 88edf0d285c..e0beb99c8e8 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/write-mutability.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/integ/write-mutability.smithy
@@ -4,33 +4,35 @@ use aws.cloudformation#cfnMutability
use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
- resources: [Write]
+ version: "2020-07-02"
+ resources: [
+ Write
+ ]
}
-@cfnResource(additionalSchemas: [FooProperties])
+@cfnResource(
+ additionalSchemas: [FooProperties]
+)
resource Write {
- identifiers: {
- fooId: String,
- },
- create: CreateFoo,
+ identifiers: { fooId: String }
+ create: CreateFoo
}
operation CreateFoo {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
@cfnMutability("write")
- secret: String,
+ secret: String
}
structure CreateFooResponse {
- fooId: String,
+ fooId: String
}
structure FooProperties {
@cfnMutability("write")
- password: String,
+ password: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/simple.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/simple.smithy
index edcf04fecc8..d195d15cbdf 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/simple.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/simple.smithy
@@ -6,112 +6,116 @@ use aws.cloudformation#cfnResource
use aws.iam#iamAction
service TestService {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- FooResource,
- ],
+ FooResource
+ ]
}
/// The Foo resource is cool.
@externalDocumentation(
- "Documentation Url": "https://docs.example.com",
- "Source Url": "https://source.example.com",
- "Main": "https://docs2.example.com",
- "Code": "https://source2.example.com",
+ "Documentation Url": "https://docs.example.com"
+ "Source Url": "https://source.example.com"
+ Main: "https://docs2.example.com"
+ Code: "https://source2.example.com"
)
@cfnResource
resource FooResource {
- identifiers: {
- fooId: FooId,
- },
- create: CreateFooOperation,
- read: GetFooOperation,
- update: UpdateFooOperation,
+ identifiers: { fooId: FooId }
+ create: CreateFooOperation
+ read: GetFooOperation
+ update: UpdateFooOperation
}
@aws.iam#requiredActions(["otherservice:DescribeDependencyComponent"])
operation CreateFooOperation {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
- fooValidCreateProperty: String,
+ fooValidCreateProperty: String
@required
- fooRequiredProperty: String,
+ fooRequiredProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
- fooValidFullyMutableProperty: ComplexProperty,
+ fooDeprecatedMutableProperty: String
+
+ fooValidFullyMutableProperty: ComplexProperty
}
structure CreateFooResponse {
- fooId: FooId,
+ fooId: FooId
- fooRequiredProperty: String,
+ fooRequiredProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
- fooValidFullyMutableProperty: ComplexProperty,
+ fooDeprecatedMutableProperty: String
+
+ fooValidFullyMutableProperty: ComplexProperty
}
@readonly
-@iamAction(requiredActions: ["otherservice:DescribeThing"])
+@iamAction(
+ requiredActions: ["otherservice:DescribeThing"]
+)
operation GetFooOperation {
- input: GetFooRequest,
- output: GetFooResponse,
+ input: GetFooRequest
+ output: GetFooResponse
}
structure GetFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
}
structure GetFooResponse {
- fooId: FooId,
+ fooId: FooId
- fooRequiredProperty: String,
- fooValidReadProperty: String,
+ fooRequiredProperty: String
+
+ fooValidReadProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
+ fooDeprecatedMutableProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
operation UpdateFooOperation {
- input: UpdateFooRequest,
- output: UpdateFooResponse,
+ input: UpdateFooRequest
+ output: UpdateFooResponse
}
structure UpdateFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
+
+ fooRequiredProperty: String
- fooRequiredProperty: String,
- fooValidWriteProperty: String,
+ fooValidWriteProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
+ fooDeprecatedMutableProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
structure UpdateFooResponse {
- fooId: FooId,
+ fooId: FooId
- fooValidReadProperty: String,
+ fooValidReadProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
+ fooDeprecatedMutableProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
string FooId
structure ComplexProperty {
- property: String,
- another: String,
+ property: String
+ another: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/simple-service-aws.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/simple-service-aws.smithy
index 1740c222e53..21f774402fd 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/simple-service-aws.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/simple-service-aws.smithy
@@ -7,126 +7,126 @@ use aws.cloudformation#cfnResource
@service(sdkId: "Some Thing", cloudFormationName: "SomeThing", arnNamespace: "something")
service TestService {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- FooResource,
- ],
+ FooResource
+ ]
}
/// The Foo resource is cool.
@externalDocumentation(
- "Documentation Url": "https://docs.example.com",
- "Source Url": "https://source.example.com",
- "Main": "https://docs2.example.com",
- "Code": "https://source2.example.com",
+ "Documentation Url": "https://docs.example.com"
+ "Source Url": "https://source.example.com"
+ Main: "https://docs2.example.com"
+ Code: "https://source2.example.com"
)
@cfnResource
resource FooResource {
- identifiers: {
- fooId: FooId,
- },
- create: CreateFooOperation,
- read: GetFooOperation,
- update: UpdateFooOperation,
- delete: DeleteFooOperation,
+ identifiers: { fooId: FooId }
+ create: CreateFooOperation
+ read: GetFooOperation
+ update: UpdateFooOperation
+ delete: DeleteFooOperation
list: ListFoosOperation
}
@aws.iam#requiredActions(["otherservice:DescribeDependencyComponent"])
operation CreateFooOperation {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
- fooValidCreateProperty: String,
+ fooValidCreateProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
- fooValidFullyMutableProperty: ComplexProperty,
+ fooDeprecatedMutableProperty: String
+
+ fooValidFullyMutableProperty: ComplexProperty
}
structure CreateFooResponse {
- fooId: FooId,
+ fooId: FooId
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
- fooValidFullyMutableProperty: ComplexProperty,
+ fooDeprecatedMutableProperty: String
+
+ fooValidFullyMutableProperty: ComplexProperty
}
@readonly
operation GetFooOperation {
- input: GetFooRequest,
- output: GetFooResponse,
+ input: GetFooRequest
+ output: GetFooResponse
}
structure GetFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
}
structure GetFooResponse {
- fooId: FooId,
+ fooId: FooId
- fooValidReadProperty: String,
+ fooValidReadProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
+ fooDeprecatedMutableProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
operation UpdateFooOperation {
- input: UpdateFooRequest,
- output: UpdateFooResponse,
+ input: UpdateFooRequest
+ output: UpdateFooResponse
}
structure UpdateFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
- fooValidWriteProperty: String,
+ fooValidWriteProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
+ fooDeprecatedMutableProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
structure UpdateFooResponse {
- fooId: FooId,
+ fooId: FooId
- fooValidReadProperty: String,
+ fooValidReadProperty: String
@deprecated(message: "Use the `fooValidFullyMutableProperty` property.")
- fooDeprecatedMutableProperty: String,
+ fooDeprecatedMutableProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
}
@idempotent
operation DeleteFooOperation {
- input: DeleteFooRequest,
- output: DeleteFooResponse,
+ input: DeleteFooRequest
+ output: DeleteFooResponse
}
structure DeleteFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
}
structure DeleteFooResponse {}
@readonly
operation ListFoosOperation {
- input: ListFoosRequest,
- output: ListFoosResult,
+ input: ListFoosRequest
+ output: ListFoosResult
}
structure ListFoosRequest {}
structure ListFoosResult {
- foos: FooSummaryList,
+ foos: FooSummaryList
}
list FooSummaryList {
@@ -134,13 +134,13 @@ list FooSummaryList {
}
structure FooSummary {
- fooId: FooId,
- fooValidFullyMutableProperty: ComplexProperty,
+ fooId: FooId
+ fooValidFullyMutableProperty: ComplexProperty
}
string FooId
structure ComplexProperty {
- property: String,
- another: String,
+ property: String
+ another: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/tagging.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/tagging.smithy
index a4465f4472f..385d05ad349 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/tagging.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/tagging.smithy
@@ -19,20 +19,24 @@ operation TagResource {
input := {
@required
arn: String
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagResource {
input := {
@required
arn: String
+
@required
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForResource {
@@ -40,6 +44,7 @@ operation ListTagsForResource {
@required
arn: String
}
+
output := {
@length(max: 128)
tags: TagList
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/test-service.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/test-service.smithy
index ce5783bcb75..f37dbaba71c 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/test-service.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/test-service.smithy
@@ -3,238 +3,238 @@ $version: "2.0"
namespace smithy.example
use aws.cloudformation#cfnAdditionalIdentifier
-use aws.cloudformation#cfnResource
use aws.cloudformation#cfnExcludeProperty
use aws.cloudformation#cfnMutability
+use aws.cloudformation#cfnResource
service TestService {
- version: "2020-07-02",
+ version: "2020-07-02"
resources: [
- FooResource,
- BarResource,
- ],
+ FooResource
+ BarResource
+ ]
}
/// The Foo resource is cool.
@cfnResource
resource FooResource {
- identifiers: {
- fooId: FooId,
- },
- create: CreateFooOperation,
- read: GetFooOperation,
- update: UpdateFooOperation,
+ identifiers: { fooId: FooId }
+ create: CreateFooOperation
+ read: GetFooOperation
+ update: UpdateFooOperation
}
operation CreateFooOperation {
- input: CreateFooRequest,
- output: CreateFooResponse,
+ input: CreateFooRequest
+ output: CreateFooResponse
}
structure CreateFooRequest {
- fooValidCreateProperty: FooMap,
-
- fooValidCreateReadProperty: String,
-
- fooValidFullyMutableProperty: ComplexProperty,
-
- conditionalProperty: ConditionalProperty,
+ fooValidCreateProperty: FooMap
+ fooValidCreateReadProperty: String
+ fooValidFullyMutableProperty: ComplexProperty
+ conditionalProperty: ConditionalProperty
}
structure CreateFooResponse {
- fooId: FooId,
+ fooId: FooId
}
@readonly
operation GetFooOperation {
- input: GetFooRequest,
- output: GetFooResponse,
+ input: GetFooRequest
+ output: GetFooResponse
}
structure GetFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
}
structure GetFooResponse {
- fooId: FooId,
-
- fooValidReadProperty: String,
-
- fooValidCreateReadProperty: String,
-
- fooValidFullyMutableProperty: ComplexProperty,
-
- conditionalProperty: ConditionalProperty,
+ fooId: FooId
+ fooValidReadProperty: String
+ fooValidCreateReadProperty: String
+ fooValidFullyMutableProperty: ComplexProperty
+ conditionalProperty: ConditionalProperty
}
operation UpdateFooOperation {
- input: UpdateFooRequest,
- output: UpdateFooResponse,
+ input: UpdateFooRequest
+ output: UpdateFooResponse
}
structure UpdateFooRequest {
@required
- fooId: FooId,
+ fooId: FooId
@cfnMutability("write")
- fooValidWriteProperty: String,
+ fooValidWriteProperty: String
- fooValidFullyMutableProperty: ComplexProperty,
+ fooValidFullyMutableProperty: ComplexProperty
- conditionalProperty: ConditionalProperty,
+ conditionalProperty: ConditionalProperty
}
structure UpdateFooResponse {
- fooId: FooId,
-
- fooValidReadProperty: String,
-
- fooValidFullyMutableProperty: ComplexProperty,
-
- conditionalProperty: ConditionalProperty,
+ fooId: FooId
+ fooValidReadProperty: String
+ fooValidFullyMutableProperty: ComplexProperty
+ conditionalProperty: ConditionalProperty
}
/// A Bar resource, not that kind of bar though.
-@cfnResource(name: "Bar", additionalSchemas: [ExtraBarRequest])
+@cfnResource(
+ name: "Bar"
+ additionalSchemas: [ExtraBarRequest]
+)
resource BarResource {
- identifiers: {
- barId: BarId,
- },
- put: PutBarOperation,
- read: GetBarOperation,
- operations: [ExtraBarOperation],
- resources: [BazResource],
+ identifiers: { barId: BarId }
+ put: PutBarOperation
+ read: GetBarOperation
+ operations: [
+ ExtraBarOperation
+ ]
+ resources: [
+ BazResource
+ ]
}
@idempotent
@aws.iam#requiredActions(["otherservice:DescribeDependencyComponent"])
operation PutBarOperation {
- input: PutBarRequest,
+ input: PutBarRequest
}
structure PutBarRequest {
@required
- barId: BarId,
+ barId: BarId
- barImplicitFullProperty: String,
+ barImplicitFullProperty: String
}
@readonly
operation GetBarOperation {
- input: GetBarRequest,
- output: GetBarResponse,
+ input: GetBarRequest
+ output: GetBarResponse
}
structure GetBarRequest {
@required
- barId: BarId,
+ barId: BarId
@cfnAdditionalIdentifier
- arn: String,
+ arn: String
}
structure GetBarResponse {
- barId: BarId,
- barImplicitReadProperty: String,
- barImplicitFullProperty: String,
+ barId: BarId
+
+ barImplicitReadProperty: String
+
+ barImplicitFullProperty: String
@cfnMutability("full")
- barExplicitMutableProperty: String,
+ barExplicitMutableProperty: String
}
operation ExtraBarOperation {
- input: ExtraBarRequest,
+ input: ExtraBarRequest
}
structure ExtraBarRequest {
@required
- barId: BarId,
+ barId: BarId
- barValidAdditionalProperty: String,
+ barValidAdditionalProperty: String
@cfnExcludeProperty
- barValidExcludedProperty: String,
+ barValidExcludedProperty: String
}
/// This is an herb.
-@cfnResource("name": "Basil")
+@cfnResource(name: "Basil")
resource BazResource {
- identifiers: {
- barId: BarId,
- bazId: BazId,
- },
- create: CreateBazOperation,
- read: GetBazOperation,
- update: UpdateBazOperation,
+ identifiers: { barId: BarId, bazId: BazId }
+ create: CreateBazOperation
+ read: GetBazOperation
+ update: UpdateBazOperation
}
operation CreateBazOperation {
- input: CreateBazRequest,
- output: CreateBazResponse,
+ input: CreateBazRequest
+ output: CreateBazResponse
}
structure CreateBazRequest {
@required
- barId: BarId,
+ barId: BarId
+
+ bazExplicitMutableProperty: String
+
+ bazImplicitCreateProperty: String
+
+ bazImplicitFullyMutableProperty: String
- bazExplicitMutableProperty: String,
- bazImplicitCreateProperty: String,
- bazImplicitFullyMutableProperty: String,
- bazImplicitWriteProperty: String,
+ bazImplicitWriteProperty: String
}
structure CreateBazResponse {
- barId: BarId,
- bazId: BazId,
+ barId: BarId
+ bazId: BazId
}
@readonly
operation GetBazOperation {
- input: GetBazRequest,
- output: GetBazResponse,
+ input: GetBazRequest
+ output: GetBazResponse
}
structure GetBazRequest {
@required
- barId: BarId,
+ barId: BarId
@required
- bazId: BazId,
+ bazId: BazId
}
structure GetBazResponse {
- barId: BarId,
- bazId: BazId,
+ barId: BarId
+
+ bazId: BazId
@cfnMutability("full")
- bazExplicitMutableProperty: String,
- bazImplicitCreateProperty: String,
- bazImplicitReadProperty: String,
- bazImplicitFullyMutableProperty: String,
+ bazExplicitMutableProperty: String
+
+ bazImplicitCreateProperty: String
+
+ bazImplicitReadProperty: String
+
+ bazImplicitFullyMutableProperty: String
}
operation UpdateBazOperation {
- input: UpdateBazRequest,
- output: UpdateBazResponse,
+ input: UpdateBazRequest
+ output: UpdateBazResponse
}
structure UpdateBazRequest {
@required
- barId: BarId,
+ barId: BarId
@required
- bazId: BazId,
+ bazId: BazId
+
+ bazImplicitWriteProperty: String
- bazImplicitWriteProperty: String,
- bazImplicitFullyMutableProperty: String,
+ bazImplicitFullyMutableProperty: String
}
structure UpdateBazResponse {
- barId: BarId,
- bazId: BazId,
- bazImplicitWriteProperty: String,
- bazImplicitFullyMutableProperty: String,
+ barId: BarId
+ bazId: BazId
+ bazImplicitWriteProperty: String
+ bazImplicitFullyMutableProperty: String
}
string FooId
@@ -244,16 +244,16 @@ string BarId
string BazId
structure ComplexProperty {
- property: String,
- another: String,
+ property: String
+ another: String
}
union ConditionalProperty {
- optionOne: String,
- optionTwo: String,
+ optionOne: String
+ optionTwo: String
}
map FooMap {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather-service-wide.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather-service-wide.smithy
index 33b04f1d171..8c808306f77 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather-service-wide.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather-service-wide.smithy
@@ -2,35 +2,40 @@ $version: "2.0"
namespace example.weather
-use aws.cloudformation#cfnResource
use aws.api#arn
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
+use aws.cloudformation#cfnResource
/// Provides weather forecasts.
-@paginated(inputToken: "nextToken", outputToken: "nextToken",
- pageSize: "pageSize")
+@paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize")
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime, example.tagging#TagResource, example.tagging#UntagResource, example.tagging#ListTagsForResource]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ example.tagging#TagResource
+ example.tagging#UntagResource
+ example.tagging#ListTagsForResource
+ ]
}
@cfnResource
@taggable
@arn(template: "city/{CityId}")
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates }
create: CreateCity
- read: GetCity,
+ read: GetCity
update: UpdateCity
- list: ListCities,
- resources: [Forecast]
+ list: ListCities
+ resources: [
+ Forecast
+ ]
}
operation CreateCity {
@@ -38,25 +43,30 @@ operation CreateCity {
name: String
coordinates: CityCoordinates
}
+
output := {
@required
cityId: CityId
}
}
+
operation UpdateCity {
input := {
@required
cityId: CityId
+
name: String
+
coordinates: CityCoordinates
}
+
output := {}
}
/// @cfnResource
resource Forecast {
- identifiers: { cityId: CityId },
- read: GetForecast,
+ identifiers: { cityId: CityId }
+ read: GetForecast
}
@pattern("^[A-Za-z0-9 ]+$")
@@ -64,9 +74,11 @@ string CityId
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -82,19 +94,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -110,22 +122,22 @@ structure NoSuchResource {
@readonly
@paginated(items: "items")
operation ListCities {
- input: ListCitiesInput,
+ input: ListCitiesInput
output: ListCitiesOutput
}
@input
structure ListCitiesInput {
- nextToken: String,
+ nextToken: String
pageSize: Integer
}
@output
structure ListCitiesOutput {
- nextToken: String,
+ nextToken: String
@required
- items: CitySummaries,
+ items: CitySummaries
}
// CitySummaries is a list of CitySummary structures.
@@ -134,18 +146,22 @@ list CitySummaries {
}
// CitySummary contains a reference to a City.
-@references([{resource: City}])
+@references([
+ {
+ resource: City
+ }
+])
structure CitySummary {
@required
- cityId: CityId,
+ cityId: CityId
@required
- name: String,
+ name: String
}
@readonly
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
@@ -160,7 +176,7 @@ structure GetCurrentTimeOutput {
@readonly
operation GetForecast {
- input: GetForecastInput,
+ input: GetForecastInput
output: GetForecastOutput
}
@@ -169,7 +185,7 @@ operation GetForecast {
@input
structure GetForecastInput {
@required
- cityId: CityId,
+ cityId: CityId
}
@output
diff --git a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather.smithy b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather.smithy
index d49df068676..647066fade3 100644
--- a/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather.smithy
+++ b/smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/weather.smithy
@@ -2,39 +2,46 @@ $version: "2.0"
namespace example.weather
-use aws.cloudformation#cfnResource
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
+use aws.cloudformation#cfnResource
/// Provides weather forecasts.
-@paginated(inputToken: "nextToken", outputToken: "nextToken",
- pageSize: "pageSize")
+@paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize")
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ ]
}
operation TagCity {
input := {
@required
cityId: CityId
+
@length(max: 128)
tags: example.tagging#TagList
}
- output := { }
+
+ output := {}
}
operation UntagCity {
input := {
@required
cityId: CityId
+
@required
@notProperty
tagKeys: example.tagging#TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForCity {
@@ -42,27 +49,33 @@ operation ListTagsForCity {
@required
cityId: CityId
}
- output := {
+
+ output := {
@length(max: 128)
tags: example.tagging#TagList
}
}
@cfnResource
-@taggable(property: "tags", apiConfig: {tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity})
+@taggable(
+ property: "tags"
+ apiConfig: { tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity }
+)
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tags: example.tagging#TagList
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tags: example.tagging#TagList }
create: CreateCity
- read: GetCity,
+ read: GetCity
update: UpdateCity
- list: ListCities,
- operations: [TagCity, UntagCity, ListTagsForCity],
- resources: [Forecast],
+ list: ListCities
+ operations: [
+ TagCity
+ UntagCity
+ ListTagsForCity
+ ]
+ resources: [
+ Forecast
+ ]
}
operation CreateCity {
@@ -70,25 +83,30 @@ operation CreateCity {
name: String
coordinates: CityCoordinates
}
+
output := {
@required
cityId: CityId
}
}
+
operation UpdateCity {
input := {
@required
cityId: CityId
+
name: String
+
coordinates: CityCoordinates
}
+
output := {}
}
/// @cfnResource
resource Forecast {
- identifiers: { cityId: CityId },
- read: GetForecast,
+ identifiers: { cityId: CityId }
+ read: GetForecast
}
@pattern("^[A-Za-z0-9 ]+$")
@@ -96,9 +114,11 @@ string CityId
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -114,19 +134,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -142,22 +162,22 @@ structure NoSuchResource {
@readonly
@paginated(items: "items")
operation ListCities {
- input: ListCitiesInput,
+ input: ListCitiesInput
output: ListCitiesOutput
}
@input
structure ListCitiesInput {
- nextToken: String,
+ nextToken: String
pageSize: Integer
}
@output
structure ListCitiesOutput {
- nextToken: String,
+ nextToken: String
@required
- items: CitySummaries,
+ items: CitySummaries
}
// CitySummaries is a list of CitySummary structures.
@@ -166,18 +186,22 @@ list CitySummaries {
}
// CitySummary contains a reference to a City.
-@references([{resource: City}])
+@references([
+ {
+ resource: City
+ }
+])
structure CitySummary {
@required
- cityId: CityId,
+ cityId: CityId
@required
- name: String,
+ name: String
}
@readonly
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
@@ -192,7 +216,7 @@ structure GetCurrentTimeOutput {
@readonly
operation GetForecast {
- input: GetForecastInput,
+ input: GetForecastInput
output: GetForecastOutput
}
@@ -201,11 +225,10 @@ operation GetForecast {
@input
structure GetForecastInput {
@required
- cityId: CityId,
+ cityId: CityId
}
@output
structure GetForecastOutput {
chanceOfRain: Float
}
-
diff --git a/smithy-aws-endpoints/src/main/resources/META-INF/smithy/aws.endpoints.smithy b/smithy-aws-endpoints/src/main/resources/META-INF/smithy/aws.endpoints.smithy
index cfcaf96bde1..49efa7623e7 100644
--- a/smithy-aws-endpoints/src/main/resources/META-INF/smithy/aws.endpoints.smithy
+++ b/smithy-aws-endpoints/src/main/resources/META-INF/smithy/aws.endpoints.smithy
@@ -7,30 +7,39 @@ namespace aws.endpoints
/// The targeted trait must only be applied to service shapes,
/// must be a structure, and must have the `trait` trait.
@trait(
- selector: "structure[trait|trait]",
- breakingChanges: [{change: "presence"}]
+ selector: "structure[trait|trait]"
+ breakingChanges: [
+ {
+ change: "presence"
+ }
+ ]
)
-structure endpointsModifier { }
+structure endpointsModifier {}
/// Marks that a services endpoints should be resolved using
/// standard regional endpoint patterns.
@trait(
- selector: "service",
- conflicts: [standardPartitionalEndpoints],
- breakingChanges: [{change: "remove"}]
+ selector: "service"
+ conflicts: [standardPartitionalEndpoints]
+ breakingChanges: [
+ {
+ change: "remove"
+ }
+ ]
)
@endpointsModifier
@unstable
structure standardRegionalEndpoints {
/// A list of partition special cases - endpoints for a partition that do not follow the standard patterns.
- partitionSpecialCases: PartitionSpecialCaseMap,
+ partitionSpecialCases: PartitionSpecialCaseMap
+
/// A list of regional special cases - endpoints for a region that do not follow the standard patterns.
regionSpecialCases: RegionSpecialCaseMap
}
@private
map PartitionSpecialCaseMap {
- key: String,
+ key: String
value: PartitionSpecialCaseList
}
@@ -42,15 +51,16 @@ list PartitionSpecialCaseList {
@private
structure PartitionSpecialCase {
@required
- endpoint: String,
+ endpoint: String
+
+ dualStack: Boolean
- dualStack: Boolean,
fips: Boolean
}
@private
map RegionSpecialCaseMap {
- key: String,
+ key: String
value: RegionSpecialCaseList
}
@@ -62,30 +72,36 @@ list RegionSpecialCaseList {
@private
structure RegionSpecialCase {
@required
- endpoint: String,
+ endpoint: String
+
+ dualStack: Boolean
+
+ fips: Boolean
- dualStack: Boolean,
- fips: Boolean,
signingRegion: String
}
/// Marks that a services is non-regionalized and has
/// a single endpoint in each partition.
@trait(
- selector: "service",
- conflicts: [standardRegionalEndpoints],
- breakingChanges: [{change: "any"}]
+ selector: "service"
+ conflicts: [standardRegionalEndpoints]
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
@endpointsModifier
@unstable
structure standardPartitionalEndpoints {
/// The pattern type to use for the partition endpoint.
@required
- endpointPatternType: PartitionEndpointPattern,
+ endpointPatternType: PartitionEndpointPattern
/// A list of partition endpoint special cases - partitions that do not follow the services standard patterns
/// or are located in a region other than the partition's defaultGlobalRegion.
- partitionEndpointSpecialCases: PartitionEndpointSpecialCaseMap,
+ partitionEndpointSpecialCases: PartitionEndpointSpecialCaseMap
}
@private
@@ -96,7 +112,7 @@ enum PartitionEndpointPattern {
@private
map PartitionEndpointSpecialCaseMap {
- key: String,
+ key: String
value: PartitionEndpointSpecialCaseList
}
@@ -107,26 +123,34 @@ list PartitionEndpointSpecialCaseList {
@private
structure PartitionEndpointSpecialCase {
- endpoint: String,
- region: String,
- dualStack: Boolean,
- fips: Boolean,
+ endpoint: String
+ region: String
+ dualStack: Boolean
+ fips: Boolean
}
/// Marks that a services has only dualStack endpoints.
@trait(
- selector: "service",
- breakingChanges: [{change: "any"}]
+ selector: "service"
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
@endpointsModifier
@unstable
-structure dualStackOnlyEndpoints { }
+structure dualStackOnlyEndpoints {}
/// Marks that a services has hand written endpoint rules.
@trait(
- selector: "service",
- breakingChanges: [{change: "any"}]
+ selector: "service"
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
@endpointsModifier
@unstable
-structure rulesBasedEndpoints { }
+structure rulesBasedEndpoints {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/additional-consideration-built-ins.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/additional-consideration-built-ins.smithy
index ad5c54291b8..c01aa331a7c 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/additional-consideration-built-ins.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/additional-consideration-built-ins.smithy
@@ -5,34 +5,21 @@ namespace example
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "required": true,
- "builtIn": "AWS::Region",
- "type": "String",
- "documentation": "docs"
- },
- "AccountId": {
- "builtIn": "AWS::Auth::AccountId",
- "type": "String",
- "documentation": "docs"
- },
- "CredentialScope": {
- "builtIn": "AWS::Auth::CredentialScope",
- "type": "String",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ Region: { required: true, builtIn: "AWS::Region", type: "String", documentation: "docs" }
+ AccountId: { builtIn: "AWS::Auth::AccountId", type: "String", documentation: "docs" }
+ CredentialScope: { builtIn: "AWS::Auth::CredentialScope", type: "String", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{Region}.fizzbuzz.amazonaws.com",
- "headers": {}
- },
- "type": "endpoint"
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{Region}.fizzbuzz.amazonaws.com"
+ headers: {}
+ }
+ type: "endpoint"
}
]
})
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/beta-auth-scheme-missing-field.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/beta-auth-scheme-missing-field.smithy
index 9d386ff3a83..7f124c74151 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/beta-auth-scheme-missing-field.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/beta-auth-scheme-missing-field.smithy
@@ -6,34 +6,30 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "required": true,
- "type": "String",
- "documentation": "docs"
+ version: "1.3"
+ parameters: {
+ Region: { required: true, type: "String", documentation: "docs" }
}
- },
- "rules": [
- {
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
- {
- "name": "beta-test"
+ rules: [
+ {
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
+ {
+ name: "beta-test"
+ }
+ ]
+ }
+ headers: {}
}
- ]
- },
- "headers": {}
- },
- "type": "endpoint"
- }
- ]
+ type: "endpoint"
+ }
+ ]
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-rules-extra-param.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-rules-extra-param.smithy
index 012c5cebca6..65262dcc393 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-rules-extra-param.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-rules-extra-param.smithy
@@ -7,381 +7,340 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
- },
- "useFIPSEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseFIPS",
- "documentation": "docs"
- },
- "useDualStackEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseDualStack",
- "documentation": "docs"
- }
- "endpointId": {
- "type": "string",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
+ useFIPSEndpoint: { type: "boolean", builtIn: "AWS::UseFIPS", documentation: "docs" }
+ useDualStackEndpoint: { type: "boolean", builtIn: "AWS::UseDualStack", documentation: "docs" }
+ endpointId: { type: "string", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "aws.partition",
- "argv": [
+ fn: "aws.partition"
+ argv: [
{
- "ref": "region"
+ ref: "region"
}
- ],
- "assign": "partitionResult"
+ ]
+ assign: "partitionResult"
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "endpointId"
+ ref: "endpointId"
}
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "error": "FIPS endpoints not supported with multi-region endpoints",
- "type": "error"
- },
+ ]
+ error: "FIPS endpoints not supported with multi-region endpoints"
+ type: "error"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ conditions: []
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
+ }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isValidHostLabel",
- "argv": [
+ fn: "isValidHostLabel"
+ argv: [
{
- "ref": "region"
- },
+ ref: "region"
+ }
false
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
+ conditions: []
+ endpoint: { url: "https://events.{region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [],
- "error": "{region} is not a valid HTTP host-label",
- "type": "error"
+ conditions: []
+ error: "{region} is not a valid HTTP host-label"
+ type: "error"
}
- ],
- "type": "tree"
+ ]
+ type: "tree"
}
]
})
@endpointTests(
- version: "1.0",
+ version: "1.0"
testCases: [
{
- "documentation": "simple region endpoint",
- "params": {
- "region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://events.us-east-1.amazonaws.com"
- }
+ documentation: "simple region endpoint"
+ params: { region: "us-east-1" }
+ expect: {
+ endpoint: { url: "https://events.us-east-1.amazonaws.com" }
}
- },
+ }
{
- "documentation": "basic case of endpointId",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint"
- },
- "expect": {
- "endpoint": {
- "url": "https://myendpoint.endpoint.events.amazonaws.com",
- "properties": {
- "authSchemes": [
+ documentation: "basic case of endpointId"
+ params: { region: "us-east-1", endpointId: "myendpoint" }
+ expect: {
+ endpoint: {
+ url: "https://myendpoint.endpoint.events.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": ["*"]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
}
}
- },
+ }
{
- "documentation": "endpointId & FIPS",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useFIPSEndpoint": true
- },
- "expect": {
- "error": "FIPS endpoints not supported with multi-region endpoints"
- }
+ documentation: "endpointId & FIPS"
+ params: { region: "us-east-1", endpointId: "myendpoint", useFIPSEndpoint: true }
+ expect: { error: "FIPS endpoints not supported with multi-region endpoints" }
}
]
)
@clientContextParams(
- endpointId: {type: "string", documentation: "docs"}
+ endpointId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-not-defined.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-not-defined.smithy
index 567e4434b2e..761d221c2ed 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-not-defined.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-not-defined.smithy
@@ -8,383 +8,340 @@ use smithy.rules#endpointTests
@suppress(["RuleSetParameter.Unused"])
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
- },
- "useFIPSEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseFIPS",
- "documentation": "docs"
- },
- "useDualStackEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseDualStack",
- "documentation": "docs"
- }
- "endpointId": {
- "type": "string",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
+ useFIPSEndpoint: { type: "boolean", builtIn: "AWS::UseFIPS", documentation: "docs" }
+ useDualStackEndpoint: { type: "boolean", builtIn: "AWS::UseDualStack", documentation: "docs" }
+ endpointId: { type: "string", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "aws.partition",
- "argv": [
+ fn: "aws.partition"
+ argv: [
{
- "ref": "region"
+ ref: "region"
}
- ],
- "assign": "partitionResult"
+ ]
+ assign: "partitionResult"
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "endpointId"
+ ref: "endpointId"
}
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "error": "FIPS endpoints not supported with multi-region endpoints",
- "type": "error"
- },
+ ]
+ error: "FIPS endpoints not supported with multi-region endpoints"
+ type: "error"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ conditions: []
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
+ }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isValidHostLabel",
- "argv": [
+ fn: "isValidHostLabel"
+ argv: [
{
- "ref": "region"
- },
+ ref: "region"
+ }
false
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
+ conditions: []
+ endpoint: { url: "https://events.{region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [],
- "error": "{region} is not a valid HTTP host-label",
- "type": "error"
+ conditions: []
+ error: "{region} is not a valid HTTP host-label"
+ type: "error"
}
- ],
- "type": "tree"
+ ]
+ type: "tree"
}
]
})
@endpointTests(
- version: "1.0",
+ version: "1.0"
testCases: [
{
- "documentation": "simple region endpoint",
- "params": {
- "region": "us-east-1",
- "notDefined": "some-value"
- },
- "expect": {
- "endpoint": {
- "url": "https://events.us-east-1.amazonaws.com"
- }
+ documentation: "simple region endpoint"
+ params: { region: "us-east-1", notDefined: "some-value" }
+ expect: {
+ endpoint: { url: "https://events.us-east-1.amazonaws.com" }
}
- },
+ }
{
- "documentation": "basic case of endpointId",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useDualStackEndpoint": false
- },
- "expect": {
- "endpoint": {
- "url": "https://myendpoint.endpoint.events.amazonaws.com",
- "properties": {
- "authSchemes": [
+ documentation: "basic case of endpointId"
+ params: { region: "us-east-1", endpointId: "myendpoint", useDualStackEndpoint: false }
+ expect: {
+ endpoint: {
+ url: "https://myendpoint.endpoint.events.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": ["*"]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
}
}
- },
+ }
{
- "documentation": "endpointId & FIPS",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useFIPSEndpoint": true
- },
- "expect": {
- "error": "FIPS endpoints not supported with multi-region endpoints"
- }
+ documentation: "endpointId & FIPS"
+ params: { region: "us-east-1", endpointId: "myendpoint", useFIPSEndpoint: true }
+ expect: { error: "FIPS endpoints not supported with multi-region endpoints" }
}
]
)
@clientContextParams(
- endpointId: {type: "string", documentation: "docs"}
+ endpointId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-type-mismatch.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-type-mismatch.smithy
index b7198be29f0..b23a0a21727 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-type-mismatch.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-param-type-mismatch.smithy
@@ -8,382 +8,340 @@ use smithy.rules#endpointTests
@suppress(["RuleSetParameter.Unused"])
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
- },
- "useFIPSEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseFIPS",
- "documentation": "docs"
- },
- "useDualStackEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseDualStack",
- "documentation": "docs"
- }
- "endpointId": {
- "type": "string",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
+ useFIPSEndpoint: { type: "boolean", builtIn: "AWS::UseFIPS", documentation: "docs" }
+ useDualStackEndpoint: { type: "boolean", builtIn: "AWS::UseDualStack", documentation: "docs" }
+ endpointId: { type: "string", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "aws.partition",
- "argv": [
+ fn: "aws.partition"
+ argv: [
{
- "ref": "region"
+ ref: "region"
}
- ],
- "assign": "partitionResult"
+ ]
+ assign: "partitionResult"
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "endpointId"
+ ref: "endpointId"
}
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "error": "FIPS endpoints not supported with multi-region endpoints",
- "type": "error"
- },
+ ]
+ error: "FIPS endpoints not supported with multi-region endpoints"
+ type: "error"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ conditions: []
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
+ }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isValidHostLabel",
- "argv": [
+ fn: "isValidHostLabel"
+ argv: [
{
- "ref": "region"
- },
+ ref: "region"
+ }
false
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
+ conditions: []
+ endpoint: { url: "https://events.{region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [],
- "error": "{region} is not a valid HTTP host-label",
- "type": "error"
+ conditions: []
+ error: "{region} is not a valid HTTP host-label"
+ type: "error"
}
- ],
- "type": "tree"
+ ]
+ type: "tree"
}
]
})
@endpointTests(
- version: "1.0",
+ version: "1.0"
testCases: [
{
- "documentation": "simple region endpoint",
- "params": {
- "region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://events.us-east-1.amazonaws.com"
- }
+ documentation: "simple region endpoint"
+ params: { region: "us-east-1" }
+ expect: {
+ endpoint: { url: "https://events.us-east-1.amazonaws.com" }
}
- },
+ }
{
- "documentation": "basic case of endpointId",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useDualStackEndpoint": false
- },
- "expect": {
- "endpoint": {
- "url": "https://myendpoint.endpoint.events.amazonaws.com",
- "properties": {
- "authSchemes": [
+ documentation: "basic case of endpointId"
+ params: { region: "us-east-1", endpointId: "myendpoint", useDualStackEndpoint: false }
+ expect: {
+ endpoint: {
+ url: "https://myendpoint.endpoint.events.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": ["*"]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
}
}
- },
+ }
{
- "documentation": "endpointId & FIPS",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useFIPSEndpoint": "true"
- },
- "expect": {
- "error": "FIPS endpoints not supported with multi-region endpoints"
- }
+ documentation: "endpointId & FIPS"
+ params: { region: "us-east-1", endpointId: "myendpoint", useFIPSEndpoint: "true" }
+ expect: { error: "FIPS endpoints not supported with multi-region endpoints" }
}
]
)
@clientContextParams(
- endpointId: {type: "string", documentation: "docs"}
+ endpointId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-req-params-missing.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-req-params-missing.smithy
index 91bf97e9093..57a5ed19b59 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-req-params-missing.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/eventbridge-tests-req-params-missing.smithy
@@ -8,381 +8,340 @@ use smithy.rules#endpointTests
@suppress(["RuleSetParameter.Unused"])
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
- },
- "useFIPSEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseFIPS",
- "documentation": "docs"
- },
- "useDualStackEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseDualStack",
- "documentation": "docs"
- }
- "endpointId": {
- "type": "string",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
+ useFIPSEndpoint: { type: "boolean", builtIn: "AWS::UseFIPS", documentation: "docs" }
+ useDualStackEndpoint: { type: "boolean", builtIn: "AWS::UseDualStack", documentation: "docs" }
+ endpointId: { type: "string", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "aws.partition",
- "argv": [
+ fn: "aws.partition"
+ argv: [
{
- "ref": "region"
+ ref: "region"
}
- ],
- "assign": "partitionResult"
+ ]
+ assign: "partitionResult"
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "endpointId"
+ ref: "endpointId"
}
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "error": "FIPS endpoints not supported with multi-region endpoints",
- "type": "error"
- },
+ ]
+ error: "FIPS endpoints not supported with multi-region endpoints"
+ type: "error"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ conditions: []
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
+ }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isValidHostLabel",
- "argv": [
+ fn: "isValidHostLabel"
+ argv: [
{
- "ref": "region"
- },
+ ref: "region"
+ }
false
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
+ conditions: []
+ endpoint: { url: "https://events.{region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [],
- "error": "{region} is not a valid HTTP host-label",
- "type": "error"
+ conditions: []
+ error: "{region} is not a valid HTTP host-label"
+ type: "error"
}
- ],
- "type": "tree"
+ ]
+ type: "tree"
}
]
})
@endpointTests(
- version: "1.0",
+ version: "1.0"
testCases: [
{
- "documentation": "simple region endpoint",
- "params": {
- "region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://events.us-east-1.amazonaws.com"
- }
+ documentation: "simple region endpoint"
+ params: { region: "us-east-1" }
+ expect: {
+ endpoint: { url: "https://events.us-east-1.amazonaws.com" }
}
- },
+ }
{
- "documentation": "basic case of endpointId",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useDualStackEndpoint": false
- },
- "expect": {
- "endpoint": {
- "url": "https://myendpoint.endpoint.events.amazonaws.com",
- "properties": {
- "authSchemes": [
+ documentation: "basic case of endpointId"
+ params: { region: "us-east-1", endpointId: "myendpoint", useDualStackEndpoint: false }
+ expect: {
+ endpoint: {
+ url: "https://myendpoint.endpoint.events.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": ["*"]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
}
}
- },
+ }
{
- "documentation": "endpointId & FIPS",
- "params": {
- "endpointId": "myendpoint",
- "useFIPSEndpoint": true
- },
- "expect": {
- "error": "FIPS endpoints not supported with multi-region endpoints"
- }
+ documentation: "endpointId & FIPS"
+ params: { endpointId: "myendpoint", useFIPSEndpoint: true }
+ expect: { error: "FIPS endpoints not supported with multi-region endpoints" }
}
]
)
@clientContextParams(
- endpointId: {type: "string", documentation: "docs"}
+ endpointId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/invalid-endpoint-patterns.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/invalid-endpoint-patterns.smithy
index b735abe8c9d..d4d76643584 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/invalid-endpoint-patterns.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/invalid-endpoint-patterns.smithy
@@ -2,25 +2,25 @@ $version: "1.0"
namespace example
-use aws.endpoints#standardRegionalEndpoints
use aws.endpoints#standardPartitionalEndpoints
+use aws.endpoints#standardRegionalEndpoints
@standardRegionalEndpoints(
regionSpecialCases: {
"us-east-1": [
{
- endpoint: "https://myservice.{invalid}.{dnsSuffix}",
+ endpoint: "https://myservice.{invalid}.{dnsSuffix}"
}
]
- },
+ }
partitionSpecialCases: {
- "aws": [
+ aws: [
{
- endpoint: "{invalid}-fips.{region}.{badSuffix}",
+ endpoint: "{invalid}-fips.{region}.{badSuffix}"
fips: true
- },
+ }
{
- endpoint: "https://{region}. invalidurl {dnsSuffix}",
+ endpoint: "https://{region}. invalidurl {dnsSuffix}"
dualStack: true
}
]
@@ -29,11 +29,11 @@ use aws.endpoints#standardPartitionalEndpoints
service Service1 {}
@standardPartitionalEndpoints(
- endpointPatternType: "service_dnsSuffix",
+ endpointPatternType: "service_dnsSuffix"
partitionEndpointSpecialCases: {
- "aws": [
+ aws: [
{
- endpoint: "myservice.{invalid}.{dnsSuffix}",
+ endpoint: "myservice.{invalid}.{dnsSuffix}"
region: "us-east-1"
}
]
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/signing-optional-properties-mistyped.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/signing-optional-properties-mistyped.smithy
index 4018e5ffca5..9da81965252 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/signing-optional-properties-mistyped.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/invalid/signing-optional-properties-mistyped.smithy
@@ -3,123 +3,118 @@ $version: "2.0"
namespace example
use smithy.rules#endpointRuleSet
-use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "documentation": "The region to dispatch this request, eg. `us-east-1`."
- }
- },
- "rules": [
+ parameters: {
+ Region: { type: "string", builtIn: "AWS::Region", documentation: "The region to dispatch this request, eg. `us-east-1`." }
+ }
+ rules: [
{
- "documentation": "Show failing type validation for optional fields",
- "conditions": [
+ documentation: "Show failing type validation for optional fields"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "Region"
+ ref: "Region"
}
]
- },
+ }
{
- "fn": "stringEquals",
- "argv": [
+ fn: "stringEquals"
+ argv: [
{
- "ref": "Region"
- },
+ ref: "Region"
+ }
"a"
]
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4",
- "signingName": 1,
- "signingRegion": 1,
- "disableDoubleEncoding": 1,
- "disableNormalizePath": 1
+ name: "sigv4"
+ signingName: 1
+ signingRegion: 1
+ disableDoubleEncoding: 1
+ disableNormalizePath: 1
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "Show failing type validation for optional fields",
- "conditions": [
+ documentation: "Show failing type validation for optional fields"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "Region"
+ ref: "Region"
}
]
- },
+ }
{
- "fn": "stringEquals",
- "argv": [
+ fn: "stringEquals"
+ argv: [
{
- "ref": "Region"
- },
+ ref: "Region"
+ }
"b"
]
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": 1,
- "signingRegionSet": 1,
- "disableDoubleEncoding": 1,
- "disableNormalizePath": 1
+ name: "sigv4a"
+ signingName: 1
+ signingRegionSet: 1
+ disableDoubleEncoding: 1
+ disableNormalizePath: 1
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "Show non-empty requirement of signingRegionSet",
- "conditions": [
+ documentation: "Show non-empty requirement of signingRegionSet"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "Region"
+ ref: "Region"
}
]
- },
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ }
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingRegionSet": []
+ name: "sigv4a"
+ signingRegionSet: []
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "fallback when region is unset",
- "conditions": [],
- "error": "Region must be set to resolve a valid endpoint",
- "type": "error"
+ documentation: "fallback when region is unset"
+ conditions: []
+ error: "Region must be set to resolve a valid endpoint"
+ type: "error"
}
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/aws-region.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/aws-region.smithy
index 1b2c95a0e1f..45c79faf7f6 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/aws-region.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/aws-region.smithy
@@ -6,82 +6,74 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "documentation": "The region to dispatch this request, eg. `us-east-1`."
- }
- },
- "rules": [
+ parameters: {
+ Region: { type: "string", builtIn: "AWS::Region", documentation: "The region to dispatch this request, eg. `us-east-1`." }
+ }
+ rules: [
{
- "documentation": "Template the region into the URI when region is set",
- "conditions": [
+ documentation: "Template the region into the URI when region is set"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "Region"
+ ref: "Region"
}
]
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "{Region}",
- "disableDoubleEncoding": false,
- "disableNormalizePath": false,
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "{Region}"
+ disableDoubleEncoding: false
+ disableNormalizePath: false
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "fallback when region is unset",
- "conditions": [],
- "error": "Region must be set to resolve a valid endpoint",
- "type": "error"
+ documentation: "fallback when region is unset"
+ conditions: []
+ error: "Region must be set to resolve a valid endpoint"
+ type: "error"
}
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
@endpointTests(
- version: "1.0",
+ version: "1.0"
testCases: [
{
- "documentation": "basic region templating",
- "params": {
- "Region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://us-east-1.amazonaws.com",
- "properties": {
- "authSchemes": [
+ documentation: "basic region templating"
+ params: { Region: "us-east-1" }
+ expect: {
+ endpoint: {
+ url: "https://us-east-1.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4",
- "signingRegion": "us-east-1",
- "signingName": "serviceName"
- "disableDoubleEncoding": false,
- "disableNormalizePath": false,
+ name: "sigv4"
+ signingRegion: "us-east-1"
+ signingName: "serviceName"
+ disableDoubleEncoding: false
+ disableNormalizePath: false
}
]
}
}
}
- },
+ }
{
- "documentation": "test case where region is unset",
- "params": {},
- "expect": {
- "error": "Region must be set to resolve a valid endpoint"
- }
+ documentation: "test case where region is unset"
+ params: {}
+ expect: { error: "Region must be set to resolve a valid endpoint" }
}
]
)
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/beta-auth-scheme.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/beta-auth-scheme.smithy
index 4a7762511b4..4ea581334b0 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/beta-auth-scheme.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/beta-auth-scheme.smithy
@@ -6,37 +6,33 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "required": true,
- "type": "String",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ Region: { required: true, type: "String", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "beta-test",
- "signingName": "serviceName",
- "signingRegion": "{Region}",
- "additionalField": "test"
+ name: "beta-test"
+ signingName: "serviceName"
+ signingRegion: "{Region}"
+ additionalField: "test"
}
]
- },
- "headers": {}
- },
- "type": "endpoint"
+ }
+ headers: {}
+ }
+ type: "endpoint"
}
]
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge-tests.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge-tests.smithy
index b2c3a79a5aa..82c81313846 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge-tests.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge-tests.smithy
@@ -8,382 +8,340 @@ use smithy.rules#endpointTests
@suppress(["RuleSetParameter.Unused"])
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
- },
- "useFIPSEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseFIPS",
- "documentation": "docs"
- },
- "useDualStackEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseDualStack",
- "documentation": "docs"
- }
- "endpointId": {
- "type": "string",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
+ useFIPSEndpoint: { type: "boolean", builtIn: "AWS::UseFIPS", documentation: "docs" }
+ useDualStackEndpoint: { type: "boolean", builtIn: "AWS::UseDualStack", documentation: "docs" }
+ endpointId: { type: "string", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "aws.partition",
- "argv": [
+ fn: "aws.partition"
+ argv: [
{
- "ref": "region"
+ ref: "region"
}
- ],
- "assign": "partitionResult"
+ ]
+ assign: "partitionResult"
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "endpointId"
+ ref: "endpointId"
}
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "error": "FIPS endpoints not supported with multi-region endpoints",
- "type": "error"
- },
+ ]
+ error: "FIPS endpoints not supported with multi-region endpoints"
+ type: "error"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ conditions: []
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
+ }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isValidHostLabel",
- "argv": [
+ fn: "isValidHostLabel"
+ argv: [
{
- "ref": "region"
- },
+ ref: "region"
+ }
false
]
}
- ],
- "rules": [
+ ]
+ rules: [
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "not",
- "argv": [
+ fn: "not"
+ argv: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
}
]
}
- ],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useDualStackEndpoint"
+ ref: "useDualStackEndpoint"
}
]
- },
+ }
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "useFIPSEndpoint"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useDualStackEndpoint"
- },
+ ref: "useDualStackEndpoint"
+ }
true
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "useFIPSEndpoint"
- },
+ ref: "useFIPSEndpoint"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
+ conditions: []
+ endpoint: { url: "https://events.{region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
}
- ],
- "type": "tree"
- },
+ ]
+ type: "tree"
+ }
{
- "conditions": [],
- "error": "{region} is not a valid HTTP host-label",
- "type": "error"
+ conditions: []
+ error: "{region} is not a valid HTTP host-label"
+ type: "error"
}
- ],
- "type": "tree"
+ ]
+ type: "tree"
}
]
})
@endpointTests(
- version: "1.0",
+ version: "1.0"
testCases: [
{
- "documentation": "simple region endpoint",
- "params": {
- "region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://events.us-east-1.amazonaws.com"
- }
+ documentation: "simple region endpoint"
+ params: { region: "us-east-1" }
+ expect: {
+ endpoint: { url: "https://events.us-east-1.amazonaws.com" }
}
- },
+ }
{
- "documentation": "basic case of endpointId",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useDualStackEndpoint": false
- },
- "expect": {
- "endpoint": {
- "url": "https://myendpoint.endpoint.events.amazonaws.com",
- "properties": {
- "authSchemes": [
+ documentation: "basic case of endpointId"
+ params: { region: "us-east-1", endpointId: "myendpoint", useDualStackEndpoint: false }
+ expect: {
+ endpoint: {
+ url: "https://myendpoint.endpoint.events.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": ["*"]
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
}
]
}
}
}
- },
+ }
{
- "documentation": "endpointId & FIPS",
- "params": {
- "region": "us-east-1",
- "endpointId": "myendpoint",
- "useFIPSEndpoint": true
- },
- "expect": {
- "error": "FIPS endpoints not supported with multi-region endpoints"
- }
+ documentation: "endpointId & FIPS"
+ params: { region: "us-east-1", endpointId: "myendpoint", useFIPSEndpoint: true }
+ expect: { error: "FIPS endpoints not supported with multi-region endpoints" }
}
]
)
@clientContextParams(
- endpointId: {type: "string", documentation: "docs"}
+ endpointId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge.smithy
index cc93d6c1d58..a1e2f6ed09c 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/eventbridge.smithy
@@ -6,333 +6,305 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
- },
- "useDualStackEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseDualStack",
- "documentation": "docs"
- },
- "useFIPSEndpoint": {
- "type": "boolean",
- "builtIn": "AWS::UseFIPS",
- "documentation": "docs"
- },
- "endpointId": {
- "type": "string",
- "documentation": "docs"
+ version: "1.3"
+ parameters: {
+ region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
+ useDualStackEndpoint: { type: "boolean", builtIn: "AWS::UseDualStack", documentation: "docs" }
+ useFIPSEndpoint: { type: "boolean", builtIn: "AWS::UseFIPS", documentation: "docs" }
+ endpointId: { type: "string", documentation: "docs" }
}
- },
- "rules": [
- {
- "conditions": [
+ rules: [
{
- "fn": "aws.partition",
- "argv": [
- {
- "ref": "region"
- }
- ],
- "assign": "partitionResult"
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "endpointId"
- }
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "useFIPSEndpoint"
- }
- ]
- },
+ conditions: [
{
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "useFIPSEndpoint"
- },
- true
- ]
- }
- ],
- "error": "FIPS endpoints not supported with multi-region endpoints",
- "type": "error"
- },
- {
- "conditions": [
- {
- "fn": "not",
- "argv": [
- {
- "fn": "isSet",
- "argv": [
+ fn: "aws.partition"
+ argv: [
{
- "ref": "useFIPSEndpoint"
+ ref: "region"
}
- ]
- }
- ]
- },
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "useDualStackEndpoint"
- }
- ]
- },
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "useDualStackEndpoint"
- },
- true
- ]
- }
- ],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
- }
- ]
+ ]
+ assign: "partitionResult"
}
- },
- "type": "endpoint"
- },
- {
- "conditions": [],
- "endpoint": {
- "url": "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
- }
- ]
- }
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [
- {
- "fn": "isValidHostLabel",
- "argv": [
- {
- "ref": "region"
- },
- false
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "useFIPSEndpoint"
- }
- ]
- },
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "useFIPSEndpoint"
- },
- true
- ]
- },
+ ]
+ rules: [
{
- "fn": "not",
- "argv": [
- {
- "fn": "isSet",
- "argv": [
+ conditions: [
{
- "ref": "useDualStackEndpoint"
+ fn: "isSet"
+ argv: [
+ {
+ ref: "endpointId"
+ }
+ ]
}
- ]
- }
- ]
- }
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
- }
- ]
+ ]
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ ]
+ }
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ true
+ ]
+ }
+ ]
+ error: "FIPS endpoints not supported with multi-region endpoints"
+ type: "error"
+ }
+ {
+ conditions: [
+ {
+ fn: "not"
+ argv: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ ]
+ }
+ ]
+ }
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ ]
+ }
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ true
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
+ }
+ ]
+ }
+ }
+ type: "endpoint"
+ }
+ {
+ conditions: []
+ endpoint: {
+ url: "https://{endpointId}.endpoint.events.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
+ }
+ ]
+ }
+ }
+ type: "endpoint"
+ }
+ ]
+ type: "tree"
}
- },
- "type": "endpoint"
- },
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "useDualStackEndpoint"
- }
- ]
- },
{
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "useDualStackEndpoint"
- },
- true
- ]
- },
- {
- "fn": "not",
- "argv": [
- {
- "fn": "isSet",
- "argv": [
+ conditions: [
{
- "ref": "useFIPSEndpoint"
+ fn: "isValidHostLabel"
+ argv: [
+ {
+ ref: "region"
+ }
+ false
+ ]
}
- ]
- }
- ]
- }
- ],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
- }
- ]
+ ]
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ ]
+ }
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ true
+ ]
+ }
+ {
+ fn: "not"
+ argv: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
+ }
+ ]
+ }
+ }
+ type: "endpoint"
+ }
+ {
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ ]
+ }
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ true
+ ]
+ }
+ {
+ fn: "not"
+ argv: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://events.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
+ }
+ ]
+ }
+ }
+ type: "endpoint"
+ }
+ {
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ ]
+ }
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ ]
+ }
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ ref: "useDualStackEndpoint"
+ }
+ true
+ ]
+ }
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ ref: "useFIPSEndpoint"
+ }
+ true
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4a"
+ signingName: "events"
+ signingRegionSet: ["*"]
+ }
+ ]
+ }
+ }
+ type: "endpoint"
+ }
+ {
+ conditions: []
+ endpoint: { url: "https://events.{region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
+ }
+ ]
+ type: "tree"
}
- },
- "type": "endpoint"
- },
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "useDualStackEndpoint"
- }
- ]
- },
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "useFIPSEndpoint"
- }
- ]
- },
{
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "useDualStackEndpoint"
- },
- true
- ]
- },
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "useFIPSEndpoint"
- },
- true
- ]
- }
- ],
- "endpoint": {
- "url": "https://events-fips.{region}.{partitionResult#dualStackDnsSuffix}",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4a",
- "signingName": "events",
- "signingRegionSet": [
- "*"
- ]
- }
- ]
+ conditions: []
+ error: "{region} is not a valid HTTP host-label"
+ type: "error"
}
- },
- "type": "endpoint"
- },
- {
- "conditions": [],
- "endpoint": {
- "url": "https://events.{region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "error": "{region} is not a valid HTTP host-label",
- "type": "error"
+ ]
+ type: "tree"
}
- ],
- "type": "tree"
- }
- ]
+ ]
})
@clientContextParams(
- endpointId: {type: "string", documentation: "docs"}
+ endpointId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/functions.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/functions.smithy
index 15b48acb31a..232810862b0 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/functions.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/functions.smithy
@@ -7,186 +7,156 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "documentation": "functions in more places",
- "parameters": {
- "Uri": {
- "type": "string",
- "documentation": "A URI to use"
- },
- "Arn": {
- "type": "string",
- "documentation": "an ARN to extract fields from"
- },
- "CustomError": {
- "type": "string",
- "documentation": "when set, a custom error message"
+ documentation: "functions in more places"
+ parameters: {
+ Uri: { type: "string", documentation: "A URI to use" }
+ Arn: { type: "string", documentation: "an ARN to extract fields from" }
+ CustomError: { type: "string", documentation: "when set, a custom error message" }
}
- },
- "rules": [
- {
- "documentation": "when URI is set, use it directly",
- "conditions": [
+ rules: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Uri"
- }
- ]
- },
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "Arn"
+ documentation: "when URI is set, use it directly"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Uri"
+ }
+ ]
+ }
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Arn"
+ }
+ ]
+ }
+ {
+ fn: "aws.parseArn"
+ argv: [
+ {
+ ref: "Arn"
+ }
+ ]
+ assign: "parsedArn"
+ }
+ ]
+ endpoint: {
+ url: { ref: "Uri" }
+ headers: {
+ "x-uri": [
+ {
+ ref: "Uri"
+ }
+ ]
+ "x-arn-region": [
+ {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "parsedArn"
+ }
+ "region"
+ ]
+ }
+ ]
+ }
}
- ]
- },
+ type: "endpoint"
+ }
{
- "fn": "aws.parseArn",
- "argv": [
- {
- "ref": "Arn"
- }
- ],
- "assign": "parsedArn"
+ documentation: "A custom error"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "CustomError"
+ }
+ ]
+ }
+ ]
+ type: "error"
+ error: { ref: "CustomError" }
}
- ],
- "endpoint": {
- "url": {
- "ref": "Uri"
- },
- "headers": {
- "x-uri": [
- {
- "ref": "Uri"
- }
- ],
- "x-arn-region": [
- {
- "fn": "getAttr",
- "argv": [
+ {
+ type: "error"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Arn"
+ }
+ ]
+ }
{
- "ref": "parsedArn"
- },
- "region"
- ]
+ fn: "aws.parseArn"
+ argv: [
+ {
+ ref: "Arn"
+ }
+ ]
+ assign: "parsedArn"
+ }
+ ]
+ error: {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "parsedArn"
+ }
+ "partition"
+ ]
}
- ]
}
- },
- "type": "endpoint"
- },
- {
- "documentation": "A custom error",
- "conditions": [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "CustomError"
- }
- ]
+ documentation: "fallback when nothing is set"
+ conditions: []
+ error: "No fields were set"
+ type: "error"
}
- ],
- "type": "error",
- "error": {
- "ref": "CustomError"
- }
- },
- {
- "type": "error",
- "conditions": [
+ ]
+ version: "1.3"
+})
+@endpointTests(
+ version: "1.0"
+ testCases: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Arn"
+ documentation: "test where URI is set and flows to URI and header"
+ params: { Uri: "https://www.example.com", Arn: "arn:aws:s3:us-east-2:012345678:outpost:op-1234" }
+ expect: {
+ endpoint: {
+ url: "https://www.example.com"
+ headers: {
+ "x-uri": ["https://www.example.com"]
+ "x-arn-region": ["us-east-2"]
+ }
+ }
}
- ]
- },
+ }
{
- "fn": "aws.parseArn",
- "argv": [
- {
- "ref": "Arn"
- }
- ],
- "assign": "parsedArn"
+ documentation: "test where explicit error is set"
+ params: { CustomError: "This is an error!" }
+ expect: { error: "This is an error!" }
}
- ],
- "error": {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "parsedArn"
- },
- "partition"
- ]
- }
- },
- {
- "documentation": "fallback when nothing is set",
- "conditions": [],
- "error": "No fields were set",
- "type": "error"
- }
- ],
- "version": "1.3"
-})
-@endpointTests(
- "version": "1.0",
- "testCases": [
- {
- "documentation": "test where URI is set and flows to URI and header",
- "params": {
- "Uri": "https://www.example.com",
- "Arn": "arn:aws:s3:us-east-2:012345678:outpost:op-1234"
- },
- "expect": {
- "endpoint": {
- "url": "https://www.example.com",
- "headers": {
- "x-uri": [
- "https://www.example.com"
- ],
- "x-arn-region": [
- "us-east-2"
- ]
- }
+ {
+ documentation: "test where an ARN field is used in the error directly"
+ params: { Arn: "arn:This is an error!:s3:us-east-2:012345678:outpost:op-1234" }
+ expect: { error: "This is an error!" }
}
- }
- },
- {
- "documentation": "test where explicit error is set",
- "params": {
- "CustomError": "This is an error!"
- },
- "expect": {
- "error": "This is an error!"
- }
- },
- {
- "documentation": "test where an ARN field is used in the error directly",
- "params": {
- "Arn": "arn:This is an error!:s3:us-east-2:012345678:outpost:op-1234"
- },
- "expect": {
- "error": "This is an error!"
- }
- },
- {
- "documentation": "test case where no fields are set",
- "params": {},
- "expect": {
- "error": "No fields were set"
- }
- }
- ]
+ {
+ documentation: "test case where no fields are set"
+ params: {}
+ expect: { error: "No fields were set" }
+ }
+ ]
)
@clientContextParams(
- Uri: {type: "string", documentation: "docs"}
- Arn: {type: "string", documentation: "docs"}
- CustomError: {type: "string", documentation: "docs"}
+ Uri: { type: "string", documentation: "docs" }
+ Arn: { type: "string", documentation: "docs" }
+ CustomError: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/is-virtual-hostable-s3-bucket.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/is-virtual-hostable-s3-bucket.smithy
index 7561f437608..e5c72790177 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/is-virtual-hostable-s3-bucket.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/is-virtual-hostable-s3-bucket.smithy
@@ -7,222 +7,139 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "BucketName": {
- "type": "string",
- "required": true,
- "documentation": "the input used to test isVirtualHostableS3Bucket"
+ version: "1.3"
+ parameters: {
+ BucketName: { type: "string", required: true, documentation: "the input used to test isVirtualHostableS3Bucket" }
}
- },
- "rules": [
- {
- "conditions": [
- {
- "fn": "aws.isVirtualHostableS3Bucket",
- "argv": [
- "{BucketName}",
- false
- ]
- }
- ],
- "endpoint": {
- "url": "https://{BucketName}.s3.amazonaws.com"
- },
- "type": "endpoint"
- },
- {
- "conditions": [
- {
- "fn": "aws.isVirtualHostableS3Bucket",
- "argv": [
- "{BucketName}",
- true
- ]
- }
- ],
- "endpoint": {
- "url": "http://{BucketName}.s3.amazonaws.com"
- },
- "type": "endpoint"
- },
- {
- "conditions": [
- ],
- "error": "not isVirtualHostableS3Bucket",
- "type": "error"
- }
- ]
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "aws.isVirtualHostableS3Bucket"
+ argv: ["{BucketName}", false]
+ }
+ ]
+ endpoint: { url: "https://{BucketName}.s3.amazonaws.com" }
+ type: "endpoint"
+ }
+ {
+ conditions: [
+ {
+ fn: "aws.isVirtualHostableS3Bucket"
+ argv: ["{BucketName}", true]
+ }
+ ]
+ endpoint: { url: "http://{BucketName}.s3.amazonaws.com" }
+ type: "endpoint"
+ }
+ {
+ conditions: []
+ error: "not isVirtualHostableS3Bucket"
+ type: "error"
+ }
+ ]
})
@endpointTests(
- "version": "1.0",
- "testCases": [
- {
- "documentation": "bucket-name: isVirtualHostable",
- "params": {
- "BucketName": "bucket-name"
- },
- "expect": {
- "endpoint": {
- "url": "https://bucket-name.s3.amazonaws.com"
- }
- }
- },
- {
- "documentation": "bucket-with-number-1: isVirtualHostable",
- "params": {
- "BucketName": "bucket-with-number-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://bucket-with-number-1.s3.amazonaws.com"
- }
- }
- },
- {
- "documentation": "bucket--with-multiple-dash: isVirtualHostable",
- "params": {
- "BucketName": "bucket--with-multiple-dash"
- },
- "expect": {
- "endpoint": {
- "url": "https://bucket--with-multiple-dash.s3.amazonaws.com"
- }
- }
- },
- {
- "documentation": "BucketName: not isVirtualHostable (uppercase characters)",
- "params": {
- "BucketName": "BucketName"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket_name: not isVirtualHostable (underscore)",
- "params": {
- "BucketName": "bucket_name"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket.name: isVirtualHostable (http only)",
- "params": {
- "BucketName": "bucket.name"
- },
- "expect": {
- "endpoint": {
- "url": "http://bucket.name.s3.amazonaws.com"
- }
- }
- },
- {
- "documentation": "bucket.name.multiple.dots1: isVirtualHostable (http only)",
- "params": {
- "BucketName": "bucket.name.multiple.dots1"
- },
- "expect": {
- "endpoint": {
- "url": "http://bucket.name.multiple.dots1.s3.amazonaws.com"
- }
- }
- },
- {
- "documentation": "-bucket-name: not isVirtualHostable (leading dash)",
- "params": {
- "BucketName": "-bucket-name"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket-name-: not isVirtualHostable (trailing dash)",
- "params": {
- "BucketName": "bucket-name-"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "aa: not isVirtualHostable (< 3 characters)",
- "params": {
- "BucketName": "aa"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "'a'*64: not isVirtualHostable (> 63 characters)",
- "params": {
- "BucketName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": ".bucket-name: not isVirtualHostable (leading dot)",
- "params": {
- "BucketName": ".bucket-name"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket-name.: not isVirtualHostable (trailing dot)",
- "params": {
- "BucketName": "bucket-name."
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "192.168.5.4: not isVirtualHostable (formatted like an ip address)",
- "params": {
- "BucketName": "192.168.5.4"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket-.name: not isVirtualHostable (invalid label, ends with a -)",
- "params": {
- "BucketName": "bucket-.name"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket.-name: not isVirtualHostable (invalid label, starts with a -)",
- "params": {
- "BucketName": "bucket.-name"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- {
- "documentation": "bucket..name: not isVirtualHostable (consequetive dots)",
- "params": {
- "BucketName": "bucket..name"
- },
- "expect": {
- "error": "not isVirtualHostableS3Bucket"
- }
- },
- ]
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "bucket-name: isVirtualHostable"
+ params: { BucketName: "bucket-name" }
+ expect: {
+ endpoint: { url: "https://bucket-name.s3.amazonaws.com" }
+ }
+ }
+ {
+ documentation: "bucket-with-number-1: isVirtualHostable"
+ params: { BucketName: "bucket-with-number-1" }
+ expect: {
+ endpoint: { url: "https://bucket-with-number-1.s3.amazonaws.com" }
+ }
+ }
+ {
+ documentation: "bucket--with-multiple-dash: isVirtualHostable"
+ params: { BucketName: "bucket--with-multiple-dash" }
+ expect: {
+ endpoint: { url: "https://bucket--with-multiple-dash.s3.amazonaws.com" }
+ }
+ }
+ {
+ documentation: "BucketName: not isVirtualHostable (uppercase characters)"
+ params: { BucketName: "BucketName" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket_name: not isVirtualHostable (underscore)"
+ params: { BucketName: "bucket_name" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket.name: isVirtualHostable (http only)"
+ params: { BucketName: "bucket.name" }
+ expect: {
+ endpoint: { url: "http://bucket.name.s3.amazonaws.com" }
+ }
+ }
+ {
+ documentation: "bucket.name.multiple.dots1: isVirtualHostable (http only)"
+ params: { BucketName: "bucket.name.multiple.dots1" }
+ expect: {
+ endpoint: { url: "http://bucket.name.multiple.dots1.s3.amazonaws.com" }
+ }
+ }
+ {
+ documentation: "-bucket-name: not isVirtualHostable (leading dash)"
+ params: { BucketName: "-bucket-name" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket-name-: not isVirtualHostable (trailing dash)"
+ params: { BucketName: "bucket-name-" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "aa: not isVirtualHostable (< 3 characters)"
+ params: { BucketName: "aa" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "'a'*64: not isVirtualHostable (> 63 characters)"
+ params: { BucketName: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: ".bucket-name: not isVirtualHostable (leading dot)"
+ params: { BucketName: ".bucket-name" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket-name.: not isVirtualHostable (trailing dot)"
+ params: { BucketName: "bucket-name." }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "192.168.5.4: not isVirtualHostable (formatted like an ip address)"
+ params: { BucketName: "192.168.5.4" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket-.name: not isVirtualHostable (invalid label, ends with a -)"
+ params: { BucketName: "bucket-.name" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket.-name: not isVirtualHostable (invalid label, starts with a -)"
+ params: { BucketName: "bucket.-name" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ {
+ documentation: "bucket..name: not isVirtualHostable (consequetive dots)"
+ params: { BucketName: "bucket..name" }
+ expect: { error: "not isVirtualHostableS3Bucket" }
+ }
+ ]
)
@clientContextParams(
- BucketName: {type: "string", documentation: "docs"}
+ BucketName: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/local-region-override.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/local-region-override.smithy
index 8872e3e2475..d91a72dca61 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/local-region-override.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/local-region-override.smithy
@@ -6,67 +6,47 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
+ parameters: {
+ Region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
}
- },
- "rules": [
- {
- "documentation": "override rule for the local pseduo region",
- "conditions": [
+ rules: [
{
- "fn": "stringEquals",
- "argv": [
- "local",
- "{Region}"
- ]
+ documentation: "override rule for the local pseduo region"
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["local", "{Region}"]
+ }
+ ]
+ endpoint: { url: "http://localhost:8080" }
+ type: "endpoint"
}
- ],
- "endpoint": {
- "url": "http://localhost:8080"
- },
- "type": "endpoint"
- },
- {
- "documentation": "base rule",
- "conditions": [],
- "endpoint": {
- "url": "https://{Region}.someservice.amazonaws.com"
- },
- "type": "endpoint"
- }
- ],
- "version": "1.3"
+ {
+ documentation: "base rule"
+ conditions: []
+ endpoint: { url: "https://{Region}.someservice.amazonaws.com" }
+ type: "endpoint"
+ }
+ ]
+ version: "1.3"
})
@endpointTests(
- "version": "1.0",
- "testCases": [
- {
- "documentation": "local region override",
- "params": {
- "Region": "local"
- },
- "expect": {
- "endpoint": {
- "url": "http://localhost:8080"
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "local region override"
+ params: { Region: "local" }
+ expect: {
+ endpoint: { url: "http://localhost:8080" }
+ }
}
- }
- },
- {
- "documentation": "standard region templated",
- "params": {
- "Region": "us-east-2"
- },
- "expect": {
- "endpoint": {
- "url": "https://us-east-2.someservice.amazonaws.com"
+ {
+ documentation: "standard region templated"
+ params: { Region: "us-east-2" }
+ expect: {
+ endpoint: { url: "https://us-east-2.someservice.amazonaws.com" }
+ }
}
- }
- }
- ]
+ ]
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/parse-arn.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/parse-arn.smithy
index 31de5085b4c..09fdd417e68 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/parse-arn.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/parse-arn.smithy
@@ -7,423 +7,333 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "documentation": "docs"
- },
- "Bucket": {
- "type": "string",
- "documentation": "docs"
- },
- "TestCaseId": {
- "type": "string",
- "documentation": "docs"
+ version: "1.3"
+ parameters: {
+ Region: { type: "string", builtIn: "AWS::Region", documentation: "docs" }
+ Bucket: { type: "string", documentation: "docs" }
+ TestCaseId: { type: "string", documentation: "docs" }
}
- },
- "rules": [
- {
- "documentation": "tests of invalid arns",
- "conditions": [
+ rules: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "TestCaseId"
- }
- ]
- },
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "Bucket"
- }
- ]
- },
+ documentation: "tests of invalid arns"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "TestCaseId"
+ }
+ ]
+ }
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Bucket"
+ }
+ ]
+ }
+ {
+ fn: "stringEquals"
+ argv: ["{TestCaseId}", "invalid-arn"]
+ }
+ ]
+ type: "tree"
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "aws.parseArn"
+ argv: ["{Bucket}"]
+ }
+ ]
+ type: "error"
+ error: "A valid ARN was parsed but `{Bucket}` is not a valid ARN"
+ }
+ {
+ conditions: []
+ type: "error"
+ error: "Test case passed: `{Bucket}` is not a valid ARN."
+ }
+ ]
+ }
{
- "fn": "stringEquals",
- "argv": [
- "{TestCaseId}",
- "invalid-arn"
- ]
+ documentation: "tests of valid arns"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "TestCaseId"
+ }
+ ]
+ }
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Bucket"
+ }
+ ]
+ }
+ {
+ fn: "stringEquals"
+ argv: ["{TestCaseId}", "valid-arn"]
+ }
+ ]
+ type: "tree"
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "aws.parseArn"
+ argv: ["{Bucket}"]
+ assign: "arn"
+ }
+ {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "arn"
+ }
+ "resourceId[0]"
+ ]
+ assign: "resource"
+ }
+ ]
+ type: "error"
+ error: "Test case passed: A valid ARN was parsed: service: `{arn#service}`, partition: `{arn#partition}, region: `{arn#region}`, accountId: `{arn#accountId}`, resource: `{resource}`"
+ }
+ {
+ conditions: []
+ type: "error"
+ error: "Test case failed: `{Bucket}` is a valid ARN but parseArn failed to parse it."
+ }
+ ]
}
- ],
- "type": "tree",
- "rules": [
{
- "conditions": [
- {
- "fn": "aws.parseArn",
- "argv": ["{Bucket}"]
- }
- ],
- "type": "error",
- "error": "A valid ARN was parsed but `{Bucket}` is not a valid ARN"
- },
+ documentation: "region is set"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Region"
+ }
+ ]
+ }
+ {
+ fn: "aws.partition"
+ argv: ["{Region}"]
+ assign: "partitionResult"
+ }
+ ]
+ rules: [
+ {
+ documentation: "bucket is set, handle bucket specific endpoints"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Bucket"
+ }
+ ]
+ }
+ ]
+ rules: [
+ {
+ documentation: "bucket is set and is an arn"
+ conditions: [
+ {
+ fn: "aws.parseArn"
+ argv: [
+ {
+ ref: "Bucket"
+ }
+ ]
+ assign: "bucketArn"
+ }
+ ]
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "bucketArn"
+ }
+ "resourceId[1]"
+ ]
+ assign: "outpostId"
+ }
+ ]
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{outpostId}", ""]
+ }
+ ]
+ error: "OutpostId was empty"
+ type: "error"
+ }
+ {
+ conditions: []
+ endpoint: { url: "https://{outpostId}-{bucketArn#accountId}.{bucketArn#region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
+ }
+ ]
+ type: "tree"
+ }
+ {
+ conditions: []
+ error: "Invalid ARN: outpostId was not set"
+ type: "error"
+ }
+ ]
+ type: "tree"
+ }
+ {
+ documentation: "bucket can be used as a host label"
+ conditions: [
+ {
+ fn: "isValidHostLabel"
+ argv: ["{Bucket}", false]
+ }
+ ]
+ endpoint: { url: "https://{Bucket}.{Region}.amazonaws.com" }
+ type: "endpoint"
+ }
+ {
+ conditions: []
+ documentation: "fallback: use bucket in the path"
+ endpoint: { url: "https://{Region}.amazonaws.com/{Bucket}" }
+ type: "endpoint"
+ }
+ ]
+ type: "tree"
+ }
+ {
+ documentation: "region is set, bucket is not"
+ conditions: []
+ endpoint: { url: "https://{Region}.{partitionResult#dnsSuffix}" }
+ type: "endpoint"
+ }
+ ]
+ type: "tree"
+ }
{
- "conditions": [],
- "type": "error",
- "error": "Test case passed: `{Bucket}` is not a valid ARN."
+ documentation: "fallback when region is unset"
+ conditions: []
+ error: "Region must be set to resolve a valid endpoint"
+ type: "error"
}
- ]
- },
- {
- "documentation": "tests of valid arns",
- "conditions": [
+ ]
+})
+@endpointTests(
+ version: "1.0"
+ testCases: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "TestCaseId"
+ documentation: "arn + region resolution"
+ params: { Bucket: "arn:aws:s3:us-east-2:012345678:outpost:op-1234", Region: "us-east-2" }
+ expect: {
+ endpoint: { url: "https://op-1234-012345678.us-east-2.amazonaws.com" }
}
- ]
- },
+ }
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Bucket"
- }
- ]
- },
+ documentation: "arn, unset outpost id"
+ params: { Bucket: "arn:aws:s3:us-east-2:012345678:outpost", Region: "us-east-2" }
+ expect: { error: "Invalid ARN: outpostId was not set" }
+ }
+ {
+ documentation: "arn, empty outpost id (tests that empty strings are handled properly during matching)"
+ params: { Bucket: "arn:aws:s3:us-east-2:012345678:outpost::", Region: "us-east-2" }
+ expect: { error: "OutpostId was empty" }
+ }
{
- "fn": "stringEquals",
- "argv": [
- "{TestCaseId}",
- "valid-arn"
- ]
+ documentation: "arn, empty outpost id (tests that ARN parsing considers a trailing colon)"
+ params: { Bucket: "arn:aws:s3:us-east-2:012345678:outpost:", Region: "us-east-2" }
+ expect: { error: "OutpostId was empty" }
}
- ],
- "type": "tree",
- "rules": [
{
- "conditions": [
- {
- "fn": "aws.parseArn",
- "argv": ["{Bucket}"],
- "assign": "arn"
- },
- {
- "fn": "getAttr",
- "argv": [{"ref": "arn"}, "resourceId[0]"],
- "assign": "resource"
+ documentation: "valid hostlabel + region resolution"
+ params: { Bucket: "mybucket", Region: "us-east-2" }
+ expect: {
+ endpoint: { url: "https://mybucket.us-east-2.amazonaws.com" }
}
- ],
- "type": "error",
- "error": "Test case passed: A valid ARN was parsed: service: `{arn#service}`, partition: `{arn#partition}, region: `{arn#region}`, accountId: `{arn#accountId}`, resource: `{resource}`"
- },
+ }
{
- "conditions": [],
- "type": "error",
- "error": "Test case failed: `{Bucket}` is a valid ARN but parseArn failed to parse it."
+ documentation: "not a valid hostlabel + region resolution"
+ params: { Bucket: "99_a", Region: "us-east-2" }
+ expect: {
+ endpoint: { url: "https://us-east-2.amazonaws.com/99_a" }
+ }
}
- ]
- },
- {
- "documentation": "region is set",
- "conditions": [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Region"
+ documentation: "no bucket"
+ params: { Region: "us-east-2" }
+ expect: {
+ endpoint: { url: "https://us-east-2.amazonaws.com" }
}
- ]
- },
+ }
{
- "fn": "aws.partition",
- "argv": [
- "{Region}"
- ],
- "assign": "partitionResult"
+ documentation: "a string that is not a 6-part ARN"
+ params: { TestCaseId: "invalid-arn", Bucket: "asdf" }
+ expect: { error: "Test case passed: `asdf` is not a valid ARN." }
}
- ],
- "rules": [
{
- "documentation": "bucket is set, handle bucket specific endpoints",
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "Bucket"
- }
- ]
- }
- ],
- "rules": [
- {
- "documentation": "bucket is set and is an arn",
- "conditions": [
- {
- "fn": "aws.parseArn",
- "argv": [
- {
- "ref": "Bucket"
- }
- ],
- "assign": "bucketArn"
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "bucketArn"
- },
- "resourceId[1]"
- ],
- "assign": "outpostId"
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "stringEquals",
- "argv": [
- "{outpostId}",
- ""
- ]
- }
- ],
- "error": "OutpostId was empty",
- "type": "error"
- },
- {
- "conditions": [],
- "endpoint": {
- "url": "https://{outpostId}-{bucketArn#accountId}.{bucketArn#region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "error": "Invalid ARN: outpostId was not set",
- "type": "error"
- }
- ],
- "type": "tree"
- },
- {
- "documentation": "bucket can be used as a host label",
- "conditions": [
- {
- "fn": "isValidHostLabel",
- "argv": [
- "{Bucket}",
- false
- ]
- }
- ],
- "endpoint": {
- "url": "https://{Bucket}.{Region}.amazonaws.com"
- },
- "type": "endpoint"
- },
- {
- "conditions": [],
- "documentation": "fallback: use bucket in the path",
- "endpoint": {
- "url": "https://{Region}.amazonaws.com/{Bucket}"
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- },
+ documentation: "resource id MUST not be null"
+ params: { TestCaseId: "invalid-arn", Bucket: "arn:aws:s3:us-west-2:123456789012:" }
+ expect: { error: "Test case passed: `arn:aws:s3:us-west-2:123456789012:` is not a valid ARN." }
+ }
{
- "documentation": "region is set, bucket is not",
- "conditions": [],
- "endpoint": {
- "url": "https://{Region}.{partitionResult#dnsSuffix}"
- },
- "type": "endpoint"
+ documentation: "service MUST not be null"
+ params: { TestCaseId: "invalid-arn", Bucket: "arn:aws::us-west-2:123456789012:resource-id" }
+ expect: { error: "Test case passed: `arn:aws::us-west-2:123456789012:resource-id` is not a valid ARN." }
}
- ],
- "type": "tree"
- },
- {
- "documentation": "fallback when region is unset",
- "conditions": [],
- "error": "Region must be set to resolve a valid endpoint",
- "type": "error"
- }
- ]
-})
-@endpointTests(
- "version": "1.0",
- "testCases": [
- {
- "documentation": "arn + region resolution",
- "params": {
- "Bucket": "arn:aws:s3:us-east-2:012345678:outpost:op-1234",
- "Region": "us-east-2"
- },
- "expect": {
- "endpoint": {
- "url": "https://op-1234-012345678.us-east-2.amazonaws.com"
+ {
+ documentation: "partition MUST not be null"
+ params: { TestCaseId: "invalid-arn", Bucket: "arn::s3:us-west-2:123456789012:resource-id" }
+ expect: { error: "Test case passed: `arn::s3:us-west-2:123456789012:resource-id` is not a valid ARN." }
+ }
+ {
+ documentation: "region MAY be null"
+ params: { TestCaseId: "valid-arn", Bucket: "arn:aws:s3::123456789012:resource-id" }
+ expect: {
+ error: "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: ``, accountId: `123456789012`, resource: `resource-id`"
+ }
}
- }
- },
- {
- "documentation": "arn, unset outpost id",
- "params": {
- "Bucket": "arn:aws:s3:us-east-2:012345678:outpost",
- "Region": "us-east-2"
- },
- "expect": {
- "error": "Invalid ARN: outpostId was not set"
- }
- },
- {
- "documentation": "arn, empty outpost id (tests that empty strings are handled properly during matching)",
- "params": {
- "Bucket": "arn:aws:s3:us-east-2:012345678:outpost::",
- "Region": "us-east-2"
- },
- "expect": {
- "error": "OutpostId was empty"
- }
- },
- {
- "documentation": "arn, empty outpost id (tests that ARN parsing considers a trailing colon)",
- "params": {
- "Bucket": "arn:aws:s3:us-east-2:012345678:outpost:",
- "Region": "us-east-2"
- },
- "expect": {
- "error": "OutpostId was empty"
- }
- },
- {
- "documentation": "valid hostlabel + region resolution",
- "params": {
- "Bucket": "mybucket",
- "Region": "us-east-2"
- },
- "expect": {
- "endpoint": {
- "url": "https://mybucket.us-east-2.amazonaws.com"
+ {
+ documentation: "accountId MAY be null"
+ params: { TestCaseId: "valid-arn", Bucket: "arn:aws:s3:us-east-1::resource-id" }
+ expect: {
+ error: "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: ``, resource: `resource-id`"
+ }
}
- }
- },
- {
- "documentation": "not a valid hostlabel + region resolution",
- "params": {
- "Bucket": "99_a",
- "Region": "us-east-2"
- },
- "expect": {
- "endpoint": {
- "url": "https://us-east-2.amazonaws.com/99_a"
+ {
+ documentation: "accountId MAY be non-numeric"
+ params: { TestCaseId: "valid-arn", Bucket: "arn:aws:s3:us-east-1:abcd:resource-id" }
+ expect: {
+ error: "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: `abcd`, resource: `resource-id`"
+ }
}
- }
- },
- {
- "documentation": "no bucket",
- "params": {
- "Region": "us-east-2"
- },
- "expect": {
- "endpoint": {
- "url": "https://us-east-2.amazonaws.com"
+ {
+ documentation: "resource may contain both `:` and `/`"
+ params: {
+ TestCaseId: "valid-arn"
+ Bucket: "arn:aws:s3:us-east-1:123456789012:resource-id/resource-1:resource-2"
+ }
+ expect: {
+ error: "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: `123456789012`, resource: `resource-id`"
+ }
}
- }
- },
- {
- "documentation": "a string that is not a 6-part ARN",
- "params": {
- "TestCaseId": "invalid-arn",
- "Bucket": "asdf"
- },
- "expect": {
- "error": "Test case passed: `asdf` is not a valid ARN."
- }
- },
- {
- "documentation": "resource id MUST not be null",
- "params": {
- "TestCaseId": "invalid-arn",
- "Bucket": "arn:aws:s3:us-west-2:123456789012:"
- },
- "expect": {
- "error": "Test case passed: `arn:aws:s3:us-west-2:123456789012:` is not a valid ARN."
- }
- },
- {
- "documentation": "service MUST not be null",
- "params": {
- "TestCaseId": "invalid-arn",
- "Bucket": "arn:aws::us-west-2:123456789012:resource-id"
- },
- "expect": {
- "error": "Test case passed: `arn:aws::us-west-2:123456789012:resource-id` is not a valid ARN."
- }
- },
- {
- "documentation": "partition MUST not be null",
- "params": {
- "TestCaseId": "invalid-arn",
- "Bucket": "arn::s3:us-west-2:123456789012:resource-id"
- },
- "expect": {
- "error": "Test case passed: `arn::s3:us-west-2:123456789012:resource-id` is not a valid ARN."
- }
- },
- {
- "documentation": "region MAY be null",
- "params": {
- "TestCaseId": "valid-arn",
- "Bucket": "arn:aws:s3::123456789012:resource-id"
- },
- "expect": {
- "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: ``, accountId: `123456789012`, resource: `resource-id`"
- }
- },
- {
- "documentation": "accountId MAY be null",
- "params": {
- "TestCaseId": "valid-arn",
- "Bucket": "arn:aws:s3:us-east-1::resource-id"
- },
- "expect": {
- "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: ``, resource: `resource-id`"
- }
- },
- {
- "documentation": "accountId MAY be non-numeric",
- "params": {
- "TestCaseId": "valid-arn",
- "Bucket": "arn:aws:s3:us-east-1:abcd:resource-id"
- },
- "expect": {
- "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: `abcd`, resource: `resource-id`"
- }
- },
- {
- "documentation": "resource may contain both `:` and `/`",
- "params": {
- "TestCaseId": "valid-arn",
- "Bucket": "arn:aws:s3:us-east-1:123456789012:resource-id/resource-1:resource-2"
- },
- "expect": {
- "error": "Test case passed: A valid ARN was parsed: service: `s3`, partition: `aws, region: `us-east-1`, accountId: `123456789012`, resource: `resource-id`"
- }
- }
- ]
+ ]
)
@clientContextParams(
- Bucket: {type: "string", documentation: "docs"}
- TestCaseId: {type: "string", documentation: "docs"}
+ Bucket: { type: "string", documentation: "docs" }
+ TestCaseId: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/partition-fn.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/partition-fn.smithy
index 92285621992..67a5f2a1052 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/partition-fn.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/partition-fn.smithy
@@ -6,221 +6,185 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "required": true,
- "documentation": "docs"
+ parameters: {
+ Region: { type: "string", builtIn: "AWS::Region", required: true, documentation: "docs" }
}
- },
- "rules": [
- {
- "documentation": "base rule",
- "conditions": [
+ rules: [
{
- "fn": "aws.partition",
- "argv": [
- {
- "ref": "Region"
- }
- ],
- "assign": "PartResult"
- }
- ],
- "rules": [
- {
- "documentation": "the AWS partition",
- "conditions": [
- {
- "fn": "stringEquals",
- "argv": [
- "aws",
+ documentation: "base rule"
+ conditions: [
{
- "fn": "getAttr",
- "argv": [
- {
- "ref": "PartResult"
- },
- "name"
- ]
+ fn: "aws.partition"
+ argv: [
+ {
+ ref: "Region"
+ }
+ ]
+ assign: "PartResult"
}
- ]
- }
- ],
- "endpoint": {
- "url": "https://aws-partition.{Region}.{PartResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
+ ]
+ rules: [
{
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "{Region}"
+ documentation: "the AWS partition"
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: [
+ "aws"
+ {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "PartResult"
+ }
+ "name"
+ ]
+ }
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://aws-partition.{Region}.{PartResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "{Region}"
+ }
+ ]
+ meta: { baseSuffix: "{PartResult#dnsSuffix}", dualStackSuffix: "{PartResult#dualStackDnsSuffix}" }
+ }
+ }
+ type: "endpoint"
}
- ],
- "meta": {
- "baseSuffix": "{PartResult#dnsSuffix}",
- "dualStackSuffix": "{PartResult#dualStackDnsSuffix}"
- }
- }
- },
- "type": "endpoint"
- },
- {
- "documentation": "the other partitions",
- "conditions": [],
- "endpoint": {
- "url": "https://{PartResult#name}.{Region}.{PartResult#dnsSuffix}",
- "properties": {
- "authSchemes": [
{
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "{Region}"
+ documentation: "the other partitions"
+ conditions: []
+ endpoint: {
+ url: "https://{PartResult#name}.{Region}.{PartResult#dnsSuffix}"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "{Region}"
+ }
+ ]
+ meta: { baseSuffix: "{PartResult#dnsSuffix}", dualStackSuffix: "{PartResult#dualStackDnsSuffix}" }
+ }
+ }
+ type: "endpoint"
}
- ],
- "meta": {
- "baseSuffix": "{PartResult#dnsSuffix}",
- "dualStackSuffix": "{PartResult#dualStackDnsSuffix}"
- }
- }
- },
- "type": "endpoint"
- },
- {
- "conditions": [],
- "error": "no rules matched",
- "type": "error"
+ {
+ conditions: []
+ error: "no rules matched"
+ type: "error"
+ }
+ ]
+ type: "tree"
}
- ],
- "type": "tree"
- }
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
@endpointTests(
- version: "1.0",
- testCases: [
- {
- "documentation": "standard AWS region",
- "params": {
- "Region": "us-east-2"
- },
- "expect": {
- "endpoint": {
- "url": "https://aws-partition.us-east-2.amazonaws.com",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "us-east-2"
- }
- ],
- "meta": {
- "baseSuffix": "amazonaws.com",
- "dualStackSuffix": "api.aws"
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "standard AWS region"
+ params: { Region: "us-east-2" }
+ expect: {
+ endpoint: {
+ url: "https://aws-partition.us-east-2.amazonaws.com"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "us-east-2"
+ }
+ ]
+ meta: { baseSuffix: "amazonaws.com", dualStackSuffix: "api.aws" }
+ }
+ }
}
- }
}
- }
- },
- {
- "documentation": "AWS region that doesn't match any regexes",
- "params": {
- "Region": "mars-global"
- },
- "expect": {
- "endpoint": {
- "url": "https://aws-partition.mars-global.amazonaws.com",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "mars-global"
- }
- ],
- "meta": {
- "baseSuffix": "amazonaws.com",
- "dualStackSuffix": "api.aws"
+ {
+ documentation: "AWS region that doesn't match any regexes"
+ params: { Region: "mars-global" }
+ expect: {
+ endpoint: {
+ url: "https://aws-partition.mars-global.amazonaws.com"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "mars-global"
+ }
+ ]
+ meta: { baseSuffix: "amazonaws.com", dualStackSuffix: "api.aws" }
+ }
+ }
}
- }
}
- }
- },
- {
- "documentation": "AWS region that matches the AWS regex",
- "params": {
- "Region": "us-east-10"
- },
- "expect": {
- "endpoint": {
- "url": "https://aws-partition.us-east-10.amazonaws.com",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "us-east-10"
- }
- ],
- "meta": {
- "baseSuffix": "amazonaws.com",
- "dualStackSuffix": "api.aws"
+ {
+ documentation: "AWS region that matches the AWS regex"
+ params: { Region: "us-east-10" }
+ expect: {
+ endpoint: {
+ url: "https://aws-partition.us-east-10.amazonaws.com"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "us-east-10"
+ }
+ ]
+ meta: { baseSuffix: "amazonaws.com", dualStackSuffix: "api.aws" }
+ }
+ }
}
- }
}
- }
- },
- {
- "documentation": "CN region that matches the AWS regex",
- "params": {
- "Region": "cn-north-5"
- },
- "expect": {
- "endpoint": {
- "url": "https://aws-cn.cn-north-5.amazonaws.com.cn",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "cn-north-5"
- }
- ],
- "meta": {
- "baseSuffix": "amazonaws.com.cn",
- "dualStackSuffix": "api.amazonwebservices.com.cn"
+ {
+ documentation: "CN region that matches the AWS regex"
+ params: { Region: "cn-north-5" }
+ expect: {
+ endpoint: {
+ url: "https://aws-cn.cn-north-5.amazonaws.com.cn"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "cn-north-5"
+ }
+ ]
+ meta: { baseSuffix: "amazonaws.com.cn", dualStackSuffix: "api.amazonwebservices.com.cn" }
+ }
+ }
}
- }
}
- }
- },
- {
- "documentation": "CN region that is in the explicit list",
- "params": {
- "Region": "aws-cn-global"
- },
- "expect": {
- "endpoint": {
- "url": "https://aws-cn.aws-cn-global.amazonaws.com.cn",
- "properties": {
- "authSchemes": [
- {
- "name": "sigv4",
- "signingName": "serviceName",
- "signingRegion": "aws-cn-global"
- }
- ],
- "meta": {
- "baseSuffix": "amazonaws.com.cn",
- "dualStackSuffix": "api.amazonwebservices.com.cn"
+ {
+ documentation: "CN region that is in the explicit list"
+ params: { Region: "aws-cn-global" }
+ expect: {
+ endpoint: {
+ url: "https://aws-cn.aws-cn-global.amazonaws.com.cn"
+ properties: {
+ authSchemes: [
+ {
+ name: "sigv4"
+ signingName: "serviceName"
+ signingRegion: "aws-cn-global"
+ }
+ ]
+ meta: { baseSuffix: "amazonaws.com.cn", dualStackSuffix: "api.amazonwebservices.com.cn" }
+ }
+ }
}
- }
}
- }
- }
- ]
+ ]
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/signing-optional-properties.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/signing-optional-properties.smithy
index ff545c633a3..33663deba79 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/signing-optional-properties.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/signing-optional-properties.smithy
@@ -3,82 +3,77 @@ $version: "2.0"
namespace example
use smithy.rules#endpointRuleSet
-use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "builtIn": "AWS::Region",
- "documentation": "The region to dispatch this request, eg. `us-east-1`."
- }
- },
- "rules": [
+ parameters: {
+ Region: { type: "string", builtIn: "AWS::Region", documentation: "The region to dispatch this request, eg. `us-east-1`." }
+ }
+ rules: [
{
- "documentation": "Template the region into the URI when region is set",
- "conditions": [
+ documentation: "Template the region into the URI when region is set"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "Region"
+ ref: "Region"
}
]
- },
+ }
{
- "fn": "stringEquals",
- "argv": [
+ fn: "stringEquals"
+ argv: [
{
- "ref": "Region"
- },
+ ref: "Region"
+ }
"a"
]
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4",
+ name: "sigv4"
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "Template the region into the URI when region is set",
- "conditions": [
+ documentation: "Template the region into the URI when region is set"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "Region"
+ ref: "Region"
}
]
- },
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ }
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4a",
- "signingRegionSet": ["*"]
+ name: "sigv4a"
+ signingRegionSet: ["*"]
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "fallback when region is unset",
- "conditions": [],
- "error": "Region must be set to resolve a valid endpoint",
- "type": "error"
+ documentation: "fallback when region is unset"
+ conditions: []
+ error: "Region must be set to resolve a valid endpoint"
+ type: "error"
}
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/sigv4subscheme-auth-scheme.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/sigv4subscheme-auth-scheme.smithy
index 2c14b9501ff..9ff7ee47de1 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/sigv4subscheme-auth-scheme.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/language/functions/errorfiles/valid/sigv4subscheme-auth-scheme.smithy
@@ -6,37 +6,33 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "required": true,
- "type": "String",
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ Region: { required: true, type: "String", documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {
- "authSchemes": [
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {
+ authSchemes: [
{
- "name": "sigv4-sub",
- "signingName": "serviceName",
- "signingRegion": "{Region}",
- "additionalField": "test"
+ name: "sigv4-sub"
+ signingName: "serviceName"
+ signingRegion: "{Region}"
+ additionalField: "test"
}
]
- },
- "headers": {}
- },
- "type": "endpoint"
+ }
+ headers: {}
+ }
+ type: "endpoint"
}
]
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/dualStackOnlyEndpoints.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/dualStackOnlyEndpoints.smithy
index 427f157b200..2677f07f9a9 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/dualStackOnlyEndpoints.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/dualStackOnlyEndpoints.smithy
@@ -5,6 +5,4 @@ namespace ns.foo
use aws.endpoints#dualStackOnlyEndpoints
@dualStackOnlyEndpoints
-service Service1 {
- version: "2021-06-29"
-}
+service Service1 { version: "2021-06-29" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/endpointModifierIndex.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/endpointModifierIndex.smithy
index 4e7ba4dbc2d..78a0eeea9a9 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/endpointModifierIndex.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/endpointModifierIndex.smithy
@@ -2,55 +2,48 @@ $version: "2.0"
namespace ns.foo
-use aws.endpoints#standardRegionalEndpoints
-use aws.endpoints#standardPartitionalEndpoints
use aws.endpoints#dualStackOnlyEndpoints
use aws.endpoints#rulesBasedEndpoints
+use aws.endpoints#standardPartitionalEndpoints
+use aws.endpoints#standardRegionalEndpoints
@standardRegionalEndpoints
-service Service1 {
- version: "2021-06-29"
-}
+service Service1 { version: "2021-06-29" }
@standardPartitionalEndpoints(endpointPatternType: "service_dnsSuffix")
-service Service2 {
- version: "2021-06-29"
-}
+service Service2 { version: "2021-06-29" }
@standardRegionalEndpoints(
partitionSpecialCases: {
"aws-us-gov": [
{
- endpoint: "https://myservice.{region}.{dnsSuffix}",
+ endpoint: "https://myservice.{region}.{dnsSuffix}"
dualStack: true
- },
+ }
{
- endpoint: "https://myservice.global.amazonaws.com",
+ endpoint: "https://myservice.global.amazonaws.com"
dualStack: true
}
]
- },
+ }
regionSpecialCases: {
- "us-east-1": [
- ]
+ "us-east-1": []
}
)
@dualStackOnlyEndpoints
-service Service3 {
- version: "2021-06-29"
-}
+service Service3 { version: "2021-06-29" }
@standardPartitionalEndpoints(
- endpointPatternType: "service_region_dnsSuffix",
+ endpointPatternType: "service_region_dnsSuffix"
partitionEndpointSpecialCases: {
"aws-us-gov": [
{
- endpoint: "https://myservice.{region}.{dnsSuffix}",
+ endpoint: "https://myservice.{region}.{dnsSuffix}"
region: "us-east-1"
fips: true
- },
+ }
{
- endpoint: "https://myservice.global.amazonaws.com",
+ endpoint: "https://myservice.global.amazonaws.com"
region: "us-west-2"
dualStack: true
}
@@ -58,6 +51,4 @@ service Service3 {
}
)
@rulesBasedEndpoints
-service Service4 {
- version: "2021-06-29"
-}
+service Service4 { version: "2021-06-29" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/dualstack-only-endpoints-trait.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/dualstack-only-endpoints-trait.smithy
index 586dcd340d3..4403e108ec1 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/dualstack-only-endpoints-trait.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/dualstack-only-endpoints-trait.smithy
@@ -5,6 +5,4 @@ namespace smithy.example
use aws.endpoints#dualStackOnlyEndpoints
@dualStackOnlyEndpoints
-service MyService {
- version: "2020-04-02"
-}
+service MyService { version: "2020-04-02" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/rule-based-endpoints-trait.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/rule-based-endpoints-trait.smithy
index cf17ea2846a..711be0c41f2 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/rule-based-endpoints-trait.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/rule-based-endpoints-trait.smithy
@@ -5,6 +5,4 @@ namespace smithy.example
use aws.endpoints#rulesBasedEndpoints
@rulesBasedEndpoints
-service MyService {
- version: "2020-04-02"
-}
+service MyService { version: "2020-04-02" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-partitional-endpoints-trait.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-partitional-endpoints-trait.smithy
index af7abb03ed6..0284f182638 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-partitional-endpoints-trait.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-partitional-endpoints-trait.smithy
@@ -5,12 +5,20 @@ namespace smithy.example
use aws.endpoints#standardPartitionalEndpoints
@standardPartitionalEndpoints(
- endpointPatternType: "service_dnsSuffix",
+ endpointPatternType: "service_dnsSuffix"
partitionEndpointSpecialCases: {
- "aws-us": [{endpoint: "https://myservice.us-west-2.amazonaws.com", region: "us-west-2"}],
- "aws-cn": [{endpoint: "https://myservice.cn-north-1.amazonaws.com", region: "cn-north-1"}]
+ "aws-us": [
+ {
+ endpoint: "https://myservice.us-west-2.amazonaws.com"
+ region: "us-west-2"
+ }
+ ]
+ "aws-cn": [
+ {
+ endpoint: "https://myservice.cn-north-1.amazonaws.com"
+ region: "cn-north-1"
+ }
+ ]
}
)
-service MyService {
- version: "2020-04-02"
-}
+service MyService { version: "2020-04-02" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-regional-endpoints-trait.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-regional-endpoints-trait.smithy
index 94db0e94758..8cdef425e9c 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-regional-endpoints-trait.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/errorfiles/standard-regional-endpoints-trait.smithy
@@ -8,16 +8,13 @@ use aws.endpoints#standardRegionalEndpoints
partitionSpecialCases: {
"aws-us-gov": [
{
- endpoint: "https://myservice.{region}.{dnsSuffix}",
+ endpoint: "https://myservice.{region}.{dnsSuffix}"
fips: true
}
]
- },
+ }
regionSpecialCases: {
- "us-east-1": [
- ]
+ "us-east-1": []
}
)
-service MyService {
- version: "2020-04-02"
-}
+service MyService { version: "2020-04-02" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/ruleBasedEndpoints.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/ruleBasedEndpoints.smithy
index 38ee8f62d5d..3de46bc2603 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/ruleBasedEndpoints.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/ruleBasedEndpoints.smithy
@@ -5,6 +5,4 @@ namespace ns.foo
use aws.endpoints#rulesBasedEndpoints
@rulesBasedEndpoints
-service Service1 {
- version: "2021-06-29"
-}
+service Service1 { version: "2021-06-29" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardPartitionalEndpoints.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardPartitionalEndpoints.smithy
index e4f5643c2e2..fb0beeea1ec 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardPartitionalEndpoints.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardPartitionalEndpoints.smithy
@@ -5,27 +5,23 @@ namespace ns.foo
use aws.endpoints#standardPartitionalEndpoints
@standardPartitionalEndpoints(endpointPatternType: "service_dnsSuffix")
-service Service1 {
- version: "2021-06-29"
-}
+service Service1 { version: "2021-06-29" }
@standardPartitionalEndpoints(
- endpointPatternType: "service_region_dnsSuffix",
+ endpointPatternType: "service_region_dnsSuffix"
partitionEndpointSpecialCases: {
"aws-us-gov": [
{
- endpoint: "https://myservice.{region}.{dnsSuffix}",
+ endpoint: "https://myservice.{region}.{dnsSuffix}"
region: "us-east-1"
fips: true
- },
+ }
{
- endpoint: "https://myservice.global.amazonaws.com",
+ endpoint: "https://myservice.global.amazonaws.com"
region: "us-west-2"
dualStack: true
}
]
}
)
-service Service2 {
- version: "2021-06-29"
-}
+service Service2 { version: "2021-06-29" }
diff --git a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardRegionalEndpoints.smithy b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardRegionalEndpoints.smithy
index 37bf9547a95..9e0e2539f14 100644
--- a/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardRegionalEndpoints.smithy
+++ b/smithy-aws-endpoints/src/test/resources/software/amazon/smithy/rulesengine/aws/traits/standardRegionalEndpoints.smithy
@@ -5,33 +5,29 @@ namespace ns.foo
use aws.endpoints#standardRegionalEndpoints
@standardRegionalEndpoints
-service Service1 {
- version: "2021-06-29"
-}
+service Service1 { version: "2021-06-29" }
-@standardRegionalEndpoints(partitionSpecialCases: {}, regionSpecialCases: {})
-service Service2 {
- version: "2021-06-29"
-}
+@standardRegionalEndpoints(
+ partitionSpecialCases: {}
+ regionSpecialCases: {}
+)
+service Service2 { version: "2021-06-29" }
@standardRegionalEndpoints(
partitionSpecialCases: {
"aws-us-gov": [
{
- endpoint: "https://myservice.{region}.{dnsSuffix}",
+ endpoint: "https://myservice.{region}.{dnsSuffix}"
fips: true
- },
+ }
{
- endpoint: "https://myservice.global.amazonaws.com",
+ endpoint: "https://myservice.global.amazonaws.com"
dualStack: true
}
]
- },
+ }
regionSpecialCases: {
- "us-east-1": [
- ]
+ "us-east-1": []
}
)
-service Service3 {
- version: "2021-06-29"
-}
+service Service3 { version: "2021-06-29" }
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/actionname-override.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/actionname-override.smithy
index d4ddbb65528..2f3e09c2cc7 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/actionname-override.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/actionname-override.smithy
@@ -1,4 +1,5 @@
$version: "2.0"
+
namespace smithy.example
@aws.iam#actionName("overridingActionName")
@@ -9,7 +10,7 @@ operation GetResource2 {
}
structure GetResource2Input {
- id1: String,
+ id1: String
@required
id2: String
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/condition-key-value.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/condition-key-value.smithy
index ffdd45f9f26..0e2e84e2223 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/condition-key-value.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/condition-key-value.smithy
@@ -6,8 +6,10 @@ namespace smithy.example
"smithy:ActionContextKey1": { type: "String" }
)
service MyService {
- version: "2019-02-20",
- operations: [Echo]
+ version: "2019-02-20"
+ operations: [
+ Echo
+ ]
}
operation Echo {
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-resources.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-resources.smithy
index d6d8ee9265c..6825375f577 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-resources.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-resources.smithy
@@ -1,12 +1,19 @@
$version: "1.0"
+
namespace smithy.example
@aws.api#service(sdkId: "My")
-@aws.iam#defineConditionKeys("my:service": {type: "String", documentation: "Foo baz"})
+@aws.iam#defineConditionKeys(
+ "my:service": { type: "String", documentation: "Foo baz" }
+)
service MyService {
- version: "2019-02-20",
- operations: [Operation1],
- resources: [Resource1]
+ version: "2019-02-20"
+ operations: [
+ Operation1
+ ]
+ resources: [
+ Resource1
+ ]
}
@aws.iam#conditionKeys(["aws:operation1", "my:service"])
@@ -14,20 +21,17 @@ operation Operation1 {}
@aws.iam#conditionKeys(["resource:1"])
resource Resource1 {
- identifiers: {
- id1: ArnString,
- },
- resources: [Resource2]
+ identifiers: { id1: ArnString }
+ resources: [
+ Resource2
+ ]
}
@aws.iam#disableConditionKeyInference
resource Resource2 {
- identifiers: {
- id1: ArnString,
- id2: FooString,
- },
- read: GetResource2,
- list: ListResource2,
+ identifiers: { id1: ArnString, id2: FooString }
+ read: GetResource2
+ list: ListResource2
}
@readonly
@@ -36,11 +40,11 @@ operation GetResource2 {
}
structure GetResource2Input {
- @required
- id1: ArnString,
+ @required
+ id1: ArnString
- @required
- id2: FooString
+ @required
+ id2: FooString
}
@documentation("This is Foo")
@@ -48,13 +52,13 @@ string FooString
@readonly
operation ListResource2 {
- input: ListResource2Input,
+ input: ListResource2Input
output: ListResource2Output
}
structure ListResource2Input {
- @required
- id1: ArnString,
+ @required
+ id1: ArnString
}
structure ListResource2Output {}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-service.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-service.smithy
index 2c7396243ac..8346f62e888 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-service.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/disable-condition-key-inference-for-service.smithy
@@ -1,13 +1,20 @@
$version: "1.0"
+
namespace smithy.example
@aws.api#service(sdkId: "My")
-@aws.iam#defineConditionKeys("my:service": {type: "String", documentation: "Foo baz"})
+@aws.iam#defineConditionKeys(
+ "my:service": { type: "String", documentation: "Foo baz" }
+)
@aws.iam#disableConditionKeyInference
service MyService {
- version: "2019-02-20",
- operations: [Operation1],
- resources: [Resource1]
+ version: "2019-02-20"
+ operations: [
+ Operation1
+ ]
+ resources: [
+ Resource1
+ ]
}
@aws.iam#conditionKeys(["aws:operation1", "my:service"])
@@ -15,32 +22,29 @@ operation Operation1 {}
@aws.iam#conditionKeys(["resource:1"])
resource Resource1 {
- identifiers: {
- id1: ArnString,
- },
- resources: [Resource2]
+ identifiers: { id1: ArnString }
+ resources: [
+ Resource2
+ ]
}
resource Resource2 {
- identifiers: {
- id1: ArnString,
- id2: FooString,
- },
- read: GetResource2,
- list: ListResource2,
+ identifiers: { id1: ArnString, id2: FooString }
+ read: GetResource2
+ list: ListResource2
}
@readonly
operation GetResource2 {
- input: GetResource2Input
+ input: GetResource2Input
}
structure GetResource2Input {
- @required
- id1: ArnString,
+ @required
+ id1: ArnString
- @required
- id2: FooString
+ @required
+ id2: FooString
}
@documentation("This is Foo")
@@ -48,13 +52,13 @@ string FooString
@readonly
operation ListResource2 {
- input: ListResource2Input,
- output: ListResource2Output
+ input: ListResource2Input
+ output: ListResource2Output
}
structure ListResource2Input {
- @required
- id1: ArnString,
+ @required
+ id1: ArnString
}
structure ListResource2Output {}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/condition-keys/invalid-condition-keys.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/condition-keys/invalid-condition-keys.smithy
index a50e0162876..e524c91235f 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/condition-keys/invalid-condition-keys.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/condition-keys/invalid-condition-keys.smithy
@@ -1,11 +1,16 @@
$version: "1.0"
+
namespace smithy.example
@aws.api#service(sdkId: "My")
-@aws.iam#defineConditionKeys("foo:baz": {type: "String", documentation: "Foo baz"})
+@aws.iam#defineConditionKeys(
+ "foo:baz": { type: "String", documentation: "Foo baz" }
+)
service MyService {
- version: "2019-02-20",
- operations: [Operation]
+ version: "2019-02-20"
+ operations: [
+ Operation
+ ]
}
@aws.iam#conditionKeys(["foo:qux"])
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-detachment.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-detachment.smithy
index 4d63061516e..4efc012e92b 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-detachment.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-detachment.smithy
@@ -5,17 +5,17 @@ namespace smithy.example
use aws.iam#iamAction
resource Monitor {
- resources: [HealthEvent]
+ resources: [
+ HealthEvent
+ ]
}
-resource HealthEvent {
- read: GetHealthEvent
-}
+resource HealthEvent { read: GetHealthEvent }
@iamAction(
resources: {
required: {
- "HealthEvent": {}
+ HealthEvent: {}
}
}
)
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-duplicates.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-duplicates.smithy
index d83a54be105..9c05917d882 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-duplicates.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-action-resource-duplicates.smithy
@@ -7,18 +7,18 @@ use aws.iam#iamAction
@iamAction(
resources: {
required: {
- "bar": {
+ bar: {
conditionKeys: ["foo:asdf"]
}
- "bap": {
+ bap: {
conditionKeys: ["foo:zxcv"]
}
}
optional: {
- "baz": {
+ baz: {
conditionKeys: ["foo:qwer"]
}
- "bap": {
+ bap: {
conditionKeys: ["foo:zxcv"]
}
}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-resources/invalid-iam-resources.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-resources/invalid-iam-resources.smithy
index 26cbc3b9610..8b8aeb6c5e1 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-resources/invalid-iam-resources.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/iam-resources/invalid-iam-resources.smithy
@@ -1,16 +1,19 @@
$version: "2"
+
namespace smithy.example
use aws.api#arn
@aws.api#service(sdkId: "My")
-@aws.iam#defineConditionKeys("foo:baz": {type: "String", documentation: "Foo baz"})
+@aws.iam#defineConditionKeys(
+ "foo:baz": { type: "String", documentation: "Foo baz" }
+)
service MyService {
- version: "2019-02-20",
+ version: "2019-02-20"
resources: [
- BadIamResourceName,
- Beer,
- InvalidResource,
+ BadIamResourceName
+ Beer
+ InvalidResource
ShouldNotThrowAnError
]
}
@@ -18,26 +21,22 @@ service MyService {
@aws.iam#iamResource(name: "bad-iam-resourceName")
@arn(template: "bad-iam-resource-name/{id}")
resource BadIamResourceName {
- identifiers: {
- id: String
- }
+ identifiers: { id: String }
}
@aws.iam#iamResource(name: "beer")
@arn(template: "beer/{beerId}")
resource Beer {
- identifiers: {
- beerId: String
- }
- resources: [IncompatibleResourceName]
+ identifiers: { beerId: String }
+ resources: [
+ IncompatibleResourceName
+ ]
}
@arn(template: "beer/{beerId}/incompatible-resource-name")
@aws.iam#iamResource(name: "IncompatibleResourceName")
resource IncompatibleResourceName {
- identifiers: {
- beerId: String
- }
+ identifiers: { beerId: String }
}
@aws.iam#iamResource(name: "invalidResource")
@@ -47,7 +46,5 @@ resource InvalidResource {}
@aws.iam#iamResource(name: "shouldNotThrowError")
@arn(template: "{arn}", absolute: true)
resource ShouldNotThrowAnError {
- identifiers: {
- arn: String
- }
+ identifiers: { arn: String }
}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-also-service-resolved.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-also-service-resolved.smithy
index b263f40157a..10d3db65e48 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-also-service-resolved.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-also-service-resolved.smithy
@@ -2,16 +2,16 @@ $version: "2.0"
namespace smithy.example
-use aws.iam#conditionKeyValue
-
@aws.iam#defineConditionKeys(
"smithy:ServiceResolveContextKey": { type: "String" }
)
@aws.iam#serviceResolvedConditionKeys(["smithy:ServiceResolveContextKey"])
@aws.api#service(sdkId: "My")
service MyService {
- version: "2019-02-20",
- operations: [Echo]
+ version: "2019-02-20"
+ operations: [
+ Echo
+ ]
}
operation Echo {
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-value.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-value.smithy
index b4ae7276a25..72c9ab2eaea 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-value.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-key-value.smithy
@@ -2,15 +2,15 @@ $version: "2.0"
namespace smithy.example
-use aws.iam#conditionKeyValue
-
@aws.iam#defineConditionKeys(
"smithy:ActionContextKey1": { type: "String" }
)
@aws.api#service(sdkId: "My")
service MyService {
- version: "2019-02-20",
- operations: [Echo]
+ version: "2019-02-20"
+ operations: [
+ Echo
+ ]
}
operation Echo {
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-keys-service-resolved.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-keys-service-resolved.smithy
index 4120bb1aa02..975234c6614 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-keys-service-resolved.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/invalid-condition-keys-service-resolved.smithy
@@ -8,8 +8,10 @@ namespace smithy.example
)
@aws.iam#serviceResolvedConditionKeys(["smithy:invalidkey"])
service MyService {
- version: "2019-02-20",
- operations: [Echo]
+ version: "2019-02-20"
+ operations: [
+ Echo
+ ]
}
operation Echo {}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-key-value.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-key-value.smithy
index 77a4214c7f2..c4cf3ae27a3 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-key-value.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-key-value.smithy
@@ -2,15 +2,15 @@ $version: "2.0"
namespace smithy.example
-use aws.iam#conditionKeyValue
-
@aws.iam#defineConditionKeys(
"smithy:ActionContextKey1": { type: "String" }
)
@aws.api#service(sdkId: "My")
service MyService {
- version: "2019-02-20",
- operations: [Echo]
+ version: "2019-02-20"
+ operations: [
+ Echo
+ ]
}
operation Echo {
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-keys-service-resolved.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-keys-service-resolved.smithy
index 5b16425a965..d5774098a14 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-keys-service-resolved.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/errorfiles/valid-condition-keys-service-resolved.smithy
@@ -8,9 +8,10 @@ namespace smithy.example
)
@aws.iam#serviceResolvedConditionKeys(["smithy:ServiceResolveContextKey"])
service MyService {
- version: "2019-02-20",
- operations: [Echo]
+ version: "2019-02-20"
+ operations: [
+ Echo
+ ]
}
-
operation Echo {}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-action.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-action.smithy
index b52ac3f6fba..f8854dfd4f4 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-action.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-action.smithy
@@ -4,21 +4,22 @@ namespace smithy.example
use aws.iam#iamAction
-@iamAction(name: "foo"
+@iamAction(
+ name: "foo"
documentation: "docs"
relativeDocumentation: "page.html#actions"
requiredActions: ["iam:PassRole", "ec2:RunInstances"]
resources: {
required: {
- "bar": {
+ bar: {
conditionKeys: ["foo:asdf"]
}
- "bap": {
+ bap: {
conditionKeys: ["foo:zxcv", "foo:hjkl"]
}
}
optional: {
- "baz": {}
+ baz: {}
}
}
createsResources: ["kettle"]
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-resource.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-resource.smithy
index 627e7260278..85f2a5885b1 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-resource.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/iam-resource.smithy
@@ -9,19 +9,15 @@ use aws.iam#iamResource
@service(sdkId: "My")
service MyService {
version: "2020-07-02"
- resources: [SuperResource]
+ resources: [
+ SuperResource
+ ]
}
-@iamResource(
- name: "super"
- relativeDocumentation: "API-Super.html"
- disableConditionKeyInheritance: false
-)
+@iamResource(name: "super", relativeDocumentation: "API-Super.html", disableConditionKeyInheritance: false)
@arn(template: "super/{id1}")
resource SuperResource {
- identifiers: {
- id1: String
- }
+ identifiers: { id1: String }
read: GetResource
}
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/required-actions.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/required-actions.smithy
index aa416615820..3dda533fb49 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/required-actions.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/required-actions.smithy
@@ -1,4 +1,5 @@
$version: "1.0"
+
namespace smithy.example
@aws.iam#requiredActions(["iam:PassRole", "ec2:RunInstances"])
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/service-resolved-condition-keys.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/service-resolved-condition-keys.smithy
index c443fcb5cbf..fa29893bfa7 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/service-resolved-condition-keys.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/service-resolved-condition-keys.smithy
@@ -1,4 +1,5 @@
$version: "2.0"
+
namespace smithy.example
@aws.api#service(sdkId: "My")
@@ -6,6 +7,4 @@ namespace smithy.example
"smithy:ServiceResolveContextKey": { type: "String" }
)
@aws.iam#serviceResolvedConditionKeys(["smithy:ServiceResolveContextKey"])
-service MyService {
- version: "2019-02-20",
-}
+service MyService { version: "2019-02-20" }
diff --git a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/successful-condition-keys.smithy b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/successful-condition-keys.smithy
index f6a209a0565..c6a30f56b02 100644
--- a/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/successful-condition-keys.smithy
+++ b/smithy-aws-iam-traits/src/test/resources/software/amazon/smithy/aws/iam/traits/successful-condition-keys.smithy
@@ -1,4 +1,5 @@
$version: "1.0"
+
namespace smithy.example
use aws.api#arnReference
@@ -10,16 +11,16 @@ use aws.iam#iamResource
@service(sdkId: "My")
@defineConditionKeys(
- "foo:baz": {
- type: "String",
- documentation: "Foo baz",
- relativeDocumentation: "condition-keys.html"
- }
+ "foo:baz": { type: "String", documentation: "Foo baz", relativeDocumentation: "condition-keys.html" }
)
service MyService {
- version: "2019-02-20",
- operations: [Operation1],
- resources: [Resource1]
+ version: "2019-02-20"
+ operations: [
+ Operation1
+ ]
+ resources: [
+ Resource1
+ ]
}
@conditionKeys(["aws:accountId", "foo:baz"])
@@ -27,41 +28,32 @@ operation Operation1 {}
@conditionKeys(["aws:accountId", "foo:baz"])
resource Resource1 {
- identifiers: {
- id1: ArnString,
- },
- resources: [Resource2, Resource3, Resource4]
+ identifiers: { id1: ArnString }
+ resources: [
+ Resource2
+ Resource3
+ Resource4
+ ]
}
@iamResource(name: "ResourceTwo")
resource Resource2 {
- identifiers: {
- id1: ArnString,
- id2: FooString,
- },
- read: GetResource2,
- list: ListResource2,
+ identifiers: { id1: ArnString, id2: FooString }
+ read: GetResource2
+ list: ListResource2
}
@disableConditionKeyInference
@iamResource(disableConditionKeyInheritance: true)
resource Resource3 {
- identifiers: {
- id1: ArnString
- id2: FooString
- id3: String
- }
+ identifiers: { id1: ArnString, id2: FooString, id3: String }
}
@disableConditionKeyInference
@iamResource(disableConditionKeyInheritance: true)
@conditionKeys(["foo:baz"])
resource Resource4 {
- identifiers: {
- id1: ArnString
- id2: FooString
- id4: String
- }
+ identifiers: { id1: ArnString, id2: FooString, id4: String }
}
@readonly
@@ -70,11 +62,11 @@ operation GetResource2 {
}
structure GetResource2Input {
- @required
- id1: ArnString,
+ @required
+ id1: ArnString
- @required
- id2: FooString
+ @required
+ id2: FooString
}
@documentation("This is Foo")
@@ -82,13 +74,13 @@ string FooString
@readonly
operation ListResource2 {
- input: ListResource2Input,
+ input: ListResource2Input
output: ListResource2Output
}
structure ListResource2Input {
- @required
- id1: ArnString,
+ @required
+ id1: ArnString
}
structure ListResource2Output {}
diff --git a/smithy-aws-protocol-tests/build.gradle b/smithy-aws-protocol-tests/build.gradle
index e477c53f774..a159f9addc9 100644
--- a/smithy-aws-protocol-tests/build.gradle
+++ b/smithy-aws-protocol-tests/build.gradle
@@ -35,6 +35,5 @@ dependencies {
tasks["sourcesJar"].dependsOn("smithyJarStaging")
smithy {
- format.set(false)
smithyBuildConfigs.set(project.files())
}
diff --git a/smithy-aws-protocol-tests/model/aws-config.smithy b/smithy-aws-protocol-tests/model/aws-config.smithy
index 321956d6246..1ab671d911a 100644
--- a/smithy-aws-protocol-tests/model/aws-config.smithy
+++ b/smithy-aws-protocol-tests/model/aws-config.smithy
@@ -2,17 +2,18 @@
// testing certain behaviors. This isn't an exhaustive listing of all possible
// configuration settings. See the following for a more comprehensive overview:
// https://docs.aws.amazon.com/credref/latest/refdocs/overview.html
-
$version: "2.0"
-metadata suppressions = [{
- id: "UnreferencedShape",
- namespace: "aws.protocoltests.config",
- reason: """
- These shapes are intended to be used to validate vendorParams in
- protocol tests, so they naturally will not be connected to a service.
- """
-}]
+metadata suppressions = [
+ {
+ id: "UnreferencedShape"
+ namespace: "aws.protocoltests.config"
+ reason: """
+ These shapes are intended to be used to validate vendorParams in
+ protocol tests, so they naturally will not be connected to a service.
+ """
+ }
+]
namespace aws.protocoltests.config
@@ -20,28 +21,29 @@ structure AwsConfig {
/// This is the time that should be set during the course of the test.
/// This is important for things like signing where the clock time impacts
/// the result.
- clockTime: Timestamp,
- scopedConfig: ScopedConfig,
+ clockTime: Timestamp
+
+ scopedConfig: ScopedConfig
}
/// Config settings that are scoped to different sources, such as environment
/// variables or the AWS config file.
structure ScopedConfig {
- environment: EnvironmentConfig,
- configFile: ConfigFile,
- credentialsFile: ConfigFile,
- client: ClientConfig,
- operation: OperationConfig,
+ environment: EnvironmentConfig
+ configFile: ConfigFile
+ credentialsFile: ConfigFile
+ client: ClientConfig
+ operation: OperationConfig
}
/// Config settings that can be set as environment variables.
structure EnvironmentConfig {
- AWS_ACCESS_KEY_ID: String,
- AWS_SECRET_ACCESS_KEY: String,
- AWS_DEFAULT_REGION: String,
- AWS_RETRY_MODE: RetryMode,
- AWS_SESSION_TOKEN: String,
- AWS_PROFILE: String,
+ AWS_ACCESS_KEY_ID: String
+ AWS_SECRET_ACCESS_KEY: String
+ AWS_DEFAULT_REGION: String
+ AWS_RETRY_MODE: RetryMode
+ AWS_SESSION_TOKEN: String
+ AWS_PROFILE: String
}
/// A shape representing a parsed config file, which is a map of profile names
@@ -50,50 +52,51 @@ map ConfigFile {
/// The top level key in a config file is the "profile", which is a string.
/// If a profile is not explicitly set, then implementations should check the
/// profile named "default".
- key: String,
+ key: String
+
/// The value is a collection of settings.
- value: FileConfigSettings,
+ value: FileConfigSettings
}
/// Config settings that can be set in the AWS config / credentials file as
/// part of a profile.
structure FileConfigSettings {
- aws_access_key_id: String,
- aws_secret_access_key: String,
- aws_session_token: String,
- region: String,
- s3: S3Config,
- retry_mode: RetryMode,
- max_attempts: Short,
+ aws_access_key_id: String
+ aws_secret_access_key: String
+ aws_session_token: String
+ region: String
+ s3: S3Config
+ retry_mode: RetryMode
+ max_attempts: Short
}
/// Configuration specific to S3.
structure S3Config {
- addressing_style: S3AddressingStyle,
- use_accelerate_endpoint: Boolean,
- use_dualstack_endpoint: Boolean,
+ addressing_style: S3AddressingStyle
+ use_accelerate_endpoint: Boolean
+ use_dualstack_endpoint: Boolean
}
/// Configuration that is set on the constructed client.
structure ClientConfig {
- aws_access_key_id: String,
- aws_secret_access_key: String,
- aws_session_token: String,
- region: String,
- s3: S3Config,
- retry_config: RetryConfig,
- aws_profile: String,
+ aws_access_key_id: String
+ aws_secret_access_key: String
+ aws_session_token: String
+ region: String
+ s3: S3Config
+ retry_config: RetryConfig
+ aws_profile: String
}
/// Configuration that is set for the scope of a single operation.
structure OperationConfig {
- s3: S3Config,
+ s3: S3Config
}
/// Configuration specific to retries.
structure RetryConfig {
- mode: RetryMode,
- max_attempts: Short,
+ mode: RetryMode
+ max_attempts: Short
}
/// Controls the S3 addressing bucket style.
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/defaults.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/defaults.smithy
index 182c36d6504..3b25d2a3364 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/defaults.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/defaults.smithy
@@ -16,7 +16,7 @@ apply OperationWithDefaults @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"defaults": {
@@ -62,12 +62,11 @@ apply OperationWithDefaults @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
}"""
- params: {
- }
+ params: {}
}
{
id: "AwsJson10ClientUsesExplicitlyProvidedMemberValuesOverDefaults"
@@ -78,13 +77,13 @@ apply OperationWithDefaults @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
defaults: {
defaultString: "bye"
defaultBoolean: true
defaultList: ["a"]
- defaultDocumentMap: {name: "Jack"}
+ defaultDocumentMap: { name: "Jack" }
defaultDocumentString: "bye"
defaultDocumentBoolean: true
defaultDocumentList: ["b"]
@@ -97,7 +96,7 @@ apply OperationWithDefaults @httpRequestTests([
defaultLong: 200
defaultFloat: 2.0
defaultDouble: 2.0
- defaultMap: {name: "Jack"}
+ defaultMap: { name: "Jack" }
defaultEnum: "BAR"
defaultIntEnum: 2
emptyString: "foo"
@@ -154,7 +153,7 @@ apply OperationWithDefaults @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"defaults": {}
@@ -188,7 +187,7 @@ apply OperationWithDefaults @httpRequestTests([
zeroLong: 0
zeroFloat: 0.0
zeroDouble: 0.0
- },
+ }
topLevelDefault: "hi"
otherTopLevelDefault: 0
}
@@ -202,16 +201,13 @@ apply OperationWithDefaults @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"topLevelDefault": "hi",
"otherTopLevelDefault": 0
}"""
- params: {
- topLevelDefault: "hi"
- otherTopLevelDefault: 0
- }
+ params: { topLevelDefault: "hi", otherTopLevelDefault: 0 }
}
{
id: "AwsJson10ClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional"
@@ -222,7 +218,7 @@ apply OperationWithDefaults @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"clientOptionalDefaults": {}
@@ -242,7 +238,7 @@ apply OperationWithDefaults @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: "{}"
params: {
defaultString: "hi"
@@ -282,7 +278,7 @@ apply OperationWithDefaults @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"defaultString": "bye",
@@ -318,7 +314,7 @@ apply OperationWithDefaults @httpResponseTests([
defaultString: "bye"
defaultBoolean: false
defaultList: ["a"]
- defaultDocumentMap: {name: "Jack"}
+ defaultDocumentMap: { name: "Jack" }
defaultDocumentString: "bye"
defaultDocumentBoolean: false
defaultDocumentList: ["b"]
@@ -331,7 +327,7 @@ apply OperationWithDefaults @httpResponseTests([
defaultLong: 200
defaultFloat: 2.0
defaultDouble: 2.0
- defaultMap: {name: "Jack"}
+ defaultMap: { name: "Jack" }
defaultEnum: "BAR"
defaultIntEnum: 2
emptyString: "foo"
@@ -353,7 +349,7 @@ apply OperationWithDefaults @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"defaultString": "hi",
@@ -391,8 +387,11 @@ apply OperationWithDefaults @httpResponseTests([
operation OperationWithDefaults {
input := {
defaults: Defaults
+
clientOptionalDefaults: ClientOptionalDefaults
+
topLevelDefault: String = "hi" // Client should ignore default values in input shape
+
otherTopLevelDefault: Integer = 0
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/empty-input-output.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/empty-input-output.smithy
index abe33a5619d..28bd6b6714a 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/empty-input-output.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/empty-input-output.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test the basics of empty input and
// output shape serialization.
-
$version: "2.0"
namespace aws.protocoltests.json10
@@ -16,95 +15,83 @@ operation NoInputAndNoOutput {}
apply NoInputAndNoOutput @httpRequestTests([
{
- id: "AwsJson10MustAlwaysSendEmptyJsonPayload",
+ id: "AwsJson10MustAlwaysSendEmptyJsonPayload"
documentation: """
- Clients must always send an empty JSON object payload for
- operations with no input (that is, `{}`). While AWS service
- implementations support requests with no payload or requests
- that send `{}`, always sending `{}` from the client is
- preferred for forward compatibility in case input is ever
- added to an operation.""",
- protocol: awsJson1_0,
- method: "POST",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.NoInputAndNoOutput",
- },
- uri: "/",
- body: "{}",
+ Clients must always send an empty JSON object payload for
+ operations with no input (that is, `{}`). While AWS service
+ implementations support requests with no payload or requests
+ that send `{}`, always sending `{}` from the client is
+ preferred for forward compatibility in case input is ever
+ added to an operation."""
+ protocol: awsJson1_0
+ method: "POST"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.NoInputAndNoOutput" }
+ uri: "/"
+ body: "{}"
bodyMediaType: "application/json"
- },
+ }
{
- id: "AwsJson10ServiceSupportsNoPayloadForNoInput",
+ id: "AwsJson10ServiceSupportsNoPayloadForNoInput"
documentation: """
- Service implementations must support no payload or an empty
- object payload for operations that define no input. However,
- despite the lack of a payload, a Content-Type header is still
- required in order for the service to properly detect the
- protocol.""",
- protocol: awsJson1_0,
- method: "POST",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.NoInputAndNoOutput",
- },
- uri: "/",
- body: "",
+ Service implementations must support no payload or an empty
+ object payload for operations that define no input. However,
+ despite the lack of a payload, a Content-Type header is still
+ required in order for the service to properly detect the
+ protocol."""
+ protocol: awsJson1_0
+ method: "POST"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.NoInputAndNoOutput" }
+ uri: "/"
+ body: ""
appliesTo: "server"
- },
+ }
])
apply NoInputAndNoOutput @httpResponseTests([
{
- id: "AwsJson10HandlesEmptyOutputShape",
- protocol: awsJson1_0,
+ id: "AwsJson10HandlesEmptyOutputShape"
+ protocol: awsJson1_0
documentation: """
- When no output is defined, the service is expected to return
- an empty payload, however, client must ignore a JSON payload
- if one is returned. This ensures that if output is added later,
- then it will not break the client.""",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
- code: 200,
+ When no output is defined, the service is expected to return
+ an empty payload, however, client must ignore a JSON payload
+ if one is returned. This ensures that if output is added later,
+ then it will not break the client."""
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ code: 200
// Service implementations must ignore this test.
appliesTo: "client"
- },
+ }
{
- id: "AwsJson10HandlesUnexpectedJsonOutput",
- protocol: awsJson1_0,
+ id: "AwsJson10HandlesUnexpectedJsonOutput"
+ protocol: awsJson1_0
documentation: """
- This client-only test builds on handles_empty_output_shape,
- by including unexpected fields in the JSON. A client
- needs to ignore JSON output that is empty or that contains
- JSON object data.""",
+ This client-only test builds on handles_empty_output_shape,
+ by including unexpected fields in the JSON. A client
+ needs to ignore JSON output that is empty or that contains
+ JSON object data."""
body: """
{
"foo": true
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
- code: 200,
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ code: 200
// Service implementations must ignore this test.
appliesTo: "client"
- },
+ }
{
- id: "AwsJson10ServiceRespondsWithNoPayload",
- protocol: awsJson1_0,
+ id: "AwsJson10ServiceRespondsWithNoPayload"
+ protocol: awsJson1_0
documentation: """
- When no output is defined, the service is expected to return
- an empty payload. Despite the lack of a payload, the service
- is expected to always send a Content-Type header. Clients must
- handle cases where a service returns a JSON object and where
- a service returns no JSON at all.""",
- body: "",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ When no output is defined, the service is expected to return
+ an empty payload. Despite the lack of a payload, the service
+ is expected to always send a Content-Type header. Clients must
+ handle cases where a service returns a JSON object and where
+ a service returns no JSON at all."""
+ body: ""
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
code: 200
}
])
@@ -119,31 +106,26 @@ operation NoInputAndOutput {
apply NoInputAndOutput @httpRequestTests([
{
- id: "AwsJson10NoInputAndOutput",
- documentation: "A client should always send and empty JSON object payload.",
- protocol: awsJson1_0,
- method: "POST",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.NoInputAndOutput",
- },
- uri: "/",
- body: "{}",
- bodyMediaType: "application/json",
+ id: "AwsJson10NoInputAndOutput"
+ documentation: "A client should always send and empty JSON object payload."
+ protocol: awsJson1_0
+ method: "POST"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.NoInputAndOutput" }
+ uri: "/"
+ body: "{}"
+ bodyMediaType: "application/json"
}
])
apply NoInputAndOutput @httpResponseTests([
{
- id: "AwsJson10NoInputAndOutput",
- documentation: "Empty output always serializes an empty object payload.",
- protocol: awsJson1_0,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
- code: 200,
- body: "{}",
- bodyMediaType: "application/json",
+ id: "AwsJson10NoInputAndOutput"
+ documentation: "Empty output always serializes an empty object payload."
+ protocol: awsJson1_0
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ code: 200
+ body: "{}"
+ bodyMediaType: "application/json"
}
])
@@ -155,38 +137,33 @@ structure NoInputAndOutputOutput {}
/// and empty output structure that reuses the same shape. While this should
/// be rare, code generators must support this.
operation EmptyInputAndEmptyOutput {
- input: EmptyInputAndEmptyOutputInput,
+ input: EmptyInputAndEmptyOutputInput
output: EmptyInputAndEmptyOutputOutput
}
apply EmptyInputAndEmptyOutput @httpRequestTests([
{
- id: "AwsJson10EmptyInputAndEmptyOutput",
- documentation: "Clients must always send an empty object if input is modeled.",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.EmptyInputAndEmptyOutput",
- }
- },
+ id: "AwsJson10EmptyInputAndEmptyOutput"
+ documentation: "Clients must always send an empty object if input is modeled."
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.EmptyInputAndEmptyOutput" }
+ }
])
apply EmptyInputAndEmptyOutput @httpResponseTests([
{
- id: "AwsJson10EmptyInputAndEmptyOutputSendJsonObject",
- documentation: "A service will always return a JSON object for operations with modeled output.",
- protocol: awsJson1_0,
- code: 200,
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
- },
+ id: "AwsJson10EmptyInputAndEmptyOutputSendJsonObject"
+ documentation: "A service will always return a JSON object for operations with modeled output."
+ protocol: awsJson1_0
+ code: 200
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ }
])
@input
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/endpoint-paths.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/endpoint-paths.smithy
index c0a9faf3f4b..c3c9cb67eaa 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/endpoint-paths.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/endpoint-paths.smithy
@@ -1,5 +1,4 @@
// This file defines tests to ensure that implementations support endpoints with paths
-
$version: "2.0"
namespace aws.protocoltests.json10
@@ -9,14 +8,14 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "AwsJson10HostWithPath",
+ id: "AwsJson10HostWithPath"
documentation: """
- Custom endpoints supplied by users can have paths""",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/custom/",
- body: "{}",
- host: "example.com/custom",
+ Custom endpoints supplied by users can have paths"""
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/custom/"
+ body: "{}"
+ host: "example.com/custom"
appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy
index 9944a480cd6..b029d5e6914 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy
@@ -1,6 +1,5 @@
// This file defines tests to ensure that implementations support the endpoint
// trait and other features that modify the host.
-
$version: "2.0"
namespace aws.protocoltests.json10
@@ -10,49 +9,46 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "AwsJson10EndpointTrait",
+ id: "AwsJson10EndpointTrait"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait.""",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/",
- body: "{}",
- host: "example.com",
- resolvedHost: "foo.example.com",
+ Operations can prepend to the given host if they define the
+ endpoint trait."""
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
+ body: "{}"
+ host: "example.com"
+ resolvedHost: "foo.example.com"
}
])
@endpoint(hostPrefix: "foo.")
operation EndpointOperation {}
-
@httpRequestTests([
{
- id: "AwsJson10EndpointTraitWithHostLabel",
+ id: "AwsJson10EndpointTraitWithHostLabel"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input.""",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/",
- body: "{\"label\": \"bar\"}",
- bodyMediaType: "application/json",
- host: "example.com",
- resolvedHost: "foo.bar.example.com",
- params: {
- label: "bar",
- },
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input."""
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
+ body: "{\"label\": \"bar\"}"
+ bodyMediaType: "application/json"
+ host: "example.com"
+ resolvedHost: "foo.bar.example.com"
+ params: { label: "bar" }
}
])
@endpoint(hostPrefix: "foo.{label}.")
operation EndpointWithHostLabelOperation {
- input: EndpointWithHostLabelOperationInput,
+ input: EndpointWithHostLabelOperationInput
}
@input
structure EndpointWithHostLabelOperationInput {
@required
@hostLabel
- label: String,
+ label: String
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/errors.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/errors.smithy
index 7da6a4b55a2..ac290dd9304 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/errors.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/errors.smithy
@@ -1,11 +1,9 @@
// This file defines test cases that test error serialization.
-
$version: "2.0"
namespace aws.protocoltests.json10
use aws.protocols#awsJson1_0
-use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
/// This operation has three possible return values:
@@ -18,99 +16,94 @@ use smithy.test#httpResponseTests
/// properly deserialize successful and error responses.
@idempotent
operation GreetingWithErrors {
- input: GreetingWithErrorsInput,
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError, FooError]
+ input: GreetingWithErrorsInput
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ FooError
+ ]
}
@input
structure GreetingWithErrorsInput {
- greeting: String,
+ greeting: String
}
@output
structure GreetingWithErrorsOutput {
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "AwsJson10InvalidGreetingError",
- documentation: "Parses simple JSON errors",
- protocol: awsJson1_0,
- params: {
- Message: "Hi"
- },
- code: 400,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ id: "AwsJson10InvalidGreetingError"
+ documentation: "Parses simple JSON errors"
+ protocol: awsJson1_0
+ params: { Message: "Hi" }
+ code: 400
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "__type": "aws.protocoltests.json10#InvalidGreeting",
- "Message": "Hi"
- }""",
- bodyMediaType: "application/json",
- },
+ {
+ "__type": "aws.protocoltests.json10#InvalidGreeting",
+ "Message": "Hi"
+ }"""
+ bodyMediaType: "application/json"
+ }
])
/// This error is thrown when a request is invalid.
@error("client")
structure ComplexError {
- TopLevel: String,
- Nested: ComplexNestedErrorData,
+ TopLevel: String
+ Nested: ComplexNestedErrorData
}
structure ComplexNestedErrorData {
- @jsonName("Fooooo") // Even if this trait it present, it does not affect serialization for this protocol
- Foo: String,
+ @jsonName("Fooooo")
+ // Even if this trait it present, it does not affect serialization for this protocol
+ Foo: String
}
apply ComplexError @httpResponseTests([
{
- id: "AwsJson10ComplexError",
- documentation: "Parses a complex error with no message member",
- protocol: awsJson1_0,
+ id: "AwsJson10ComplexError"
+ documentation: "Parses a complex error with no message member"
+ protocol: awsJson1_0
params: {
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 400,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 400
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "__type": "aws.protocoltests.json10#ComplexError",
- "TopLevel": "Top level",
- "Nested": {
- "Foo": "bar"
- }
- }""",
- bodyMediaType: "application/json",
- },
+ {
+ "__type": "aws.protocoltests.json10#ComplexError",
+ "TopLevel": "Top level",
+ "Nested": {
+ "Foo": "bar"
+ }
+ }"""
+ bodyMediaType: "application/json"
+ }
{
- id: "AwsJson10EmptyComplexError",
- documentation: "Parses a complex error with an empty body",
- protocol: awsJson1_0,
- code: 400,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ id: "AwsJson10EmptyComplexError"
+ documentation: "Parses a complex error with an empty body"
+ protocol: awsJson1_0
+ code: 400
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "__type": "aws.protocoltests.json10#ComplexError"
- }""",
+ {
+ "__type": "aws.protocoltests.json10#ComplexError"
+ }"""
bodyMediaType: "application/json"
- },
+ }
])
/// This error has test cases that test some of the dark corners of Amazon service
@@ -121,145 +114,117 @@ structure FooError {}
apply FooError @httpResponseTests([
{
- id: "AwsJson10FooErrorUsingXAmznErrorType",
- documentation: "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "FooError",
- },
- appliesTo: "client",
- },
+ id: "AwsJson10FooErrorUsingXAmznErrorType"
+ documentation: "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS."
+ protocol: awsJson1_0
+ code: 500
+ headers: { "X-Amzn-Errortype": "FooError" }
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorUsingXAmznErrorTypeWithUri",
+ id: "AwsJson10FooErrorUsingXAmznErrorTypeWithUri"
documentation: """
- Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take \
- only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'
+ Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'
is to be interpreted as 'ValidationException'.
- For an example service see Amazon Polly.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/",
- },
- appliesTo: "client",
- },
+ For an example service see Amazon Polly."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" }
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorUsingXAmznErrorTypeWithUriAndNamespace",
+ id: "AwsJson10FooErrorUsingXAmznErrorTypeWithUriAndNamespace"
documentation: """
- X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape \
- name. This is a pathalogical case that might not actually happen in any deployed AWS service.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/",
- },
- appliesTo: "client",
- },
+ X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "X-Amzn-Errortype": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" }
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorUsingCode",
+ id: "AwsJson10FooErrorUsingCode"
documentation: """
- This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some \
- services do this though it's preferable to send the X-Amzn-Errortype. Client implementations \
- must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.
+ This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.
- For example service see Amazon S3 Glacier.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ For example service see Amazon S3 Glacier."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "code": "FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorUsingCodeAndNamespace",
+ id: "AwsJson10FooErrorUsingCodeAndNamespace"
documentation: """
- Some services serialize errors using code, and it might contain a namespace. \
- Clients should just take the last part of the string after '#'.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "code": "aws.protocoltests.json10#FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "aws.protocoltests.json10#FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorUsingCodeUriAndNamespace",
+ id: "AwsJson10FooErrorUsingCodeUriAndNamespace"
documentation: """
- Some services serialize errors using code, and it might contain a namespace. It also might \
- contain a URI. Clients should just take the last part of the string after '#' and before ":". \
- This is a pathalogical case that might not occur in any deployed AWS service.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before ":". This is a pathalogical case that might not occur in any deployed AWS service."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "code": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorWithDunderType",
- documentation: "Some services serialize errors using __type.",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ id: "AwsJson10FooErrorWithDunderType"
+ documentation: "Some services serialize errors using __type."
+ protocol: awsJson1_0
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "__type": "FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "__type": "FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorWithDunderTypeAndNamespace",
+ id: "AwsJson10FooErrorWithDunderTypeAndNamespace"
documentation: """
- Some services serialize errors using __type, and it might contain a namespace. \
- Clients should just take the last part of the string after '#'.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "__type": "aws.protocoltests.json10#FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "__type": "aws.protocoltests.json10#FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson10FooErrorWithDunderTypeUriAndNamespace",
+ id: "AwsJson10FooErrorWithDunderTypeUriAndNamespace"
documentation: """
- Some services serialize errors using __type, and it might contain a namespace. It also might \
- contain a URI. Clients should just take the last part of the string after '#' and before ":". \
- This is a pathalogical case that might not occur in any deployed AWS service.""",
- protocol: awsJson1_0,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before ":". This is a pathalogical case that might not occur in any deployed AWS service."""
+ protocol: awsJson1_0
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
- {
- "__type": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
+ {
+ "__type": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/json-structs.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/json-structs.smithy
index 9cc9ae2cd26..9f79b19c539 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/json-structs.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/json-structs.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize structures.
-
$version: "2.0"
namespace aws.protocoltests.json10
@@ -10,144 +9,111 @@ use smithy.test#httpResponseTests
apply SimpleScalarProperties @httpRequestTests([
{
- id: "AwsJson10SupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/",
+ id: "AwsJson10SupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"floatValue": "NaN",
"doubleValue": "NaN"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.SimpleScalarProperties",
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.SimpleScalarProperties" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "AwsJson10SupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/",
+ id: "AwsJson10SupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"floatValue": "Infinity",
"doubleValue": "Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.SimpleScalarProperties",
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.SimpleScalarProperties" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "AwsJson10SupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: awsJson1_0,
- method: "POST",
- uri: "/",
+ id: "AwsJson10SupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"floatValue": "-Infinity",
"doubleValue": "-Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.SimpleScalarProperties",
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.SimpleScalarProperties" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
apply SimpleScalarProperties @httpResponseTests([
{
- id: "AwsJson10SupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10SupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: awsJson1_0
+ code: 200
body: """
{
"floatValue": "NaN",
"doubleValue": "NaN"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "AwsJson10SupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10SupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: awsJson1_0
+ code: 200
body: """
{
"floatValue": "Infinity",
"doubleValue": "Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "AwsJson10SupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10SupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: awsJson1_0
+ code: 200
body: """
{
"floatValue": "-Infinity",
"doubleValue": "-Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
// This example serializes simple scalar types in the top level JSON document.
operation SimpleScalarProperties {
- input: SimpleScalarPropertiesInput,
+ input: SimpleScalarPropertiesInput
output: SimpleScalarPropertiesOutput
}
@input
structure SimpleScalarPropertiesInput {
- floatValue: Float,
- doubleValue: Double,
+ floatValue: Float
+ doubleValue: Double
}
@output
structure SimpleScalarPropertiesOutput {
- floatValue: Float,
- doubleValue: Double,
+ floatValue: Float
+ doubleValue: Double
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/main.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/main.smithy
index 091a5c93bfc..a16026c95f6 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/main.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/main.smithy
@@ -5,38 +5,31 @@ namespace aws.protocoltests.json10
use aws.api#service
use aws.auth#sigv4
use aws.protocols#awsJson1_0
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
@service(sdkId: "JSON RPC 10")
@sigv4(name: "jsonrpc10")
@awsJson1_0
@title("Sample Json 1.0 Protocol Service")
service JsonRpc10 {
- version: "2020-07-14",
+ version: "2020-07-14"
operations: [
// Basic input and output tests
- NoInputAndNoOutput,
- NoInputAndOutput,
- EmptyInputAndEmptyOutput,
- SimpleScalarProperties,
-
+ NoInputAndNoOutput
+ NoInputAndOutput
+ EmptyInputAndEmptyOutput
+ SimpleScalarProperties
// Errors
- GreetingWithErrors,
- JsonUnions,
-
+ GreetingWithErrors
+ JsonUnions
// @endpoint and @hostLabel trait tests
- EndpointOperation,
- EndpointWithHostLabelOperation,
-
+ EndpointOperation
+ EndpointWithHostLabelOperation
// custom endpoints with paths
- HostWithPathOperation,
-
+ HostWithPathOperation
// requestCompression trait tests
- PutWithContentEncoding,
-
- OperationWithDefaults,
- OperationWithRequiredMembers,
+ PutWithContentEncoding
+ OperationWithDefaults
+ OperationWithRequiredMembers
OperationWithNestedStructure
]
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/nestedDefaults.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/nestedDefaults.smithy
index d31c7ba9ba4..95cf32cb7da 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/nestedDefaults.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/nestedDefaults.smithy
@@ -16,7 +16,7 @@ apply OperationWithNestedStructure @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"topLevel": {
@@ -63,36 +63,28 @@ apply OperationWithNestedStructure @httpRequestTests([
}
}"""
params: {
- "topLevel": {
- "dialog": {
- "language": "en"
- },
- "dialogList": [
- {
- },
+ topLevel: {
+ dialog: { language: "en" }
+ dialogList: [
+ {}
{
- "farewell": {}
- },
+ farewell: {}
+ }
{
- "language": "it",
- "greeting": "ciao",
- "farewell": {
- "phrase": "arrivederci"
- }
+ language: "it"
+ greeting: "ciao"
+ farewell: { phrase: "arrivederci" }
}
- ],
- "dialogMap": {
- "emptyDialog": {
- },
- "partialEmptyDialog": {
- "language": "en",
- "farewell": {}
- },
- "nonEmptyDialog": {
- "greeting": "konnichiwa",
- "farewell": {
- "phrase": "sayonara"
- }
+ ]
+ dialogMap: {
+ emptyDialog: {}
+ partialEmptyDialog: {
+ language: "en"
+ farewell: {}
+ }
+ nonEmptyDialog: {
+ greeting: "konnichiwa"
+ farewell: { phrase: "sayonara" }
}
}
}
@@ -107,7 +99,7 @@ apply OperationWithNestedStructure @httpRequestTests([
method: "POST"
bodyMediaType: "application/json"
uri: "/"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"topLevel": {
@@ -145,45 +137,32 @@ apply OperationWithNestedStructure @httpRequestTests([
}
}"""
params: {
- "topLevel": {
- "dialog": {
- "language": "en"
- "greeting": "hi",
- }
- "dialogList": [
+ topLevel: {
+ dialog: { language: "en", greeting: "hi" }
+ dialogList: [
{
- "greeting": "hi",
- },
+ greeting: "hi"
+ }
{
- "greeting": "hi",
- "farewell": {
- "phrase": "bye",
- }
- },
+ greeting: "hi"
+ farewell: { phrase: "bye" }
+ }
{
- "language": "it",
- "greeting": "ciao",
- "farewell": {
- "phrase": "arrivederci"
- }
+ language: "it"
+ greeting: "ciao"
+ farewell: { phrase: "arrivederci" }
}
- ],
- "dialogMap": {
- "emptyDialog": {
- "greeting": "hi",
- },
- "partialEmptyDialog": {
- "language": "en",
- "greeting": "hi",
- "farewell": {
- "phrase": "bye",
- }
- },
- "nonEmptyDialog": {
- "greeting": "konnichiwa",
- "farewell": {
- "phrase": "sayonara"
- }
+ ]
+ dialogMap: {
+ emptyDialog: { greeting: "hi" }
+ partialEmptyDialog: {
+ language: "en"
+ greeting: "hi"
+ farewell: { phrase: "bye" }
+ }
+ nonEmptyDialog: {
+ greeting: "konnichiwa"
+ farewell: { phrase: "sayonara" }
}
}
}
@@ -200,7 +179,7 @@ apply OperationWithNestedStructure @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"dialog": {
@@ -236,44 +215,31 @@ apply OperationWithNestedStructure @httpResponseTests([
}
}"""
params: {
- "dialog": {
- "language": "en"
- "greeting": "hi",
- }
- "dialogList": [
+ dialog: { language: "en", greeting: "hi" }
+ dialogList: [
{
- "greeting": "hi",
- },
+ greeting: "hi"
+ }
{
- "greeting": "hi",
- "farewell": {
- "phrase": "bye",
- }
- },
+ greeting: "hi"
+ farewell: { phrase: "bye" }
+ }
{
- "language": "it",
- "greeting": "ciao",
- "farewell": {
- "phrase": "arrivederci"
- }
+ language: "it"
+ greeting: "ciao"
+ farewell: { phrase: "arrivederci" }
}
- ],
- "dialogMap": {
- "emptyDialog": {
- "greeting": "hi",
- },
- "partialEmptyDialog": {
- "language": "en",
- "greeting": "hi",
- "farewell": {
- "phrase": "bye",
- }
- },
- "nonEmptyDialog": {
- "greeting": "konnichiwa",
- "farewell": {
- "phrase": "sayonara"
- }
+ ]
+ dialogMap: {
+ emptyDialog: { greeting: "hi" }
+ partialEmptyDialog: {
+ language: "en"
+ greeting: "hi"
+ farewell: { phrase: "bye" }
+ }
+ nonEmptyDialog: {
+ greeting: "konnichiwa"
+ farewell: { phrase: "sayonara" }
}
}
}
@@ -286,7 +252,7 @@ apply OperationWithNestedStructure @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: """
{
"dialog": {
@@ -331,35 +297,27 @@ apply OperationWithNestedStructure @httpResponseTests([
}
}"""
params: {
- "dialog": {
- "language": "en"
- },
- "dialogList": [
- {
- },
+ dialog: { language: "en" }
+ dialogList: [
+ {}
{
- "farewell": {}
- },
+ farewell: {}
+ }
{
- "language": "it",
- "greeting": "ciao",
- "farewell": {
- "phrase": "arrivederci"
- }
+ language: "it"
+ greeting: "ciao"
+ farewell: { phrase: "arrivederci" }
}
- ],
- "dialogMap": {
- "emptyDialog": {
- },
- "partialEmptyDialog": {
- "language": "en",
- "farewell": {}
- },
- "nonEmptyDialog": {
- "greeting": "konnichiwa",
- "farewell": {
- "phrase": "sayonara"
- }
+ ]
+ dialogMap: {
+ emptyDialog: {}
+ partialEmptyDialog: {
+ language: "en"
+ farewell: {}
+ }
+ nonEmptyDialog: {
+ greeting: "konnichiwa"
+ farewell: { phrase: "sayonara" }
}
}
}
@@ -372,19 +330,18 @@ operation OperationWithNestedStructure {
topLevel: TopLevel
}
- output := with [NestedDefaultsMixin] {
- }
+ output := with [NestedDefaultsMixin] {}
}
-structure TopLevel with [NestedDefaultsMixin] {
-
-}
+structure TopLevel with [NestedDefaultsMixin] {}
@mixin
structure NestedDefaultsMixin {
@required
dialog: Dialog
+
dialogList: DialogList = []
+
dialogMap: DialogMap = {}
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/requestCompression.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/requestCompression.smithy
index e449e845679..82b796fcca1 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/requestCompression.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/requestCompression.smithy
@@ -4,7 +4,6 @@ namespace aws.protocoltests.json10
use aws.protocols#awsJson1_0
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
@@ -12,289 +11,285 @@ apply PutWithContentEncoding @httpRequestTests([
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: awsJson1_0
params: {
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi
- gIXDWTMUr4Pg3f2LdYCM01eA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UEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
{
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0"
documentation: """
- Compression algorithm encoding is appended to the Content-Encoding header, and the
- user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
- traits are ignored in the awsJson1_0 protocol.
- """
+ Compression algorithm encoding is appended to the Content-Encoding header, and the
+ user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
+ traits are ignored in the awsJson1_0 protocol.
+ """
protocol: awsJson1_0
params: {
- "encoding": "custom"
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi
- gIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozy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n
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/required.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/required.smithy
index 036bf45e979..a3cadfe1e2b 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/required.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/required.smithy
@@ -14,7 +14,7 @@ apply OperationWithRequiredMembers @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: "{}"
params: {
requiredString: ""
@@ -34,8 +34,7 @@ apply OperationWithRequiredMembers @httpResponseTests([
])
operation OperationWithRequiredMembers {
- output := with [RequiredMembersMixin] {
- }
+ output := with [RequiredMembersMixin] {}
}
apply OperationWithRequiredMembersWithDefaults @httpResponseTests([
@@ -47,7 +46,7 @@ apply OperationWithRequiredMembersWithDefaults @httpResponseTests([
protocol: awsJson1_0
code: 200
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.0"}
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
body: "{}"
params: {
requiredString: "hi"
@@ -69,8 +68,7 @@ apply OperationWithRequiredMembersWithDefaults @httpResponseTests([
])
operation OperationWithRequiredMembersWithDefaults {
- output := with [RequiredMembersWithDefaultsMixin] {
- }
+ output := with [RequiredMembersWithDefaultsMixin] {}
}
@mixin
diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/unions.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/unions.smithy
index c5718bd734f..7b0f219fc51 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_0/unions.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_0/unions.smithy
@@ -1,24 +1,22 @@
// This file defines test cases that serialize unions.
-
$version: "2.0"
namespace aws.protocoltests.json10
use aws.protocols#awsJson1_0
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-use aws.protocoltests.shared#StringList
-use aws.protocoltests.shared#StringMap
-use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#FooEnum
+use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#IntegerEnum
-
+use aws.protocoltests.shared#StringList
+use aws.protocoltests.shared#StringMap
+use smithy.test#httpRequestTests
+use smithy.test#httpResponseTests
/// This operation uses unions for inputs and outputs.
@idempotent
operation JsonUnions {
- input: JsonUnionsInput,
- output: JsonUnionsOutput,
+ input: JsonUnionsInput
+ output: JsonUnionsOutput
}
@input
@@ -33,209 +31,171 @@ structure JsonUnionsOutput {
/// A union with a representative set of types for members.
union MyUnion {
- stringValue: String,
- booleanValue: Boolean,
- numberValue: Integer,
- blobValue: Blob,
- timestampValue: Timestamp,
- enumValue: FooEnum,
- intEnumValue: IntegerEnum,
- listValue: StringList,
- mapValue: StringMap,
- structureValue: GreetingStruct,
+ stringValue: String
+ booleanValue: Boolean
+ numberValue: Integer
+ blobValue: Blob
+ timestampValue: Timestamp
+ enumValue: FooEnum
+ intEnumValue: IntegerEnum
+ listValue: StringList
+ mapValue: StringMap
+ structureValue: GreetingStruct
}
apply JsonUnions @httpRequestTests([
{
- id: "AwsJson10SerializeStringUnionValue",
- documentation: "Serializes a string union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeStringUnionValue"
+ documentation: "Serializes a string union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"stringValue": "foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- stringValue: "foo"
- }
+ contents: { stringValue: "foo" }
}
- },
+ }
{
- id: "AwsJson10SerializeBooleanUnionValue",
- documentation: "Serializes a boolean union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeBooleanUnionValue"
+ documentation: "Serializes a boolean union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"booleanValue": true
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- booleanValue: true
- }
+ contents: { booleanValue: true }
}
- },
+ }
{
- id: "AwsJson10SerializeNumberUnionValue",
- documentation: "Serializes a number union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeNumberUnionValue"
+ documentation: "Serializes a number union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"numberValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- numberValue: 1
- }
+ contents: { numberValue: 1 }
}
- },
+ }
{
- id: "AwsJson10SerializeBlobUnionValue",
- documentation: "Serializes a blob union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeBlobUnionValue"
+ documentation: "Serializes a blob union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"blobValue": "Zm9v"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- blobValue: "foo"
- }
+ contents: { blobValue: "foo" }
}
- },
+ }
{
- id: "AwsJson10SerializeTimestampUnionValue",
- documentation: "Serializes a timestamp union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeTimestampUnionValue"
+ documentation: "Serializes a timestamp union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"timestampValue": 1398796238
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- timestampValue: 1398796238
- }
+ contents: { timestampValue: 1398796238 }
}
- },
+ }
{
- id: "AwsJson10SerializeEnumUnionValue",
- documentation: "Serializes an enum union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeEnumUnionValue"
+ documentation: "Serializes an enum union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"enumValue": "Foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- enumValue: "Foo"
- }
+ contents: { enumValue: "Foo" }
}
- },
+ }
{
- id: "AwsJson10SerializeIntEnumUnionValue",
- documentation: "Serializes an intEnum union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeIntEnumUnionValue"
+ documentation: "Serializes an intEnum union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"intEnumValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
- contents: {
- intEnumValue: 1
- }
+ contents: { intEnumValue: 1 }
}
- },
+ }
{
- id: "AwsJson10SerializeListUnionValue",
- documentation: "Serializes a list union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeListUnionValue"
+ documentation: "Serializes a list union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"listValue": ["foo", "bar"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
contents: {
listValue: ["foo", "bar"]
}
}
- },
+ }
{
- id: "AwsJson10SerializeMapUnionValue",
- documentation: "Serializes a map union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeMapUnionValue"
+ documentation: "Serializes a map union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
@@ -244,27 +204,21 @@ apply JsonUnions @httpRequestTests([
"spam": "eggs"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
contents: {
- mapValue: {
- foo: "bar",
- spam: "eggs",
- }
+ mapValue: { foo: "bar", spam: "eggs" }
}
}
- },
+ }
{
- id: "AwsJson10SerializeStructureUnionValue",
- documentation: "Serializes a structure union value",
- protocol: awsJson1_0,
- method: "POST",
- "uri": "/",
+ id: "AwsJson10SerializeStructureUnionValue"
+ documentation: "Serializes a structure union value"
+ protocol: awsJson1_0
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
@@ -272,196 +226,161 @@ apply JsonUnions @httpRequestTests([
"hi": "hello"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- "X-Amz-Target": "JsonRpc10.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0", "X-Amz-Target": "JsonRpc10.JsonUnions" }
params: {
contents: {
- structureValue: {
- hi: "hello",
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
])
apply JsonUnions @httpResponseTests([
{
- id: "AwsJson10DeserializeStringUnionValue",
- documentation: "Deserializes a string union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeStringUnionValue"
+ documentation: "Deserializes a string union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"stringValue": "foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- stringValue: "foo"
- }
+ contents: { stringValue: "foo" }
}
- },
+ }
{
- id: "AwsJson10DeserializeBooleanUnionValue",
- documentation: "Deserializes a boolean union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeBooleanUnionValue"
+ documentation: "Deserializes a boolean union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"booleanValue": true
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- booleanValue: true
- }
+ contents: { booleanValue: true }
}
- },
+ }
{
- id: "AwsJson10DeserializeNumberUnionValue",
- documentation: "Deserializes a number union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeNumberUnionValue"
+ documentation: "Deserializes a number union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"numberValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- numberValue: 1
- }
+ contents: { numberValue: 1 }
}
- },
+ }
{
- id: "AwsJson10DeserializeBlobUnionValue",
- documentation: "Deserializes a blob union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeBlobUnionValue"
+ documentation: "Deserializes a blob union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"blobValue": "Zm9v"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- blobValue: "foo"
- }
+ contents: { blobValue: "foo" }
}
- },
+ }
{
- id: "AwsJson10DeserializeTimestampUnionValue",
- documentation: "Deserializes a timestamp union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeTimestampUnionValue"
+ documentation: "Deserializes a timestamp union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"timestampValue": 1398796238
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- timestampValue: 1398796238
- }
+ contents: { timestampValue: 1398796238 }
}
- },
+ }
{
- id: "AwsJson10DeserializeEnumUnionValue",
- documentation: "Deserializes an enum union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeEnumUnionValue"
+ documentation: "Deserializes an enum union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"enumValue": "Foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- enumValue: "Foo"
- }
+ contents: { enumValue: "Foo" }
}
- },
+ }
{
- id: "AwsJson10DeserializeIntEnumUnionValue",
- documentation: "Deserializes an intEnum union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeIntEnumUnionValue"
+ documentation: "Deserializes an intEnum union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"intEnumValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
- contents: {
- intEnumValue: 1
- }
+ contents: { intEnumValue: 1 }
}
- },
+ }
{
- id: "AwsJson10DeserializeListUnionValue",
- documentation: "Deserializes a list union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeListUnionValue"
+ documentation: "Deserializes a list union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
"listValue": ["foo", "bar"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
contents: {
listValue: ["foo", "bar"]
}
}
- },
+ }
{
- id: "AwsJson10DeserializeMapUnionValue",
- documentation: "Deserializes a map union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeMapUnionValue"
+ documentation: "Deserializes a map union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
@@ -470,25 +389,20 @@ apply JsonUnions @httpResponseTests([
"spam": "eggs"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
contents: {
- mapValue: {
- foo: "bar",
- spam: "eggs",
- }
+ mapValue: { foo: "bar", spam: "eggs" }
}
}
- },
+ }
{
- id: "AwsJson10DeserializeStructureUnionValue",
- documentation: "Deserializes a structure union value",
- protocol: awsJson1_0,
- code: 200,
+ id: "AwsJson10DeserializeStructureUnionValue"
+ documentation: "Deserializes a structure union value"
+ protocol: awsJson1_0
+ code: 200
body: """
{
"contents": {
@@ -496,19 +410,15 @@ apply JsonUnions @httpResponseTests([
"hi": "hello"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.0",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
contents: {
- structureValue: {
- hi: "hello",
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
{
id: "AwsJson10DeserializeIgnoreType"
appliesTo: "client"
@@ -525,17 +435,13 @@ apply JsonUnions @httpResponseTests([
}
}"""
bodyMediaType: "application/json"
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
contents: {
- structureValue: {
- hi: "hello"
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
{
id: "AwsJson10DeserializeAllowNulls"
appliesTo: "client"
@@ -560,14 +466,10 @@ apply JsonUnions @httpResponseTests([
}
}"""
bodyMediaType: "application/json"
- headers: {
- "Content-Type": "application/x-amz-json-1.0"
- },
+ headers: { "Content-Type": "application/x-amz-json-1.0" }
params: {
contents: {
- structureValue: {
- hi: "hello"
- }
+ structureValue: { hi: "hello" }
}
}
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/datetime-offsets.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/datetime-offsets.smithy
index 61018d5c166..c3a1cc93297 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/datetime-offsets.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/datetime-offsets.smithy
@@ -15,43 +15,37 @@ operation DatetimeOffsets {
apply DatetimeOffsets @httpResponseTests([
{
- id: "AwsJson11DateTimeWithNegativeOffset",
+ id: "AwsJson11DateTimeWithNegativeOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: awsJson1_1,
- code: 200,
- body:
- """
- {
- "datetime": "2019-12-16T22:48:18-01:00"
- }
- """,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: awsJson1_1
+ code: 200
+ body: """
+ {
+ "datetime": "2019-12-16T22:48:18-01:00"
+ }
+ """
params: { datetime: 1576540098 }
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
appliesTo: "client"
- },
+ }
{
- id: "AwsJson11DateTimeWithPositiveOffset",
+ id: "AwsJson11DateTimeWithPositiveOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: awsJson1_1,
- code: 200,
- body:
- """
- {
- "datetime": "2019-12-17T00:48:18+01:00"
- }
- """,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: awsJson1_1
+ code: 200
+ body: """
+ {
+ "datetime": "2019-12-17T00:48:18+01:00"
+ }
+ """
params: { datetime: 1576540098 }
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
appliesTo: "client"
- },
+ }
])
structure DatetimeOffsetsOutput {
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/documents.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/documents.smithy
index d380308423a..8ee66bae8f1 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/documents.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/documents.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize inline documents.
-
$version: "2.0"
namespace aws.protocoltests.json
@@ -10,7 +9,7 @@ use smithy.test#httpResponseTests
/// This example serializes an inline document as part of the payload.
operation PutAndGetInlineDocuments {
- input: PutAndGetInlineDocumentsInputOutput,
+ input: PutAndGetInlineDocumentsInputOutput
output: PutAndGetInlineDocumentsInputOutput
}
@@ -22,47 +21,38 @@ document Document
apply PutAndGetInlineDocuments @httpRequestTests([
{
- id: "PutAndGetInlineDocumentsInput",
- documentation: "Serializes inline documents in a JSON request.",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
+ id: "PutAndGetInlineDocumentsInput"
+ documentation: "Serializes inline documents in a JSON request."
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
- {
- "inlineDocument": {"foo": "bar"}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.PutAndGetInlineDocuments",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ {
+ "inlineDocument": {"foo": "bar"}
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.PutAndGetInlineDocuments" }
+ requireHeaders: ["Content-Length"]
params: {
- inlineDocument: {
- foo: "bar"
- }
+ inlineDocument: { foo: "bar" }
}
}
])
apply PutAndGetInlineDocuments @httpResponseTests([
{
- id: "PutAndGetInlineDocumentsInput",
- documentation: "Serializes inline documents in a JSON response.",
- protocol: awsJson1_1,
- code: 200,
+ id: "PutAndGetInlineDocumentsInput"
+ documentation: "Serializes inline documents in a JSON response."
+ protocol: awsJson1_1
+ code: 200
body: """
{
"inlineDocument": {"foo": "bar"}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- inlineDocument: {
- foo: "bar"
- }
+ inlineDocument: { foo: "bar" }
}
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/empty-operation.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/empty-operation.smithy
index c6263d78d67..e62164a8743 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/empty-operation.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/empty-operation.smithy
@@ -8,118 +8,100 @@ use smithy.test#httpResponseTests
@httpRequestTests([
{
- id: "sends_requests_to_slash",
- protocol: awsJson1_1,
- documentation: "Sends requests to /",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.EmptyOperation",
- },
- method: "POST",
- uri: "/",
- },
+ id: "sends_requests_to_slash"
+ protocol: awsJson1_1
+ documentation: "Sends requests to /"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.EmptyOperation" }
+ method: "POST"
+ uri: "/"
+ }
{
- id: "includes_x_amz_target_and_content_type",
- protocol: awsJson1_1,
- documentation: "Includes X-Amz-Target header and Content-Type",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.EmptyOperation",
- },
- method: "POST",
- uri: "/",
- },
+ id: "includes_x_amz_target_and_content_type"
+ protocol: awsJson1_1
+ documentation: "Includes X-Amz-Target header and Content-Type"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.EmptyOperation" }
+ method: "POST"
+ uri: "/"
+ }
{
- id: "json_1_1_client_sends_empty_payload_for_no_input_shape",
- protocol: awsJson1_1,
+ id: "json_1_1_client_sends_empty_payload_for_no_input_shape"
+ protocol: awsJson1_1
documentation: """
- Clients must always send an empty JSON object payload for
- operations with no input (that is, `{}`). While AWS service
- implementations support requests with no payload or requests
- that send `{}`, always sending `{}` from the client is
- preferred for forward compatibility in case input is ever
- added to an operation.""",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.EmptyOperation",
- },
- method: "POST",
+ Clients must always send an empty JSON object payload for
+ operations with no input (that is, `{}`). While AWS service
+ implementations support requests with no payload or requests
+ that send `{}`, always sending `{}` from the client is
+ preferred for forward compatibility in case input is ever
+ added to an operation."""
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.EmptyOperation" }
+ method: "POST"
uri: "/"
- },
+ }
{
- id: "json_1_1_service_supports_empty_payload_for_no_input_shape",
- protocol: awsJson1_1,
+ id: "json_1_1_service_supports_empty_payload_for_no_input_shape"
+ protocol: awsJson1_1
documentation: """
- Service implementations must support no payload or an empty
- object payload for operations that define no input. However,
- despite the lack of a payload, a Content-Type header is still
- required in order for the service to properly detect the
- protocol.""",
- body: "",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.EmptyOperation",
- },
- method: "POST",
- uri: "/",
+ Service implementations must support no payload or an empty
+ object payload for operations that define no input. However,
+ despite the lack of a payload, a Content-Type header is still
+ required in order for the service to properly detect the
+ protocol."""
+ body: ""
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.EmptyOperation" }
+ method: "POST"
+ uri: "/"
// Client implementations must ignore this test.
appliesTo: "server"
- },
+ }
])
@httpResponseTests([
{
- id: "handles_empty_output_shape",
- protocol: awsJson1_1,
+ id: "handles_empty_output_shape"
+ protocol: awsJson1_1
documentation: """
- When no output is defined, the service is expected to return
- an empty payload, however, client must ignore a JSON payload
- if one is returned. This ensures that if output is added later,
- then it will not break the client.""",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- },
- code: 200,
+ When no output is defined, the service is expected to return
+ an empty payload, however, client must ignore a JSON payload
+ if one is returned. This ensures that if output is added later,
+ then it will not break the client."""
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ code: 200
// Service implementations must ignore this test.
appliesTo: "client"
- },
+ }
{
- id: "handles_unexpected_json_output",
- protocol: awsJson1_1,
+ id: "handles_unexpected_json_output"
+ protocol: awsJson1_1
documentation: """
- This client-only test builds on handles_empty_output_shape,
- by including unexpected fields in the JSON. A client
- needs to ignore JSON output that is empty or that contains
- JSON object data.""",
+ This client-only test builds on handles_empty_output_shape,
+ by including unexpected fields in the JSON. A client
+ needs to ignore JSON output that is empty or that contains
+ JSON object data."""
body: """
{
"foo": true
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- },
- code: 200,
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ code: 200
// Service implementations must ignore this test.
appliesTo: "client"
- },
+ }
{
- id: "json_1_1_service_responds_with_no_payload",
- protocol: awsJson1_1,
+ id: "json_1_1_service_responds_with_no_payload"
+ protocol: awsJson1_1
documentation: """
- When no output is defined, the service is expected to return
- an empty payload. Despite the lack of a payload, the service
- is expected to always send a Content-Type header. Clients must
- handle cases where a service returns a JSON object and where
- a service returns no JSON at all.""",
- body: "",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- },
+ When no output is defined, the service is expected to return
+ an empty payload. Despite the lack of a payload, the service
+ is expected to always send a Content-Type header. Clients must
+ handle cases where a service returns a JSON object and where
+ a service returns no JSON at all."""
+ body: ""
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
code: 200
- },
+ }
])
operation EmptyOperation {}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/endpoint-paths.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/endpoint-paths.smithy
index 7b44b7f27df..184c515411d 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/endpoint-paths.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/endpoint-paths.smithy
@@ -1,5 +1,4 @@
// This file defines tests to ensure that implementations support endpoints with paths
-
$version: "2.0"
namespace aws.protocoltests.json
@@ -9,20 +8,16 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "AwsJson11HostWithPath",
+ id: "AwsJson11HostWithPath"
documentation: """
- Custom endpoints supplied by users can have paths""",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/custom/",
- body: "{}",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.HostWithPathOperation",
- },
- host: "example.com/custom",
+ Custom endpoints supplied by users can have paths"""
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/custom/"
+ body: "{}"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.HostWithPathOperation" }
+ host: "example.com/custom"
appliesTo: "client"
}
])
-
operation HostWithPathOperation {}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/endpoints.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/endpoints.smithy
index 7225ffb63bd..6f97b88d66f 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/endpoints.smithy
@@ -1,6 +1,5 @@
// This file defines tests to ensure that implementations support the endpoint
// trait and other features that modify the host.
-
$version: "2.0"
namespace aws.protocoltests.json
@@ -10,56 +9,47 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "AwsJson11EndpointTrait",
+ id: "AwsJson11EndpointTrait"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait.""",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
- body: "{}",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.EndpointOperation",
- },
- host: "example.com",
- resolvedHost: "foo.example.com",
+ Operations can prepend to the given host if they define the
+ endpoint trait."""
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
+ body: "{}"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.EndpointOperation" }
+ host: "example.com"
+ resolvedHost: "foo.example.com"
}
])
@endpoint(hostPrefix: "foo.")
operation EndpointOperation {}
-
@httpRequestTests([
{
- id: "AwsJson11EndpointTraitWithHostLabel",
+ id: "AwsJson11EndpointTraitWithHostLabel"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input.""",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
- body: "{\"label\": \"bar\"}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.EndpointWithHostLabelOperation",
- },
- host: "example.com",
- resolvedHost: "foo.bar.example.com",
- params: {
- label: "bar",
- },
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input."""
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
+ body: "{\"label\": \"bar\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.EndpointWithHostLabelOperation" }
+ host: "example.com"
+ resolvedHost: "foo.bar.example.com"
+ params: { label: "bar" }
}
])
@endpoint(hostPrefix: "foo.{label}.")
operation EndpointWithHostLabelOperation {
- input: HostLabelInput,
+ input: HostLabelInput
}
structure HostLabelInput {
@required
@hostLabel
- label: String,
+ label: String
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/enums.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/enums.smithy
index 29dea059cc8..d4150a2d442 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/enums.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/enums.smithy
@@ -5,214 +5,193 @@ namespace aws.protocoltests.json
use aws.protocols#awsJson1_1
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
-use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#IntegerEnum
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#IntegerEnumSet
use aws.protocoltests.shared#IntegerEnumMap
+use aws.protocoltests.shared#IntegerEnumSet
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
/// This example serializes enums as top level properties, in lists, sets, and maps.
@idempotent
operation JsonEnums {
- input: JsonEnumsInputOutput,
+ input: JsonEnumsInputOutput
output: JsonEnumsInputOutput
}
apply JsonEnums @httpRequestTests([
{
- id: "AwsJson11Enums",
- documentation: "Serializes simple scalar properties",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
+ id: "AwsJson11Enums"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
- {
- "fooEnum1": "Foo",
- "fooEnum2": "0",
- "fooEnum3": "1",
- "fooEnumList": [
- "Foo",
- "0"
- ],
- "fooEnumSet": [
- "Foo",
- "0"
- ],
- "fooEnumMap": {
- "hi": "Foo",
- "zero": "0"
- }
- }""",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonEnums",
- },
- bodyMediaType: "application/json",
+ {
+ "fooEnum1": "Foo",
+ "fooEnum2": "0",
+ "fooEnum3": "1",
+ "fooEnumList": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumSet": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumMap": {
+ "hi": "Foo",
+ "zero": "0"
+ }
+ }"""
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonEnums" }
+ bodyMediaType: "application/json"
params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
apply JsonEnums @httpResponseTests([
{
- id: "AwsJson11Enums",
- documentation: "Serializes simple scalar properties",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11Enums"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsJson1_1
+ code: 200
body: """
- {
- "fooEnum1": "Foo",
- "fooEnum2": "0",
- "fooEnum3": "1",
- "fooEnumList": [
- "Foo",
- "0"
- ],
- "fooEnumSet": [
- "Foo",
- "0"
- ],
- "fooEnumMap": {
- "hi": "Foo",
- "zero": "0"
- }
- }""",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- bodyMediaType: "application/json",
+ {
+ "fooEnum1": "Foo",
+ "fooEnum2": "0",
+ "fooEnum3": "1",
+ "fooEnumList": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumSet": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumMap": {
+ "hi": "Foo",
+ "zero": "0"
+ }
+ }"""
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ bodyMediaType: "application/json"
params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
structure JsonEnumsInputOutput {
- fooEnum1: FooEnum,
- fooEnum2: FooEnum,
- fooEnum3: FooEnum,
- fooEnumList: FooEnumList,
- fooEnumSet: FooEnumSet,
- fooEnumMap: FooEnumMap,
+ fooEnum1: FooEnum
+ fooEnum2: FooEnum
+ fooEnum3: FooEnum
+ fooEnumList: FooEnumList
+ fooEnumSet: FooEnumSet
+ fooEnumMap: FooEnumMap
}
/// This example serializes intEnums as top level properties, in lists, sets, and maps.
@idempotent
operation JsonIntEnums {
- input: JsonIntEnumsInputOutput,
+ input: JsonIntEnumsInputOutput
output: JsonIntEnumsInputOutput
}
apply JsonIntEnums @httpRequestTests([
{
- id: "AwsJson11IntEnums",
- documentation: "Serializes simple scalar properties",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
+ id: "AwsJson11IntEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
- {
- "intEnum1": 1,
- "intEnum2": 2,
- "intEnum3": 3,
- "intEnumList": [
- 1,
- 2
- ],
- "intEnumSet": [
- 1,
- 2
- ],
- "intEnumMap": {
- "a": 1,
- "b": 2
- }
- }""",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonIntEnums",
- },
- bodyMediaType: "application/json",
+ {
+ "intEnum1": 1,
+ "intEnum2": 2,
+ "intEnum3": 3,
+ "intEnumList": [
+ 1,
+ 2
+ ],
+ "intEnumSet": [
+ 1,
+ 2
+ ],
+ "intEnumMap": {
+ "a": 1,
+ "b": 2
+ }
+ }"""
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonIntEnums" }
+ bodyMediaType: "application/json"
params: {
- intEnum1: 1,
- intEnum2: 2,
- intEnum3: 3,
- intEnumList: [1, 2],
- intEnumSet: [1, 2],
- intEnumMap: {
- "a": 1,
- "b": 2
- }
+ intEnum1: 1
+ intEnum2: 2
+ intEnum3: 3
+ intEnumList: [1, 2]
+ intEnumSet: [1, 2]
+ intEnumMap: { a: 1, b: 2 }
}
}
])
apply JsonIntEnums @httpResponseTests([
{
- id: "AwsJson11IntEnums",
- documentation: "Serializes simple scalar properties",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11IntEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsJson1_1
+ code: 200
body: """
- {
- "intEnum1": 1,
- "intEnum2": 2,
- "intEnum3": 3,
- "intEnumList": [
- 1,
- 2
- ],
- "intEnumSet": [
- 1,
- 2
- ],
- "intEnumMap": {
- "a": 1,
- "b": 2
- }
- }""",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonIntEnums",
- },
- bodyMediaType: "application/json",
+ {
+ "intEnum1": 1,
+ "intEnum2": 2,
+ "intEnum3": 3,
+ "intEnumList": [
+ 1,
+ 2
+ ],
+ "intEnumSet": [
+ 1,
+ 2
+ ],
+ "intEnumMap": {
+ "a": 1,
+ "b": 2
+ }
+ }"""
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonIntEnums" }
+ bodyMediaType: "application/json"
params: {
- intEnum1: 1,
- intEnum2: 2,
- intEnum3: 3,
- intEnumList: [1, 2],
- intEnumSet: [1, 2],
- intEnumMap: {
- "a": 1,
- "b": 2
- }
+ intEnum1: 1
+ intEnum2: 2
+ intEnum3: 3
+ intEnumList: [1, 2]
+ intEnumSet: [1, 2]
+ intEnumMap: { a: 1, b: 2 }
}
}
])
structure JsonIntEnumsInputOutput {
- intEnum1: IntegerEnum,
- intEnum2: IntegerEnum,
- intEnum3: IntegerEnum,
- intEnumList: IntegerEnumList,
- intEnumSet: IntegerEnumSet,
- intEnumMap: IntegerEnumMap,
+ intEnum1: IntegerEnum
+ intEnum2: IntegerEnum
+ intEnum3: IntegerEnum
+ intEnumList: IntegerEnumList
+ intEnumSet: IntegerEnumSet
+ intEnumMap: IntegerEnumMap
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/errors.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/errors.smithy
index c57b6fed010..73065b2d91c 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/errors.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/errors.smithy
@@ -1,11 +1,9 @@
// This file defines test cases that test error serialization.
-
$version: "2.0"
namespace aws.protocoltests.json
use aws.protocols#awsJson1_1
-use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
/// This operation has three possible return values:
@@ -18,91 +16,86 @@ use smithy.test#httpResponseTests
/// properly deserialize successful and error responses.
@idempotent
operation GreetingWithErrors {
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError, FooError]
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ FooError
+ ]
}
structure GreetingWithErrorsOutput {
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "AwsJson11InvalidGreetingError",
- documentation: "Parses simple JSON errors",
- protocol: awsJson1_1,
- params: {
- Message: "Hi"
- },
- code: 400,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ id: "AwsJson11InvalidGreetingError"
+ documentation: "Parses simple JSON errors"
+ protocol: awsJson1_1
+ params: { Message: "Hi" }
+ code: 400
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "__type": "InvalidGreeting",
- "Message": "Hi"
- }""",
- bodyMediaType: "application/json",
- },
+ {
+ "__type": "InvalidGreeting",
+ "Message": "Hi"
+ }"""
+ bodyMediaType: "application/json"
+ }
])
/// This error is thrown when a request is invalid.
@error("client")
structure ComplexError {
- TopLevel: String,
- Nested: ComplexNestedErrorData,
+ TopLevel: String
+ Nested: ComplexNestedErrorData
}
structure ComplexNestedErrorData {
- @jsonName("Fooooo") // Even if this trait it present, it does not affect serialization for this protocol
- Foo: String,
+ @jsonName("Fooooo")
+ // Even if this trait it present, it does not affect serialization for this protocol
+ Foo: String
}
apply ComplexError @httpResponseTests([
{
- id: "AwsJson11ComplexError",
- documentation: "Parses a complex error with no message member",
- protocol: awsJson1_1,
+ id: "AwsJson11ComplexError"
+ documentation: "Parses a complex error with no message member"
+ protocol: awsJson1_1
params: {
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 400,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 400
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "__type": "ComplexError",
- "TopLevel": "Top level",
- "Nested": {
- "Foo": "bar"
- }
- }""",
+ {
+ "__type": "ComplexError",
+ "TopLevel": "Top level",
+ "Nested": {
+ "Foo": "bar"
+ }
+ }"""
bodyMediaType: "application/json"
- },
+ }
{
- id: "AwsJson11EmptyComplexError",
- protocol: awsJson1_1,
- code: 400,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ id: "AwsJson11EmptyComplexError"
+ protocol: awsJson1_1
+ code: 400
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "__type": "ComplexError"
- }""",
+ {
+ "__type": "ComplexError"
+ }"""
bodyMediaType: "application/json"
- },
+ }
])
/// This error has test cases that test some of the dark corners of Amazon service
@@ -113,145 +106,117 @@ structure FooError {}
apply FooError @httpResponseTests([
{
- id: "AwsJson11FooErrorUsingXAmznErrorType",
- documentation: "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "FooError",
- },
- appliesTo: "client",
- },
+ id: "AwsJson11FooErrorUsingXAmznErrorType"
+ documentation: "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS."
+ protocol: awsJson1_1
+ code: 500
+ headers: { "X-Amzn-Errortype": "FooError" }
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorUsingXAmznErrorTypeWithUri",
+ id: "AwsJson11FooErrorUsingXAmznErrorTypeWithUri"
documentation: """
- Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take \
- only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'
+ Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'
is to be interpreted as 'ValidationException'.
- For an example service see Amazon Polly.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/",
- },
- appliesTo: "client",
- },
+ For an example service see Amazon Polly."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" }
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorUsingXAmznErrorTypeWithUriAndNamespace",
+ id: "AwsJson11FooErrorUsingXAmznErrorTypeWithUriAndNamespace"
documentation: """
- X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape \
- name. This is a pathalogical case that might not actually happen in any deployed AWS service.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/",
- },
- appliesTo: "client",
- },
+ X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "X-Amzn-Errortype": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" }
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorUsingCode",
+ id: "AwsJson11FooErrorUsingCode"
documentation: """
- This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some \
- services do this though it's preferable to send the X-Amzn-Errortype. Client implementations \
- must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.
+ This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.
- For example service see Amazon S3 Glacier.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ For example service see Amazon S3 Glacier."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "code": "FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorUsingCodeAndNamespace",
+ id: "AwsJson11FooErrorUsingCodeAndNamespace"
documentation: """
- Some services serialize errors using code, and it might contain a namespace. \
- Clients should just take the last part of the string after '#'.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "code": "aws.protocoltests.restjson#FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "aws.protocoltests.restjson#FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorUsingCodeUriAndNamespace",
+ id: "AwsJson11FooErrorUsingCodeUriAndNamespace"
documentation: """
- Some services serialize errors using code, and it might contain a namespace. It also might \
- contain a URI. Clients should just take the last part of the string after '#' and before ":". \
- This is a pathalogical case that might not occur in any deployed AWS service.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before ":". This is a pathalogical case that might not occur in any deployed AWS service."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "code": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorWithDunderType",
- documentation: "Some services serialize errors using __type.",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ id: "AwsJson11FooErrorWithDunderType"
+ documentation: "Some services serialize errors using __type."
+ protocol: awsJson1_1
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "__type": "FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "__type": "FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorWithDunderTypeAndNamespace",
+ id: "AwsJson11FooErrorWithDunderTypeAndNamespace"
documentation: """
- Some services serialize errors using __type, and it might contain a namespace. \
- Clients should just take the last part of the string after '#'.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "__type": "aws.protocoltests.restjson#FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "__type": "aws.protocoltests.restjson#FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "AwsJson11FooErrorWithDunderTypeUriAndNamespace",
+ id: "AwsJson11FooErrorWithDunderTypeUriAndNamespace"
documentation: """
- Some services serialize errors using __type, and it might contain a namespace. It also might \
- contain a URI. Clients should just take the last part of the string after '#' and before ":". \
- This is a pathalogical case that might not occur in any deployed AWS service.""",
- protocol: awsJson1_1,
- code: 500,
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before ":". This is a pathalogical case that might not occur in any deployed AWS service."""
+ protocol: awsJson1_1
+ code: 500
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
body: """
- {
- "__type": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
+ {
+ "__type": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/fractional-seconds.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/fractional-seconds.smithy
index 025e91ecec6..1fcc1758fe1 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/fractional-seconds.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/fractional-seconds.smithy
@@ -14,22 +14,19 @@ operation FractionalSeconds {
apply FractionalSeconds @httpResponseTests([
{
- id: "AwsJson11DateTimeWithFractionalSeconds",
+ id: "AwsJson11DateTimeWithFractionalSeconds"
documentation: """
- Ensures that clients can correctly parse datetime timestamps with fractional seconds""",
- protocol: awsJson1_1,
- code: 200,
- body:
- """
- {
- "datetime": "2000-01-02T20:34:56.123Z"
- }
- """,
+ Ensures that clients can correctly parse datetime timestamps with fractional seconds"""
+ protocol: awsJson1_1
+ code: 200
+ body: """
+ {
+ "datetime": "2000-01-02T20:34:56.123Z"
+ }
+ """
params: { datetime: 946845296.123 }
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- },
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/json-structs.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/json-structs.smithy
index a94b3691b48..3e0f909b783 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/json-structs.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/json-structs.smithy
@@ -1,7 +1,6 @@
// This file defines test cases that serialize structures. Over time this
// will take over much of what is in kitchen-sink as it gets refactored
// to not put everything into such a small number of tests.
-
$version: "2.0"
namespace aws.protocoltests.json
@@ -12,137 +11,104 @@ use smithy.test#httpResponseTests
apply SimpleScalarProperties @httpRequestTests([
{
- id: "AwsJson11SupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
+ id: "AwsJson11SupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"floatValue": "NaN",
"doubleValue": "NaN"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.SimpleScalarProperties",
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "AwsJson11SupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
+ id: "AwsJson11SupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"floatValue": "Infinity",
"doubleValue": "Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.SimpleScalarProperties",
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "AwsJson11SupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
+ id: "AwsJson11SupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"floatValue": "-Infinity",
"doubleValue": "-Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.SimpleScalarProperties",
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
apply SimpleScalarProperties @httpResponseTests([
{
- id: "AwsJson11SupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11SupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: awsJson1_1
+ code: 200
body: """
{
"floatValue": "NaN",
"doubleValue": "NaN"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "AwsJson11SupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11SupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: awsJson1_1
+ code: 200
body: """
{
"floatValue": "Infinity",
"doubleValue": "Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "AwsJson11SupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11SupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: awsJson1_1
+ code: 200
body: """
{
"floatValue": "-Infinity",
"doubleValue": "-Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
// This example serializes simple scalar types in the top level JSON document.
operation SimpleScalarProperties {
- input: SimpleScalarPropertiesInputOutput,
+ input: SimpleScalarPropertiesInputOutput
output: SimpleScalarPropertiesInputOutput
}
structure SimpleScalarPropertiesInputOutput {
- floatValue: Float,
- doubleValue: Double,
+ floatValue: Float
+ doubleValue: Double
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/kitchen-sink.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/kitchen-sink.smithy
index d457adad1ca..46702ba57bd 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/kitchen-sink.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/kitchen-sink.smithy
@@ -8,365 +8,245 @@ use smithy.test#httpResponseTests
@httpRequestTests([
{
- id: "serializes_string_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes string shapes",
- body: "{\"String\":\"abc xyz\"}",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- bodyMediaType: "application/json",
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- String: "abc xyz",
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_string_shapes_with_jsonvalue_trait",
- protocol: awsJson1_1,
- documentation: "Serializes string shapes with jsonvalue trait",
- body: "{\"JsonValue\":\"{\\\"string\\\":\\\"value\\\",\\\"number\\\":1234.5,\\\"boolTrue\\\":true,\\\"boolFalse\\\":false,\\\"array\\\":[1,2,3,4],\\\"object\\\":{\\\"key\\\":\\\"value\\\"},\\\"null\\\":null}\"}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- JsonValue: "{\"string\":\"value\",\"number\":1234.5,\"boolTrue\":true,\"boolFalse\":false,\"array\":[1,2,3,4],\"object\":{\"key\":\"value\"},\"null\":null}",
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_integer_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes integer shapes",
- body: "{\"Integer\":1234}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Integer: 1234,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_long_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes long shapes",
- body: "{\"Long\":999999999999}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Long: 999999999999,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_float_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes float shapes",
- body: "{\"Float\":1234.5}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Float: 1234.5,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_double_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes double shapes",
- body: "{\"Double\":1234.5}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Double: 1234.5,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_blob_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes blob shapes",
- body: "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Blob: "binary-value",
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_boolean_shapes_true",
- protocol: awsJson1_1,
- documentation: "Serializes boolean shapes (true)",
- body: "{\"Boolean\":true}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Boolean: true,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_boolean_shapes_false",
- protocol: awsJson1_1,
- documentation: "Serializes boolean shapes (false)",
- body: "{\"Boolean\":false}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Boolean: false,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_timestamp_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes timestamp shapes",
- body: "{\"Timestamp\":946845296}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Timestamp: 946845296,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_timestamp_shapes_with_iso8601_timestampformat",
- protocol: awsJson1_1,
- documentation: "Serializes timestamp shapes with iso8601 timestampFormat",
- body: "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- Iso8601Timestamp: 946845296,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_timestamp_shapes_with_httpdate_timestampformat",
- protocol: awsJson1_1,
- documentation: "Serializes timestamp shapes with httpdate timestampFormat",
- body: "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- HttpdateTimestamp: 946845296,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_timestamp_shapes_with_unixtimestamp_timestampformat",
- protocol: awsJson1_1,
- documentation: "Serializes timestamp shapes with unixTimestamp timestampFormat",
- body: "{\"UnixTimestamp\":946845296}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- UnixTimestamp: 946845296,
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_list_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes list shapes",
- body: "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- ListOfStrings: [
- "abc",
- "mno",
- "xyz",
- ],
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_empty_list_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes empty list shapes",
- body: "{\"ListOfStrings\":[]}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- ListOfStrings: [],
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_list_of_map_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes list of map shapes",
- body: "{\"ListOfMapsOfStrings\":[{\"foo\":\"bar\"},{\"abc\":\"xyz\"},{\"red\":\"blue\"}]}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "serializes_string_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes string shapes"
+ body: "{\"String\":\"abc xyz\"}"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ bodyMediaType: "application/json"
+ requireHeaders: ["Content-Length"]
+ params: { String: "abc xyz" }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_string_shapes_with_jsonvalue_trait"
+ protocol: awsJson1_1
+ documentation: "Serializes string shapes with jsonvalue trait"
+ body: "{\"JsonValue\":\"{\\\"string\\\":\\\"value\\\",\\\"number\\\":1234.5,\\\"boolTrue\\\":true,\\\"boolFalse\\\":false,\\\"array\\\":[1,2,3,4],\\\"object\\\":{\\\"key\\\":\\\"value\\\"},\\\"null\\\":null}\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { JsonValue: "{\"string\":\"value\",\"number\":1234.5,\"boolTrue\":true,\"boolFalse\":false,\"array\":[1,2,3,4],\"object\":{\"key\":\"value\"},\"null\":null}" }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_integer_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes integer shapes"
+ body: "{\"Integer\":1234}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Integer: 1234 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_long_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes long shapes"
+ body: "{\"Long\":999999999999}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Long: 999999999999 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_float_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes float shapes"
+ body: "{\"Float\":1234.5}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Float: 1234.5 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_double_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes double shapes"
+ body: "{\"Double\":1234.5}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Double: 1234.5 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_blob_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes blob shapes"
+ body: "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Blob: "binary-value" }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_boolean_shapes_true"
+ protocol: awsJson1_1
+ documentation: "Serializes boolean shapes (true)"
+ body: "{\"Boolean\":true}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Boolean: true }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_boolean_shapes_false"
+ protocol: awsJson1_1
+ documentation: "Serializes boolean shapes (false)"
+ body: "{\"Boolean\":false}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Boolean: false }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_timestamp_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes timestamp shapes"
+ body: "{\"Timestamp\":946845296}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Timestamp: 946845296 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_timestamp_shapes_with_iso8601_timestampformat"
+ protocol: awsJson1_1
+ documentation: "Serializes timestamp shapes with iso8601 timestampFormat"
+ body: "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { Iso8601Timestamp: 946845296 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_timestamp_shapes_with_httpdate_timestampformat"
+ protocol: awsJson1_1
+ documentation: "Serializes timestamp shapes with httpdate timestampFormat"
+ body: "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { HttpdateTimestamp: 946845296 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_timestamp_shapes_with_unixtimestamp_timestampformat"
+ protocol: awsJson1_1
+ documentation: "Serializes timestamp shapes with unixTimestamp timestampFormat"
+ body: "{\"UnixTimestamp\":946845296}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: { UnixTimestamp: 946845296 }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_list_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes list shapes"
+ body: "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ ListOfStrings: ["abc", "mno", "xyz"]
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_empty_list_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes empty list shapes"
+ body: "{\"ListOfStrings\":[]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ ListOfStrings: []
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_list_of_map_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes list of map shapes"
+ body: "{\"ListOfMapsOfStrings\":[{\"foo\":\"bar\"},{\"abc\":\"xyz\"},{\"red\":\"blue\"}]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
params: {
ListOfMapsOfStrings: [
{
- foo: "bar",
- },
+ foo: "bar"
+ }
{
- abc: "xyz",
- },
+ abc: "xyz"
+ }
{
- red: "blue",
- },
- ],
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_list_of_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes list of structure shapes",
- body: "{\"ListOfStructs\":[{\"Value\":\"abc\"},{\"Value\":\"mno\"},{\"Value\":\"xyz\"}]}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ red: "blue"
+ }
+ ]
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_list_of_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes list of structure shapes"
+ body: "{\"ListOfStructs\":[{\"Value\":\"abc\"},{\"Value\":\"mno\"},{\"Value\":\"xyz\"}]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
params: {
ListOfStructs: [
{
- Value: "abc",
- },
+ Value: "abc"
+ }
{
- Value: "mno",
- },
+ Value: "mno"
+ }
{
- Value: "xyz",
- },
- ],
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_list_of_recursive_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes list of recursive structure shapes",
- body: "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"Integer\":123}]}]}]}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ Value: "xyz"
+ }
+ ]
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_list_of_recursive_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes list of recursive structure shapes"
+ body: "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"Integer\":123}]}]}]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
params: {
RecursiveList: [
{
@@ -374,487 +254,381 @@ use smithy.test#httpResponseTests
{
RecursiveList: [
{
- Integer: 123,
- },
- ],
- },
- ],
- },
- ],
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_map_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes map shapes",
- body: "{\"MapOfStrings\":{\"abc\":\"xyz\",\"mno\":\"hjk\"}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- MapOfStrings: {
- abc: "xyz",
- mno: "hjk",
- },
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_empty_map_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes empty map shapes",
- body: "{\"MapOfStrings\":{}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- MapOfStrings: {},
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_map_of_list_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes map of list shapes",
- body: "{\"MapOfListsOfStrings\":{\"abc\":[\"abc\",\"xyz\"],\"mno\":[\"xyz\",\"abc\"]}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ Integer: 123
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_map_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes map shapes"
+ body: "{\"MapOfStrings\":{\"abc\":\"xyz\",\"mno\":\"hjk\"}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ MapOfStrings: { abc: "xyz", mno: "hjk" }
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_empty_map_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes empty map shapes"
+ body: "{\"MapOfStrings\":{}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ MapOfStrings: {}
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_map_of_list_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes map of list shapes"
+ body: "{\"MapOfListsOfStrings\":{\"abc\":[\"abc\",\"xyz\"],\"mno\":[\"xyz\",\"abc\"]}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
params: {
MapOfListsOfStrings: {
- abc: [
- "abc",
- "xyz",
- ],
- mno: [
- "xyz",
- "abc",
- ],
- },
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_map_of_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes map of structure shapes",
- body: "{\"MapOfStructs\":{\"key1\":{\"Value\":\"value-1\"},\"key2\":{\"Value\":\"value-2\"}}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ abc: ["abc", "xyz"]
+ mno: ["xyz", "abc"]
+ }
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_map_of_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes map of structure shapes"
+ body: "{\"MapOfStructs\":{\"key1\":{\"Value\":\"value-1\"},\"key2\":{\"Value\":\"value-2\"}}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
params: {
MapOfStructs: {
- key1: {
- Value: "value-1",
- },
- key2: {
- Value: "value-2",
- },
- },
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_map_of_recursive_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes map of recursive structure shapes",
- body: "{\"RecursiveMap\":{\"key1\":{\"RecursiveMap\":{\"key2\":{\"RecursiveMap\":{\"key3\":{\"Boolean\":false}}}}}}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
+ key1: { Value: "value-1" }
+ key2: { Value: "value-2" }
+ }
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_map_of_recursive_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes map of recursive structure shapes"
+ body: "{\"RecursiveMap\":{\"key1\":{\"RecursiveMap\":{\"key2\":{\"RecursiveMap\":{\"key3\":{\"Boolean\":false}}}}}}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
params: {
RecursiveMap: {
key1: {
RecursiveMap: {
key2: {
RecursiveMap: {
- key3: {
- Boolean: false,
- },
- },
- },
- },
- },
- },
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes structure shapes",
- body: "{\"SimpleStruct\":{\"Value\":\"abc\"}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- SimpleStruct: {
- Value: "abc",
- },
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_structure_members_with_locationname_traits",
- protocol: awsJson1_1,
- documentation: "Serializes structure members with locationName traits",
- body: "{\"StructWithJsonName\":{\"Value\":\"some-value\"}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- StructWithJsonName: {
- Value: "some-value",
- },
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_empty_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes empty structure shapes",
- body: "{\"SimpleStruct\":{}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- SimpleStruct: {},
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_structure_which_have_no_members",
- protocol: awsJson1_1,
- documentation: "Serializes structure which have no members",
- body: "{\"EmptyStruct\":{}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- EmptyStruct: {},
- },
- method: "POST",
- uri: "/",
- },
- {
- id: "serializes_recursive_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Serializes recursive structure shapes",
- body: "{\"String\":\"top-value\",\"Boolean\":false,\"RecursiveStruct\":{\"String\":\"nested-value\",\"Boolean\":true,\"RecursiveList\":[{\"String\":\"string-only\"},{\"RecursiveStruct\":{\"MapOfStrings\":{\"color\":\"red\",\"size\":\"large\"}}}]}}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.KitchenSinkOperation",
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- String: "top-value",
- Boolean: false,
+ key3: { Boolean: false }
+ }
+ }
+ }
+ }
+ }
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes structure shapes"
+ body: "{\"SimpleStruct\":{\"Value\":\"abc\"}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ SimpleStruct: { Value: "abc" }
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_structure_members_with_locationname_traits"
+ protocol: awsJson1_1
+ documentation: "Serializes structure members with locationName traits"
+ body: "{\"StructWithJsonName\":{\"Value\":\"some-value\"}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ StructWithJsonName: { Value: "some-value" }
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_empty_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes empty structure shapes"
+ body: "{\"SimpleStruct\":{}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ SimpleStruct: {}
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_structure_which_have_no_members"
+ protocol: awsJson1_1
+ documentation: "Serializes structure which have no members"
+ body: "{\"EmptyStruct\":{}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ EmptyStruct: {}
+ }
+ method: "POST"
+ uri: "/"
+ }
+ {
+ id: "serializes_recursive_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Serializes recursive structure shapes"
+ body: "{\"String\":\"top-value\",\"Boolean\":false,\"RecursiveStruct\":{\"String\":\"nested-value\",\"Boolean\":true,\"RecursiveList\":[{\"String\":\"string-only\"},{\"RecursiveStruct\":{\"MapOfStrings\":{\"color\":\"red\",\"size\":\"large\"}}}]}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" }
+ requireHeaders: ["Content-Length"]
+ params: {
+ String: "top-value"
+ Boolean: false
RecursiveStruct: {
- String: "nested-value",
- Boolean: true,
+ String: "nested-value"
+ Boolean: true
RecursiveList: [
{
- String: "string-only",
- },
+ String: "string-only"
+ }
{
RecursiveStruct: {
- MapOfStrings: {
- color: "red",
- size: "large",
- },
- },
- },
- ],
- },
- },
- method: "POST",
- uri: "/",
- },
+ MapOfStrings: { color: "red", size: "large" }
+ }
+ }
+ ]
+ }
+ }
+ method: "POST"
+ uri: "/"
+ }
])
@httpResponseTests([
{
- id: "parses_operations_with_empty_json_bodies",
- protocol: awsJson1_1,
- documentation: "Parses operations with empty JSON bodies",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- code: 200,
- },
- {
- id: "parses_string_shapes",
- protocol: awsJson1_1,
- documentation: "Parses string shapes",
- body: "{\"String\":\"string-value\"}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- String: "string-value",
- },
- code: 200,
- },
- {
- id: "parses_integer_shapes",
- protocol: awsJson1_1,
- documentation: "Parses integer shapes",
- body: "{\"Integer\":1234}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Integer: 1234,
- },
- code: 200,
- },
- {
- id: "parses_long_shapes",
- protocol: awsJson1_1,
- documentation: "Parses long shapes",
- body: "{\"Long\":1234567890123456789}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Long: 1234567890123456789,
- },
- code: 200,
- },
- {
- id: "parses_float_shapes",
- protocol: awsJson1_1,
- documentation: "Parses float shapes",
- body: "{\"Float\":1234.5}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Float: 1234.5,
- },
- code: 200,
- },
- {
- id: "parses_double_shapes",
- protocol: awsJson1_1,
- documentation: "Parses double shapes",
- body: "{\"Double\":123456789.12345679}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Double: 123456789.12345679,
- },
- code: 200,
- },
- {
- id: "parses_boolean_shapes_true",
- protocol: awsJson1_1,
- documentation: "Parses boolean shapes (true)",
- body: "{\"Boolean\":true}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Boolean: true,
- },
- code: 200,
- },
- {
- id: "parses_boolean_false",
- protocol: awsJson1_1,
- documentation: "Parses boolean (false)",
- body: "{\"Boolean\":false}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Boolean: false,
- },
- code: 200,
- },
- {
- id: "parses_blob_shapes",
- protocol: awsJson1_1,
- documentation: "Parses blob shapes",
- body: "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Blob: "binary-value",
- },
- code: 200,
- },
- {
- id: "parses_timestamp_shapes",
- protocol: awsJson1_1,
- documentation: "Parses timestamp shapes",
- body: "{\"Timestamp\":946845296}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Timestamp: 946845296,
- },
- code: 200,
- },
- {
- id: "parses_iso8601_timestamps",
- protocol: awsJson1_1,
- documentation: "Parses iso8601 timestamps",
- body: "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- Iso8601Timestamp: 946845296,
- },
- code: 200,
- },
- {
- id: "parses_httpdate_timestamps",
- protocol: awsJson1_1,
- documentation: "Parses httpdate timestamps",
- body: "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- HttpdateTimestamp: 946845296,
- },
- code: 200,
- },
- {
- id: "parses_list_shapes",
- protocol: awsJson1_1,
- documentation: "Parses list shapes",
- body: "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- ListOfStrings: [
- "abc",
- "mno",
- "xyz",
- ],
- },
- code: 200,
- },
- {
- id: "parses_list_of_map_shapes",
- protocol: awsJson1_1,
- documentation: "Parses list of map shapes",
- body: "{\"ListOfMapsOfStrings\":[{\"size\":\"large\"},{\"color\":\"red\"}]}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ id: "parses_operations_with_empty_json_bodies"
+ protocol: awsJson1_1
+ documentation: "Parses operations with empty JSON bodies"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ code: 200
+ }
+ {
+ id: "parses_string_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses string shapes"
+ body: "{\"String\":\"string-value\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { String: "string-value" }
+ code: 200
+ }
+ {
+ id: "parses_integer_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses integer shapes"
+ body: "{\"Integer\":1234}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Integer: 1234 }
+ code: 200
+ }
+ {
+ id: "parses_long_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses long shapes"
+ body: "{\"Long\":1234567890123456789}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Long: 1234567890123456789 }
+ code: 200
+ }
+ {
+ id: "parses_float_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses float shapes"
+ body: "{\"Float\":1234.5}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Float: 1234.5 }
+ code: 200
+ }
+ {
+ id: "parses_double_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses double shapes"
+ body: "{\"Double\":123456789.12345679}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Double: 123456789.12345679 }
+ code: 200
+ }
+ {
+ id: "parses_boolean_shapes_true"
+ protocol: awsJson1_1
+ documentation: "Parses boolean shapes (true)"
+ body: "{\"Boolean\":true}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Boolean: true }
+ code: 200
+ }
+ {
+ id: "parses_boolean_false"
+ protocol: awsJson1_1
+ documentation: "Parses boolean (false)"
+ body: "{\"Boolean\":false}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Boolean: false }
+ code: 200
+ }
+ {
+ id: "parses_blob_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses blob shapes"
+ body: "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Blob: "binary-value" }
+ code: 200
+ }
+ {
+ id: "parses_timestamp_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses timestamp shapes"
+ body: "{\"Timestamp\":946845296}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Timestamp: 946845296 }
+ code: 200
+ }
+ {
+ id: "parses_iso8601_timestamps"
+ protocol: awsJson1_1
+ documentation: "Parses iso8601 timestamps"
+ body: "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { Iso8601Timestamp: 946845296 }
+ code: 200
+ }
+ {
+ id: "parses_httpdate_timestamps"
+ protocol: awsJson1_1
+ documentation: "Parses httpdate timestamps"
+ body: "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { HttpdateTimestamp: 946845296 }
+ code: 200
+ }
+ {
+ id: "parses_list_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses list shapes"
+ body: "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: {
+ ListOfStrings: ["abc", "mno", "xyz"]
+ }
+ code: 200
+ }
+ {
+ id: "parses_list_of_map_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses list of map shapes"
+ body: "{\"ListOfMapsOfStrings\":[{\"size\":\"large\"},{\"color\":\"red\"}]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
ListOfMapsOfStrings: [
{
- size: "large",
- },
+ size: "large"
+ }
{
- color: "red",
- },
- ],
- },
- code: 200,
- },
- {
- id: "parses_list_of_list_shapes",
- protocol: awsJson1_1,
- documentation: "Parses list of list shapes",
- body: "{\"ListOfLists\":[[\"abc\",\"mno\",\"xyz\"],[\"hjk\",\"qrs\",\"tuv\"]]}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ color: "red"
+ }
+ ]
+ }
+ code: 200
+ }
+ {
+ id: "parses_list_of_list_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses list of list shapes"
+ body: "{\"ListOfLists\":[[\"abc\",\"mno\",\"xyz\"],[\"hjk\",\"qrs\",\"tuv\"]]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
ListOfLists: [
- [
- "abc",
- "mno",
- "xyz",
- ],
- [
- "hjk",
- "qrs",
- "tuv",
- ],
- ],
- },
- code: 200,
- },
- {
- id: "parses_list_of_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Parses list of structure shapes",
- body: "{\"ListOfStructs\":[{\"Value\":\"value-1\"},{\"Value\":\"value-2\"}]}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ ["abc", "mno", "xyz"]
+ ["hjk", "qrs", "tuv"]
+ ]
+ }
+ code: 200
+ }
+ {
+ id: "parses_list_of_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses list of structure shapes"
+ body: "{\"ListOfStructs\":[{\"Value\":\"value-1\"},{\"Value\":\"value-2\"}]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
ListOfStructs: [
{
- Value: "value-1",
- },
+ Value: "value-1"
+ }
{
- Value: "value-2",
- },
- ],
- },
- code: 200,
- },
- {
- id: "parses_list_of_recursive_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Parses list of recursive structure shapes",
- body: "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"String\":\"value\"}]}]}]}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ Value: "value-2"
+ }
+ ]
+ }
+ code: 200
+ }
+ {
+ id: "parses_list_of_recursive_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses list of recursive structure shapes"
+ body: "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"String\":\"value\"}]}]}]}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
RecursiveList: [
{
@@ -862,190 +636,197 @@ use smithy.test#httpResponseTests
{
RecursiveList: [
{
- String: "value",
- },
- ],
- },
- ],
- },
- ],
- },
- code: 200,
- },
- {
- id: "parses_map_shapes",
- protocol: awsJson1_1,
- documentation: "Parses map shapes",
- body: "{\"MapOfStrings\":{\"size\":\"large\",\"color\":\"red\"}}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- MapOfStrings: {
- size: "large",
- color: "red",
- },
- },
- code: 200,
- },
- {
- id: "parses_map_of_list_shapes",
- protocol: awsJson1_1,
- documentation: "Parses map of list shapes",
- body: "{\"MapOfListsOfStrings\":{\"sizes\":[\"large\",\"small\"],\"colors\":[\"red\",\"green\"]}}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ String: "value"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ code: 200
+ }
+ {
+ id: "parses_map_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses map shapes"
+ body: "{\"MapOfStrings\":{\"size\":\"large\",\"color\":\"red\"}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: {
+ MapOfStrings: { size: "large", color: "red" }
+ }
+ code: 200
+ }
+ {
+ id: "parses_map_of_list_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses map of list shapes"
+ body: "{\"MapOfListsOfStrings\":{\"sizes\":[\"large\",\"small\"],\"colors\":[\"red\",\"green\"]}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
MapOfListsOfStrings: {
- sizes: [
- "large",
- "small",
- ],
- colors: [
- "red",
- "green",
- ],
- },
- },
- code: 200,
- },
- {
- id: "parses_map_of_map_shapes",
- protocol: awsJson1_1,
- documentation: "Parses map of map shapes",
- body: "{\"MapOfMaps\":{\"sizes\":{\"large\":\"L\",\"medium\":\"M\"},\"colors\":{\"red\":\"R\",\"blue\":\"B\"}}}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ sizes: ["large", "small"]
+ colors: ["red", "green"]
+ }
+ }
+ code: 200
+ }
+ {
+ id: "parses_map_of_map_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses map of map shapes"
+ body: "{\"MapOfMaps\":{\"sizes\":{\"large\":\"L\",\"medium\":\"M\"},\"colors\":{\"red\":\"R\",\"blue\":\"B\"}}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
MapOfMaps: {
- sizes: {
- large: "L",
- medium: "M",
- },
- colors: {
- red: "R",
- blue: "B",
- },
- },
- },
- code: 200,
- },
- {
- id: "parses_map_of_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Parses map of structure shapes",
- body: "{\"MapOfStructs\":{\"size\":{\"Value\":\"small\"},\"color\":{\"Value\":\"red\"}}}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ sizes: { large: "L", medium: "M" }
+ colors: { red: "R", blue: "B" }
+ }
+ }
+ code: 200
+ }
+ {
+ id: "parses_map_of_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses map of structure shapes"
+ body: "{\"MapOfStructs\":{\"size\":{\"Value\":\"small\"},\"color\":{\"Value\":\"red\"}}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
MapOfStructs: {
- size: {
- Value: "small",
- },
- color: {
- Value: "red",
- },
- },
- },
- code: 200,
- },
- {
- id: "parses_map_of_recursive_structure_shapes",
- protocol: awsJson1_1,
- documentation: "Parses map of recursive structure shapes",
- body: "{\"RecursiveMap\":{\"key-1\":{\"RecursiveMap\":{\"key-2\":{\"RecursiveMap\":{\"key-3\":{\"String\":\"value\"}}}}}}}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ size: { Value: "small" }
+ color: { Value: "red" }
+ }
+ }
+ code: 200
+ }
+ {
+ id: "parses_map_of_recursive_structure_shapes"
+ protocol: awsJson1_1
+ documentation: "Parses map of recursive structure shapes"
+ body: "{\"RecursiveMap\":{\"key-1\":{\"RecursiveMap\":{\"key-2\":{\"RecursiveMap\":{\"key-3\":{\"String\":\"value\"}}}}}}}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
RecursiveMap: {
"key-1": {
RecursiveMap: {
"key-2": {
RecursiveMap: {
- "key-3": {
- String: "value",
- },
- },
- },
- },
- },
- },
- },
- code: 200,
- },
- {
- id: "parses_the_request_id_from_the_response",
- protocol: awsJson1_1,
- documentation: "Parses the request id from the response",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "X-Amzn-Requestid": "amazon-uniq-request-id",
- "Content-Type": "application/x-amz-json-1.1"
- },
- code: 200,
- },
+ "key-3": { String: "value" }
+ }
+ }
+ }
+ }
+ }
+ }
+ code: 200
+ }
+ {
+ id: "parses_the_request_id_from_the_response"
+ protocol: awsJson1_1
+ documentation: "Parses the request id from the response"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "X-Amzn-Requestid": "amazon-uniq-request-id", "Content-Type": "application/x-amz-json-1.1" }
+ code: 200
+ }
])
operation KitchenSinkOperation {
- input: KitchenSink,
- output: KitchenSink,
+ input: KitchenSink
+ output: KitchenSink
errors: [
- ErrorWithMembers,
- ErrorWithoutMembers,
- ],
+ ErrorWithMembers
+ ErrorWithoutMembers
+ ]
}
@error("client")
structure ErrorWithMembers {
- Code: String,
- ComplexData: KitchenSink,
- IntegerField: Integer,
- ListField: ListOfStrings,
- MapField: MapOfStrings,
- Message: String,
+ Code: String
+
+ ComplexData: KitchenSink
+
+ IntegerField: Integer
+
+ ListField: ListOfStrings
+
+ MapField: MapOfStrings
+
+ Message: String
+
/// abc
- StringField: String,
+ StringField: String
}
@error("server")
structure ErrorWithoutMembers {}
structure KitchenSink {
- Blob: Blob,
- Boolean: Boolean,
- Double: Double,
- EmptyStruct: EmptyStruct,
- Float: Float,
+ Blob: Blob
+
+ Boolean: Boolean
+
+ Double: Double
+
+ EmptyStruct: EmptyStruct
+
+ Float: Float
+
@timestampFormat("http-date")
- HttpdateTimestamp: Timestamp,
- Integer: Integer,
+ HttpdateTimestamp: Timestamp
+
+ Integer: Integer
+
@timestampFormat("date-time")
- Iso8601Timestamp: Timestamp,
- JsonValue: JsonValue,
- ListOfLists: ListOfListOfStrings,
- ListOfMapsOfStrings: ListOfMapsOfStrings,
- ListOfStrings: ListOfStrings,
- ListOfStructs: ListOfStructs,
- Long: Long,
- MapOfListsOfStrings: MapOfListsOfStrings,
- MapOfMaps: MapOfMapOfStrings,
- MapOfStrings: MapOfStrings,
- MapOfStructs: MapOfStructs,
- RecursiveList: ListOfKitchenSinks,
- RecursiveMap: MapOfKitchenSinks,
- RecursiveStruct: KitchenSink,
- SimpleStruct: SimpleStruct,
- String: String,
- StructWithJsonName: StructWithJsonName,
- Timestamp: Timestamp,
+ Iso8601Timestamp: Timestamp
+
+ JsonValue: JsonValue
+
+ ListOfLists: ListOfListOfStrings
+
+ ListOfMapsOfStrings: ListOfMapsOfStrings
+
+ ListOfStrings: ListOfStrings
+
+ ListOfStructs: ListOfStructs
+
+ Long: Long
+
+ MapOfListsOfStrings: MapOfListsOfStrings
+
+ MapOfMaps: MapOfMapOfStrings
+
+ MapOfStrings: MapOfStrings
+
+ MapOfStructs: MapOfStructs
+
+ RecursiveList: ListOfKitchenSinks
+
+ RecursiveMap: MapOfKitchenSinks
+
+ RecursiveStruct: KitchenSink
+
+ SimpleStruct: SimpleStruct
+
+ String: String
+
+ StructWithJsonName: StructWithJsonName
+
+ Timestamp: Timestamp
+
@timestampFormat("epoch-seconds")
- UnixTimestamp: Timestamp,
+ UnixTimestamp: Timestamp
}
list ListOfKitchenSinks {
- member: KitchenSink,
+ member: KitchenSink
}
map MapOfKitchenSinks {
- key: String,
- value: KitchenSink,
+ key: String
+ value: KitchenSink
}
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/main.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/main.smithy
index 9503e7df7ad..86ca8703ea9 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/main.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/main.smithy
@@ -5,93 +5,88 @@ namespace aws.protocoltests.json
use aws.api#service
use aws.auth#sigv4
use aws.protocols#awsJson1_1
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
@service(
- sdkId: "Json Protocol",
- arnNamespace: "jsonprotocol",
- cloudFormationName: "JsonProtocol",
- cloudTrailEventSource: "jsonprotocol.amazonaws.com",
+ sdkId: "Json Protocol"
+ arnNamespace: "jsonprotocol"
+ cloudFormationName: "JsonProtocol"
+ cloudTrailEventSource: "jsonprotocol.amazonaws.com"
)
@sigv4(name: "jsonprotocol")
@awsJson1_1
@title("Sample Json 1.1 Protocol Service")
service JsonProtocol {
- version: "2018-01-01",
+ version: "2018-01-01"
operations: [
- EmptyOperation,
- KitchenSinkOperation,
- SimpleScalarProperties,
- OperationWithOptionalInputOutput,
- PutAndGetInlineDocuments,
- JsonEnums,
- NullOperation,
- SparseNullsOperation,
- GreetingWithErrors,
- JsonUnions,
-
+ EmptyOperation
+ KitchenSinkOperation
+ SimpleScalarProperties
+ OperationWithOptionalInputOutput
+ PutAndGetInlineDocuments
+ JsonEnums
+ NullOperation
+ SparseNullsOperation
+ GreetingWithErrors
+ JsonUnions
// @endpoint and @hostLabel trait tests
- EndpointOperation,
- EndpointWithHostLabelOperation,
-
+ EndpointOperation
+ EndpointWithHostLabelOperation
// custom endpoints with paths
- HostWithPathOperation,
-
+ HostWithPathOperation
// client-only timestamp parsing tests
- DatetimeOffsets,
+ DatetimeOffsets
FractionalSeconds
-
// requestCompression trait tests
PutWithContentEncoding
- ],
+ ]
}
structure EmptyStruct {}
structure SimpleStruct {
- Value: String,
+ Value: String
}
structure StructWithJsonName {
- @jsonName("RenamedMember") // Even if this trait it present, it does not affect serialization for this protocol
- Value: String,
+ @jsonName("RenamedMember")
+ // Even if this trait it present, it does not affect serialization for this protocol
+ Value: String
}
list ListOfListOfStrings {
- member: ListOfStrings,
+ member: ListOfStrings
}
list ListOfMapsOfStrings {
- member: MapOfStrings,
+ member: MapOfStrings
}
list ListOfStrings {
- member: String,
+ member: String
}
list ListOfStructs {
- member: SimpleStruct,
+ member: SimpleStruct
}
map MapOfListsOfStrings {
- key: String,
- value: ListOfStrings,
+ key: String
+ value: ListOfStrings
}
map MapOfMapOfStrings {
- key: String,
- value: MapOfStrings,
+ key: String
+ value: MapOfStrings
}
map MapOfStrings {
- key: String,
- value: String,
+ key: String
+ value: String
}
map MapOfStructs {
- key: String,
- value: SimpleStruct,
+ key: String
+ value: SimpleStruct
}
@mediaType("application/json")
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/null.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/null.smithy
index 308c34dba13..9383fa43133 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/null.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/null.smithy
@@ -5,74 +5,63 @@ namespace aws.protocoltests.json
use aws.protocols#awsJson1_1
use aws.protocoltests.shared#SparseStringList
use aws.protocoltests.shared#SparseStringMap
-use aws.protocoltests.shared#StringMap
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
@httpRequestTests([
{
- id: "AwsJson11StructuresDontSerializeNullValues",
- documentation: "Null structure values are dropped",
- protocol: awsJson1_1,
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.NullOperation",
- },
- params: {
- string: null
- },
- method: "POST",
- uri: "/",
- appliesTo: "client",
- },
+ id: "AwsJson11StructuresDontSerializeNullValues"
+ documentation: "Null structure values are dropped"
+ protocol: awsJson1_1
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.NullOperation" }
+ params: { string: null }
+ method: "POST"
+ uri: "/"
+ appliesTo: "client"
+ }
{
- id: "AwsJson11ServersDontDeserializeNullStructureValues",
- documentation: "Null structure values are dropped",
- protocol: awsJson1_1,
+ id: "AwsJson11ServersDontDeserializeNullStructureValues"
+ documentation: "Null structure values are dropped"
+ protocol: awsJson1_1
body: """
{
"string": null
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.NullOperation",
- },
- params: {},
- method: "POST",
- uri: "/",
- appliesTo: "server",
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.NullOperation" }
+ params: {}
+ method: "POST"
+ uri: "/"
+ appliesTo: "server"
}
])
@httpResponseTests([
{
- id: "AwsJson11StructuresDontDeserializeNullValues",
- documentation: "Null structure values are dropped",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11StructuresDontDeserializeNullValues"
+ documentation: "Null structure values are dropped"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"string": null
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {},
- appliesTo: "client",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: {}
+ appliesTo: "client"
+ }
{
- id: "AwsJson11ServersDontSerializeNullStructureValues",
- documentation: "Null structure values are dropped",
- protocol: awsJson1_1,
- code: 200,
- body: "{}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
- params: {
- string: null
- },
- appliesTo: "server",
+ id: "AwsJson11ServersDontSerializeNullStructureValues"
+ documentation: "Null structure values are dropped"
+ protocol: awsJson1_1
+ code: 200
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
+ params: { string: null }
+ appliesTo: "server"
}
])
operation NullOperation {
@@ -96,18 +85,13 @@ structure NullOperationInputOutput {
}
}"""
bodyMediaType: "application/json"
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- "X-Amz-Target": "JsonProtocol.SparseNullsOperation"
- }
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.SparseNullsOperation" }
params: {
- "sparseStringMap": {
- "foo": null
- }
+ sparseStringMap: { foo: null }
}
method: "POST"
uri: "/"
- },
+ }
{
id: "AwsJson11SparseListsSerializeNull"
documentation: "Serializes null values in lists"
@@ -119,14 +103,9 @@ structure NullOperationInputOutput {
]
}"""
bodyMediaType: "application/json"
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- "X-Amz-Target": "JsonProtocol.SparseNullsOperation"
- }
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.SparseNullsOperation" }
params: {
- "sparseStringList": [
- null
- ]
+ sparseStringList: [null]
}
method: "POST"
uri: "/"
@@ -145,11 +124,9 @@ structure NullOperationInputOutput {
}
}"""
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.1"}
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- "sparseStringMap": {
- "foo": null
- }
+ sparseStringMap: { foo: null }
}
}
{
@@ -164,11 +141,9 @@ structure NullOperationInputOutput {
]
}"""
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/x-amz-json-1.1"}
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- "sparseStringList": [
- null
- ]
+ sparseStringList: [null]
}
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/optional-input-output.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/optional-input-output.smithy
index fa0a402c02d..6f750aa2fe2 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/optional-input-output.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/optional-input-output.smithy
@@ -4,42 +4,33 @@ namespace aws.protocoltests.json
use aws.protocols#awsJson1_1
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
@httpRequestTests([
{
- id: "can_call_operation_with_no_input_or_output",
- protocol: awsJson1_1,
- documentation: "Can call operations with no input or output",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput",
- },
- method: "POST",
- uri: "/",
- },
+ id: "can_call_operation_with_no_input_or_output"
+ protocol: awsJson1_1
+ documentation: "Can call operations with no input or output"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput" }
+ method: "POST"
+ uri: "/"
+ }
{
- id: "can_call_operation_with_optional_input",
- protocol: awsJson1_1,
- documentation: "Can invoke operations with optional input",
- body: "{\"Value\":\"Hi\"}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput",
- },
- params: {
- Value: "Hi",
- },
- method: "POST",
- uri: "/",
- },
+ id: "can_call_operation_with_optional_input"
+ protocol: awsJson1_1
+ documentation: "Can invoke operations with optional input"
+ body: "{\"Value\":\"Hi\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput" }
+ params: { Value: "Hi" }
+ method: "POST"
+ uri: "/"
+ }
])
operation OperationWithOptionalInputOutput {
- input: OperationWithOptionalInputOutputInput,
- output: OperationWithOptionalInputOutputOutput,
+ input: OperationWithOptionalInputOutputInput
+ output: OperationWithOptionalInputOutputOutput
}
@input
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/requestCompression.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/requestCompression.smithy
index 151cdf64979..e791b9ca359 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/requestCompression.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/requestCompression.smithy
@@ -4,7 +4,6 @@ namespace aws.protocoltests.json
use aws.protocols#awsJson1_1
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
@@ -12,289 +11,285 @@ apply PutWithContentEncoding @httpRequestTests([
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: awsJson1_1
params: {
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYco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m6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS
+ YsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE
+ X5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
{
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1"
documentation: """
- Compression algorithm encoding is appended to the Content-Encoding header, and the
- user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
- traits are ignored in the awsJson1_1 protocol.
- """
+ Compression algorithm encoding is appended to the Content-Encoding header, and the
+ user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
+ traits are ignored in the awsJson1_1 protocol.
+ """
protocol: awsJson1_1
params: {
- "encoding": "custom"
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUk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97KMtEnp25VOdMP46SQXS
+ YsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE
+ X5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
])
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/services/machinelearning.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/services/machinelearning.smithy
index 9b952ab9209..4f718c8a29c 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/services/machinelearning.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/services/machinelearning.smithy
@@ -8,131 +8,129 @@ use aws.protocols#awsJson1_1
use smithy.test#httpRequestTests
@service(
- sdkId: "Machine Learning",
- arnNamespace: "machinelearning",
- cloudFormationName: "MachineLearning",
- cloudTrailEventSource: "machinelearning.amazonaws.com",
- endpointPrefix: "machinelearning",
-)
-@sigv4(
- name: "machinelearning",
+ sdkId: "Machine Learning"
+ arnNamespace: "machinelearning"
+ cloudFormationName: "MachineLearning"
+ cloudTrailEventSource: "machinelearning.amazonaws.com"
+ endpointPrefix: "machinelearning"
)
+@sigv4(name: "machinelearning")
@awsJson1_1
@title("Amazon Machine Learning")
-@xmlNamespace(
- uri: "http://machinelearning.amazonaws.com/doc/2014-12-12/",
-)
+@xmlNamespace(uri: "http://machinelearning.amazonaws.com/doc/2014-12-12/")
service AmazonML_20141212 {
- version: "2014-12-12",
+ version: "2014-12-12"
operations: [
- Predict,
- ],
+ Predict
+ ]
}
@httpRequestTests([
{
- id: "MachinelearningPredictEndpoint",
+ id: "MachinelearningPredictEndpoint"
documentation: """
MachineLearning's api makes use of generated endpoints that the
customer is then expected to use for the Predict operation. Having
to alter the endpoint for a specific operation would be cumbersome,
- so an AWS client should be able to do it for them.""",
- protocol: awsJson1_1,
- method: "POST",
- uri: "/",
- host: "example.com",
- resolvedHost: "custom.example.com",
- body: "{\"MLModelId\": \"foo\", \"Record\": {}, \"PredictEndpoint\": \"https://custom.example.com/\"}",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ so an AWS client should be able to do it for them."""
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
+ host: "example.com"
+ resolvedHost: "custom.example.com"
+ body: "{\"MLModelId\": \"foo\", \"Record\": {}, \"PredictEndpoint\": \"https://custom.example.com/\"}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- MLModelId: "foo",
- Record: {},
- PredictEndpoint: "https://custom.example.com/",
+ MLModelId: "foo"
+ Record: {}
+ PredictEndpoint: "https://custom.example.com/"
}
}
])
operation Predict {
- input: PredictInput,
- output: PredictOutput,
+ input: PredictInput
+ output: PredictOutput
errors: [
- InternalServerException,
- InvalidInputException,
- LimitExceededException,
- PredictorNotMountedException,
- ResourceNotFoundException,
- ],
+ InternalServerException
+ InvalidInputException
+ LimitExceededException
+ PredictorNotMountedException
+ ResourceNotFoundException
+ ]
}
@error("server")
@httpError(500)
structure InternalServerException {
- message: ErrorMessage,
- code: ErrorCode,
+ message: ErrorMessage
+ code: ErrorCode
}
@error("client")
@httpError(400)
structure InvalidInputException {
- message: ErrorMessage,
- code: ErrorCode,
+ message: ErrorMessage
+ code: ErrorCode
}
@error("client")
@httpError(417)
structure LimitExceededException {
- message: ErrorMessage,
- code: ErrorCode,
+ message: ErrorMessage
+ code: ErrorCode
}
@input
structure PredictInput {
@required
- MLModelId: EntityId,
+ MLModelId: EntityId
+
@required
- Record: Record,
+ Record: Record
+
@required
- PredictEndpoint: VipURLUnvalidated,
+ PredictEndpoint: VipURLUnvalidated
}
structure Prediction {
- predictedLabel: Label,
- predictedValue: floatLabel,
- predictedScores: ScoreValuePerLabelMap,
- details: DetailsMap,
+ predictedLabel: Label
+ predictedValue: floatLabel
+ predictedScores: ScoreValuePerLabelMap
+ details: DetailsMap
}
@error("client")
@httpError(400)
structure PredictorNotMountedException {
- message: ErrorMessage,
+ message: ErrorMessage
}
@output
structure PredictOutput {
- Prediction: Prediction,
+ Prediction: Prediction
}
@error("client")
@httpError(404)
structure ResourceNotFoundException {
- message: ErrorMessage,
- code: ErrorCode,
+ message: ErrorMessage
+ code: ErrorCode
}
map DetailsMap {
- key: DetailsAttributes,
- value: DetailsValue,
+ key: DetailsAttributes
+ value: DetailsValue
}
map Record {
- key: VariableName,
- value: VariableValue,
+ key: VariableName
+ value: VariableValue
}
map ScoreValuePerLabelMap {
- key: Label,
- value: ScoreValue,
+ key: Label
+ value: ScoreValue
}
enum DetailsAttributes {
@@ -140,31 +138,21 @@ enum DetailsAttributes {
ALGORITHM = "Algorithm"
}
-@length(
- min: 1,
-)
+@length(min: 1)
string DetailsValue
-@length(
- min: 1,
- max: 64,
-)
+@length(min: 1, max: 64)
@pattern("^[a-zA-Z0-9_.-]+$")
string EntityId
integer ErrorCode
-@length(
- min: 0,
- max: 2048,
-)
+@length(min: 0, max: 2048)
string ErrorMessage
float floatLabel
-@length(
- min: 1,
-)
+@length(min: 1)
string Label
float ScoreValue
diff --git a/smithy-aws-protocol-tests/model/awsJson1_1/unions.smithy b/smithy-aws-protocol-tests/model/awsJson1_1/unions.smithy
index c36bb0a6f2f..59cee36e4e9 100644
--- a/smithy-aws-protocol-tests/model/awsJson1_1/unions.smithy
+++ b/smithy-aws-protocol-tests/model/awsJson1_1/unions.smithy
@@ -1,23 +1,21 @@
// This file defines test cases that serialize unions.
-
$version: "2.0"
namespace aws.protocoltests.json
use aws.protocols#awsJson1_1
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
+use aws.protocoltests.shared#FooEnum
+use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#StringList
use aws.protocoltests.shared#StringMap
-use aws.protocoltests.shared#GreetingStruct
-use aws.protocoltests.shared#FooEnum
-
+use smithy.test#httpRequestTests
+use smithy.test#httpResponseTests
/// This operation uses unions for inputs and outputs.
@idempotent
operation JsonUnions {
- input: UnionInputOutput,
- output: UnionInputOutput,
+ input: UnionInputOutput
+ output: UnionInputOutput
}
/// A shared structure that contains a single union member.
@@ -27,185 +25,152 @@ structure UnionInputOutput {
/// A union with a representative set of types for members.
union MyUnion {
- stringValue: String,
- booleanValue: Boolean,
- numberValue: Integer,
- blobValue: Blob,
- timestampValue: Timestamp,
- enumValue: FooEnum,
- listValue: StringList,
- mapValue: StringMap,
- structureValue: GreetingStruct,
+ stringValue: String
+ booleanValue: Boolean
+ numberValue: Integer
+ blobValue: Blob
+ timestampValue: Timestamp
+ enumValue: FooEnum
+ listValue: StringList
+ mapValue: StringMap
+ structureValue: GreetingStruct
}
apply JsonUnions @httpRequestTests([
{
- id: "AwsJson11SerializeStringUnionValue",
- documentation: "Serializes a string union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeStringUnionValue"
+ documentation: "Serializes a string union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"stringValue": "foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
- contents: {
- stringValue: "foo"
- }
+ contents: { stringValue: "foo" }
}
- },
+ }
{
- id: "AwsJson11SerializeBooleanUnionValue",
- documentation: "Serializes a boolean union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeBooleanUnionValue"
+ documentation: "Serializes a boolean union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"booleanValue": true
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
- contents: {
- booleanValue: true
- }
+ contents: { booleanValue: true }
}
- },
+ }
{
- id: "AwsJson11SerializeNumberUnionValue",
- documentation: "Serializes a number union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeNumberUnionValue"
+ documentation: "Serializes a number union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"numberValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
- contents: {
- numberValue: 1
- }
+ contents: { numberValue: 1 }
}
- },
+ }
{
- id: "AwsJson11SerializeBlobUnionValue",
- documentation: "Serializes a blob union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeBlobUnionValue"
+ documentation: "Serializes a blob union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"blobValue": "Zm9v"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
- contents: {
- blobValue: "foo"
- }
+ contents: { blobValue: "foo" }
}
- },
+ }
{
- id: "AwsJson11SerializeTimestampUnionValue",
- documentation: "Serializes a timestamp union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeTimestampUnionValue"
+ documentation: "Serializes a timestamp union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"timestampValue": 1398796238
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
- contents: {
- timestampValue: 1398796238
- }
+ contents: { timestampValue: 1398796238 }
}
- },
+ }
{
- id: "AwsJson11SerializeEnumUnionValue",
- documentation: "Serializes an enum union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeEnumUnionValue"
+ documentation: "Serializes an enum union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"enumValue": "Foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
- contents: {
- enumValue: "Foo"
- }
+ contents: { enumValue: "Foo" }
}
- },
+ }
{
- id: "AwsJson11SerializeListUnionValue",
- documentation: "Serializes a list union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeListUnionValue"
+ documentation: "Serializes a list union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
"listValue": ["foo", "bar"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
contents: {
listValue: ["foo", "bar"]
}
}
- },
+ }
{
- id: "AwsJson11SerializeMapUnionValue",
- documentation: "Serializes a map union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeMapUnionValue"
+ documentation: "Serializes a map union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
@@ -214,27 +179,21 @@ apply JsonUnions @httpRequestTests([
"spam": "eggs"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
contents: {
- mapValue: {
- foo: "bar",
- spam: "eggs",
- }
+ mapValue: { foo: "bar", spam: "eggs" }
}
}
- },
+ }
{
- id: "AwsJson11SerializeStructureUnionValue",
- documentation: "Serializes a structure union value",
- protocol: awsJson1_1,
- method: "POST",
- "uri": "/",
+ id: "AwsJson11SerializeStructureUnionValue"
+ documentation: "Serializes a structure union value"
+ protocol: awsJson1_1
+ method: "POST"
+ uri: "/"
body: """
{
"contents": {
@@ -242,161 +201,144 @@ apply JsonUnions @httpRequestTests([
"hi": "hello"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/x-amz-json-1.1",
- "X-Amz-Target": "JsonProtocol.JsonUnions",
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1", "X-Amz-Target": "JsonProtocol.JsonUnions" }
params: {
contents: {
- structureValue: {
- hi: "hello",
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
])
apply JsonUnions @httpResponseTests([
{
- id: "AwsJson11DeserializeStringUnionValue",
- documentation: "Deserializes a string union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeStringUnionValue"
+ documentation: "Deserializes a string union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"stringValue": "foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- contents: {
- stringValue: "foo"
- }
+ contents: { stringValue: "foo" }
}
- },
+ }
{
- id: "AwsJson11DeserializeBooleanUnionValue",
- documentation: "Deserializes a boolean union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeBooleanUnionValue"
+ documentation: "Deserializes a boolean union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"booleanValue": true
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- contents: {
- booleanValue: true
- }
+ contents: { booleanValue: true }
}
- },
+ }
{
- id: "AwsJson11DeserializeNumberUnionValue",
- documentation: "Deserializes a number union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeNumberUnionValue"
+ documentation: "Deserializes a number union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"numberValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- contents: {
- numberValue: 1
- }
+ contents: { numberValue: 1 }
}
- },
+ }
{
- id: "AwsJson11DeserializeBlobUnionValue",
- documentation: "Deserializes a blob union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeBlobUnionValue"
+ documentation: "Deserializes a blob union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"blobValue": "Zm9v"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- contents: {
- blobValue: "foo"
- }
+ contents: { blobValue: "foo" }
}
- },
+ }
{
- id: "AwsJson11DeserializeTimestampUnionValue",
- documentation: "Deserializes a timestamp union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeTimestampUnionValue"
+ documentation: "Deserializes a timestamp union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"timestampValue": 1398796238
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- contents: {
- timestampValue: 1398796238
- }
+ contents: { timestampValue: 1398796238 }
}
- },
+ }
{
- id: "AwsJson11DeserializeEnumUnionValue",
- documentation: "Deserializes an enum union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeEnumUnionValue"
+ documentation: "Deserializes an enum union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"enumValue": "Foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
- contents: {
- enumValue: "Foo"
- }
+ contents: { enumValue: "Foo" }
}
- },
+ }
{
- id: "AwsJson11DeserializeListUnionValue",
- documentation: "Deserializes a list union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeListUnionValue"
+ documentation: "Deserializes a list union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
"listValue": ["foo", "bar"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
contents: {
listValue: ["foo", "bar"]
}
}
- },
+ }
{
- id: "AwsJson11DeserializeMapUnionValue",
- documentation: "Deserializes a map union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeMapUnionValue"
+ documentation: "Deserializes a map union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
@@ -405,23 +347,20 @@ apply JsonUnions @httpResponseTests([
"spam": "eggs"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
contents: {
- mapValue: {
- foo: "bar",
- spam: "eggs"
- }
+ mapValue: { foo: "bar", spam: "eggs" }
}
}
- },
+ }
{
- id: "AwsJson11DeserializeStructureUnionValue",
- documentation: "Deserializes a structure union value",
- protocol: awsJson1_1,
- code: 200,
+ id: "AwsJson11DeserializeStructureUnionValue"
+ documentation: "Deserializes a structure union value"
+ protocol: awsJson1_1
+ code: 200
body: """
{
"contents": {
@@ -429,17 +368,15 @@ apply JsonUnions @httpResponseTests([
"hi": "hello"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/x-amz-json-1.1"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
contents: {
- structureValue: {
- hi: "hello",
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
{
id: "AwsJson11DeserializeIgnoreType"
appliesTo: "client"
@@ -456,14 +393,10 @@ apply JsonUnions @httpResponseTests([
}
}"""
bodyMediaType: "application/json"
- headers: {
- "Content-Type": "application/x-amz-json-1.1"
- }
+ headers: { "Content-Type": "application/x-amz-json-1.1" }
params: {
contents: {
- structureValue: {
- hi: "hello"
- }
+ structureValue: { hi: "hello" }
}
}
}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/datetime-offsets.smithy b/smithy-aws-protocol-tests/model/awsQuery/datetime-offsets.smithy
index f8147cc3773..ea46de9d080 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/datetime-offsets.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/datetime-offsets.smithy
@@ -15,45 +15,41 @@ operation DatetimeOffsets {
apply DatetimeOffsets @httpResponseTests([
{
- id: "AwsQueryDateTimeWithNegativeOffset",
+ id: "AwsQueryDateTimeWithNegativeOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: awsQuery,
- code: 200,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 2019-12-16T22:48:18-01:00
-
-
- """,
+
+
+ 2019-12-16T22:48:18-01:00
+
+
+ """
params: { datetime: 1576540098 }
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
appliesTo: "client"
- },
+ }
{
- id: "AwsQueryDateTimeWithPositiveOffset",
+ id: "AwsQueryDateTimeWithPositiveOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: awsQuery,
- code: 200,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 2019-12-17T00:48:18+01:00
-
-
- """,
+
+
+ 2019-12-17T00:48:18+01:00
+
+
+ """
params: { datetime: 1576540098 }
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
appliesTo: "client"
- },
+ }
])
structure DatetimeOffsetsOutput {
diff --git a/smithy-aws-protocol-tests/model/awsQuery/empty-input-output.smithy b/smithy-aws-protocol-tests/model/awsQuery/empty-input-output.smithy
index fe4f0899f33..73880c99a3e 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/empty-input-output.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/empty-input-output.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test the basics of empty input and
// output shape serialization.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -17,26 +16,24 @@ operation NoInputAndNoOutput {}
apply NoInputAndNoOutput @httpRequestTests([
{
- id: "QueryNoInputAndNoOutput",
- documentation: "No input serializes no additional query params",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=NoInputAndNoOutput&Version=2020-01-08",
+ id: "QueryNoInputAndNoOutput"
+ documentation: "No input serializes no additional query params"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=NoInputAndNoOutput&Version=2020-01-08"
bodyMediaType: "application/x-www-form-urlencoded"
}
])
apply NoInputAndNoOutput @httpResponseTests([
- {
- id: "QueryNoInputAndNoOutput",
- documentation: "Empty output. Note that no assertion is made on the output body itself.",
- protocol: awsQuery,
- code: 200,
- }
+ {
+ id: "QueryNoInputAndNoOutput"
+ documentation: "Empty output. Note that no assertion is made on the output body itself."
+ protocol: awsQuery
+ code: 200
+ }
])
/// The example tests how requests and responses are serialized when there's
@@ -44,31 +41,29 @@ apply NoInputAndNoOutput @httpResponseTests([
///
/// While this should be rare, code generators must support this.
operation NoInputAndOutput {
- input: NoInputAndOutputInput,
+ input: NoInputAndOutputInput
output: NoInputAndOutputOutput
}
apply NoInputAndOutput @httpRequestTests([
{
- id: "QueryNoInputAndOutput",
- documentation: "No input serializes no payload",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=NoInputAndOutput&Version=2020-01-08",
+ id: "QueryNoInputAndOutput"
+ documentation: "No input serializes no payload"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=NoInputAndOutput&Version=2020-01-08"
bodyMediaType: "application/x-www-form-urlencoded"
}
])
apply NoInputAndOutput @httpResponseTests([
{
- id: "QueryNoInputAndOutput",
- documentation: "Empty output",
- protocol: awsQuery,
- code: 200,
+ id: "QueryNoInputAndOutput"
+ documentation: "Empty output"
+ protocol: awsQuery
+ code: 200
}
])
@@ -83,33 +78,32 @@ structure NoInputAndOutputOutput {}
///
/// While this should be rare, code generators must support this.
operation EmptyInputAndEmptyOutput {
- input: EmptyInputAndEmptyOutputInput,
+ input: EmptyInputAndEmptyOutputInput
output: EmptyInputAndEmptyOutputOutput
}
apply EmptyInputAndEmptyOutput @httpRequestTests([
{
- id: "QueryEmptyInputAndEmptyOutput",
- documentation: "Empty input serializes no extra query params",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=EmptyInputAndEmptyOutput&Version=2020-01-08",
+ id: "QueryEmptyInputAndEmptyOutput"
+ documentation: "Empty input serializes no extra query params"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=EmptyInputAndEmptyOutput&Version=2020-01-08"
bodyMediaType: "application/x-www-form-urlencoded"
- },
+ }
])
apply EmptyInputAndEmptyOutput @httpResponseTests([
{
- id: "QueryEmptyInputAndEmptyOutput",
- documentation: "Empty output",
- protocol: awsQuery,
- code: 200,
- },
+ id: "QueryEmptyInputAndEmptyOutput"
+ documentation: "Empty output"
+ protocol: awsQuery
+ code: 200
+ }
])
structure EmptyInputAndEmptyOutputInput {}
+
structure EmptyInputAndEmptyOutputOutput {}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/endpoint-paths.smithy b/smithy-aws-protocol-tests/model/awsQuery/endpoint-paths.smithy
index 8eb2d19265d..8157038fa30 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/endpoint-paths.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/endpoint-paths.smithy
@@ -1,5 +1,4 @@
// This file defines tests to ensure that implementations support endpoints with paths
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -9,16 +8,15 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "QueryHostWithPath",
+ id: "QueryHostWithPath"
documentation: """
- Custom endpoints supplied by users can have paths""",
- protocol: awsQuery,
- method: "POST",
- uri: "/custom/",
- body: "Action=HostWithPathOperation&Version=2020-01-08",
- host: "example.com/custom",
+ Custom endpoints supplied by users can have paths"""
+ protocol: awsQuery
+ method: "POST"
+ uri: "/custom/"
+ body: "Action=HostWithPathOperation&Version=2020-01-08"
+ host: "example.com/custom"
appliesTo: "client"
}
])
-
operation HostWithPathOperation {}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/endpoints.smithy b/smithy-aws-protocol-tests/model/awsQuery/endpoints.smithy
index 037bfd11d4b..85682876b8f 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/endpoints.smithy
@@ -1,6 +1,5 @@
// This file defines tests to ensure that implementations support the endpoint
// trait and other features that modify the host.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -10,55 +9,48 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "AwsQueryEndpointTrait",
+ id: "AwsQueryEndpointTrait"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait.""",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=EndpointOperation&Version=2020-01-08",
- bodyMediaType: "application/x-www-form-urlencoded",
- host: "example.com",
- resolvedHost: "foo.example.com",
+ Operations can prepend to the given host if they define the
+ endpoint trait."""
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=EndpointOperation&Version=2020-01-08"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ host: "example.com"
+ resolvedHost: "foo.example.com"
}
])
@endpoint(hostPrefix: "foo.")
operation EndpointOperation {}
-
@httpRequestTests([
{
- id: "AwsQueryEndpointTraitWithHostLabel",
+ id: "AwsQueryEndpointTraitWithHostLabel"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input.""",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=EndpointWithHostLabelOperation&Version=2020-01-08&label=bar",
- bodyMediaType: "application/x-www-form-urlencoded",
- host: "example.com",
- resolvedHost: "foo.bar.example.com",
- params: {
- label: "bar",
- },
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input."""
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=EndpointWithHostLabelOperation&Version=2020-01-08&label=bar"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ host: "example.com"
+ resolvedHost: "foo.bar.example.com"
+ params: { label: "bar" }
}
])
@endpoint(hostPrefix: "foo.{label}.")
operation EndpointWithHostLabelOperation {
- input: HostLabelInput,
+ input: HostLabelInput
}
structure HostLabelInput {
@required
@hostLabel
- label: String,
+ label: String
}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/fractional-seconds.smithy b/smithy-aws-protocol-tests/model/awsQuery/fractional-seconds.smithy
index 10cfcda5db1..e6aca5e5583 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/fractional-seconds.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/fractional-seconds.smithy
@@ -14,23 +14,21 @@ operation FractionalSeconds {
apply FractionalSeconds @httpResponseTests([
{
- id: "AwsQueryDateTimeWithFractionalSeconds",
+ id: "AwsQueryDateTimeWithFractionalSeconds"
documentation: """
- Ensures that clients can correctly parse datetime timestamps with fractional seconds""",
- protocol: awsQuery,
- code: 200,
+ Ensures that clients can correctly parse datetime timestamps with fractional seconds"""
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 2000-01-02T20:34:56.123Z
-
-
- """,
+
+
+ 2000-01-02T20:34:56.123Z
+
+
+ """
params: { datetime: 946845296.123 }
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/awsQuery/input-lists.smithy b/smithy-aws-protocol-tests/model/awsQuery/input-lists.smithy
index d5ff44ce05a..518af08ecb8 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/input-lists.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/input-lists.smithy
@@ -1,12 +1,9 @@
// This file defines test cases that test list query serialization.
-
$version: "2.0"
namespace aws.protocoltests.query
use aws.protocols#awsQuery
-use aws.protocoltests.shared#EpochSeconds
-use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#GreetingList
use aws.protocoltests.shared#StringList
use smithy.test#httpRequestTests
@@ -18,120 +15,109 @@ operation QueryLists {
apply QueryLists @httpRequestTests([
{
- id: "QueryLists",
- documentation: "Serializes query lists",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz&ComplexListArg.member.1.hi=hello&ComplexListArg.member.2.hi=hola",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryLists"
+ documentation: "Serializes query lists"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz&ComplexListArg.member.1.hi=hello&ComplexListArg.member.2.hi=hola"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- ListArg: ["foo", "bar", "baz"],
+ ListArg: ["foo", "bar", "baz"]
ComplexListArg: [
{
hi: "hello"
- },
+ }
{
hi: "hola"
}
]
}
- },
+ }
{
- id: "EmptyQueryLists",
- documentation: "Serializes empty query lists",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&ListArg=",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "EmptyQueryLists"
+ documentation: "Serializes empty query lists"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&ListArg="
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
ListArg: []
}
- },
+ }
{
- id: "FlattenedQueryLists",
- documentation: "Flattens query lists by repeating the member name and removing the member element",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&FlattenedListArg.1=A&FlattenedListArg.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "FlattenedQueryLists"
+ documentation: "Flattens query lists by repeating the member name and removing the member element"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&FlattenedListArg.1=A&FlattenedListArg.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
FlattenedListArg: ["A", "B"]
}
- },
+ }
{
- id: "QueryListArgWithXmlNameMember",
- documentation: "Changes the member of lists using xmlName trait",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&ListArgWithXmlNameMember.item.1=A&ListArgWithXmlNameMember.item.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryListArgWithXmlNameMember"
+ documentation: "Changes the member of lists using xmlName trait"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&ListArgWithXmlNameMember.item.1=A&ListArgWithXmlNameMember.item.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
ListArgWithXmlNameMember: ["A", "B"]
}
- },
+ }
{
- id: "QueryFlattenedListArgWithXmlName",
- documentation: "Changes the name of flattened lists using xmlName trait on the structure member",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&Hi.1=A&Hi.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryFlattenedListArgWithXmlName"
+ documentation: "Changes the name of flattened lists using xmlName trait on the structure member"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&Hi.1=A&Hi.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
FlattenedListArgWithXmlName: ["A", "B"]
}
- },
+ }
{
- id: "QueryNestedStructWithList",
- documentation: "Nested structure with a list member",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&NestedWithList.ListArg.member.1=A&NestedWithList.ListArg.member.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryNestedStructWithList"
+ documentation: "Nested structure with a list member"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&NestedWithList.ListArg.member.1=A&NestedWithList.ListArg.member.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
NestedWithList: {
ListArg: ["A", "B"]
}
}
- },
+ }
])
structure QueryListsInput {
- ListArg: StringList,
- ComplexListArg: GreetingList,
+ ListArg: StringList
+
+ ComplexListArg: GreetingList
@xmlFlattened
- FlattenedListArg: StringList,
+ FlattenedListArg: StringList
- ListArgWithXmlNameMember: ListWithXmlName,
+ ListArgWithXmlNameMember: ListWithXmlName
// Notice that the xmlName on the targeted list member is ignored.
@xmlFlattened
@xmlName("Hi")
- FlattenedListArgWithXmlName: ListWithXmlName,
+ FlattenedListArgWithXmlName: ListWithXmlName
NestedWithList: NestedStructWithList
}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/input-maps.smithy b/smithy-aws-protocol-tests/model/awsQuery/input-maps.smithy
index e6ad9731db4..ee73725c346 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/input-maps.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/input-maps.smithy
@@ -6,7 +6,6 @@
// all maps in this file should be sorted by key. Alternatively,
// a language implementing these tests may choose to implement a
// query body parser that understands query maps and/or lists.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -24,209 +23,170 @@ operation QueryMaps {
apply QueryMaps @httpRequestTests([
{
- id: "QuerySimpleQueryMaps",
- documentation: "Serializes query maps",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&MapArg.entry.1.key=bar&MapArg.entry.1.value=Bar&MapArg.entry.2.key=foo&MapArg.entry.2.value=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QuerySimpleQueryMaps"
+ documentation: "Serializes query maps"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&MapArg.entry.1.key=bar&MapArg.entry.1.value=Bar&MapArg.entry.2.key=foo&MapArg.entry.2.value=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- MapArg: {
- bar: "Bar",
- foo: "Foo",
- }
+ MapArg: { bar: "Bar", foo: "Foo" }
}
- },
+ }
{
- id: "QuerySimpleQueryMapsWithXmlName",
- documentation: "Serializes query maps and uses xmlName",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&Foo.entry.1.key=foo&Foo.entry.1.value=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QuerySimpleQueryMapsWithXmlName"
+ documentation: "Serializes query maps and uses xmlName"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&Foo.entry.1.key=foo&Foo.entry.1.value=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- RenamedMapArg: {
- foo: "Foo"
- }
+ RenamedMapArg: { foo: "Foo" }
}
- },
+ }
{
- id: "QueryComplexQueryMaps",
- documentation: "Serializes complex query maps",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&ComplexMapArg.entry.1.key=bar&ComplexMapArg.entry.1.value.hi=Bar&ComplexMapArg.entry.2.key=foo&ComplexMapArg.entry.2.value.hi=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryComplexQueryMaps"
+ documentation: "Serializes complex query maps"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&ComplexMapArg.entry.1.key=bar&ComplexMapArg.entry.1.value.hi=Bar&ComplexMapArg.entry.2.key=foo&ComplexMapArg.entry.2.value.hi=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
ComplexMapArg: {
- bar: {
- hi: "Bar"
- },
- foo: {
- hi: "Foo",
- },
+ bar: { hi: "Bar" }
+ foo: { hi: "Foo" }
}
}
- },
+ }
{
- id: "QueryEmptyQueryMaps",
- documentation: "Does not serialize empty query maps",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryEmptyQueryMaps"
+ documentation: "Does not serialize empty query maps"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
MapArg: {}
}
- },
+ }
{
- id: "QueryQueryMapWithMemberXmlName",
- documentation: "Serializes query maps where the member has an xmlName trait",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&MapWithXmlMemberName.entry.1.K=bar&MapWithXmlMemberName.entry.1.V=Bar&MapWithXmlMemberName.entry.2.K=foo&MapWithXmlMemberName.entry.2.V=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryQueryMapWithMemberXmlName"
+ documentation: "Serializes query maps where the member has an xmlName trait"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&MapWithXmlMemberName.entry.1.K=bar&MapWithXmlMemberName.entry.1.V=Bar&MapWithXmlMemberName.entry.2.K=foo&MapWithXmlMemberName.entry.2.V=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- MapWithXmlMemberName: {
- bar: "Bar",
- foo: "Foo",
- }
+ MapWithXmlMemberName: { bar: "Bar", foo: "Foo" }
}
- },
+ }
{
- id: "QueryFlattenedQueryMaps",
- documentation: "Serializes flattened query maps",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&FlattenedMap.1.key=bar&FlattenedMap.1.value=Bar&FlattenedMap.2.key=foo&FlattenedMap.2.value=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryFlattenedQueryMaps"
+ documentation: "Serializes flattened query maps"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&FlattenedMap.1.key=bar&FlattenedMap.1.value=Bar&FlattenedMap.2.key=foo&FlattenedMap.2.value=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- FlattenedMap: {
- bar: "Bar",
- foo: "Foo",
- }
+ FlattenedMap: { bar: "Bar", foo: "Foo" }
}
- },
+ }
{
- id: "QueryFlattenedQueryMapsWithXmlName",
- documentation: "Serializes flattened query maps that use an xmlName",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&Hi.1.K=bar&Hi.1.V=Bar&Hi.2.K=foo&Hi.2.V=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryFlattenedQueryMapsWithXmlName"
+ documentation: "Serializes flattened query maps that use an xmlName"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&Hi.1.K=bar&Hi.1.V=Bar&Hi.2.K=foo&Hi.2.V=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- FlattenedMapWithXmlName: {
- bar: "Bar",
- foo: "Foo",
- }
+ FlattenedMapWithXmlName: { bar: "Bar", foo: "Foo" }
}
- },
+ }
{
- id: "QueryQueryMapOfLists",
- documentation: "Serializes query map of lists",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&MapOfLists.entry.1.key=bar&MapOfLists.entry.1.value.member.1=C&MapOfLists.entry.1.value.member.2=D&MapOfLists.entry.2.key=foo&MapOfLists.entry.2.value.member.1=A&MapOfLists.entry.2.value.member.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryQueryMapOfLists"
+ documentation: "Serializes query map of lists"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&MapOfLists.entry.1.key=bar&MapOfLists.entry.1.value.member.1=C&MapOfLists.entry.1.value.member.2=D&MapOfLists.entry.2.key=foo&MapOfLists.entry.2.value.member.1=A&MapOfLists.entry.2.value.member.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
MapOfLists: {
- bar: ["C", "D"],
- foo: ["A", "B"],
+ bar: ["C", "D"]
+ foo: ["A", "B"]
}
}
- },
+ }
{
- id: "QueryNestedStructWithMap",
- documentation: "Serializes nested struct with map member",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryMaps&Version=2020-01-08&NestedStructWithMap.MapArg.entry.1.key=bar&NestedStructWithMap.MapArg.entry.1.value=Bar&NestedStructWithMap.MapArg.entry.2.key=foo&NestedStructWithMap.MapArg.entry.2.value=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "QueryNestedStructWithMap"
+ documentation: "Serializes nested struct with map member"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryMaps&Version=2020-01-08&NestedStructWithMap.MapArg.entry.1.key=bar&NestedStructWithMap.MapArg.entry.1.value=Bar&NestedStructWithMap.MapArg.entry.2.key=foo&NestedStructWithMap.MapArg.entry.2.value=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
NestedStructWithMap: {
- MapArg: {
- bar: "Bar",
- foo: "Foo",
- }
+ MapArg: { bar: "Bar", foo: "Foo" }
}
}
- },
+ }
])
structure QueryMapsInput {
- MapArg: StringMap,
+ MapArg: StringMap
@xmlName("Foo")
- RenamedMapArg: StringMap,
+ RenamedMapArg: StringMap
- ComplexMapArg: ComplexMap,
+ ComplexMapArg: ComplexMap
- MapWithXmlMemberName: MapWithXmlName,
+ MapWithXmlMemberName: MapWithXmlName
@xmlFlattened
- FlattenedMap: StringMap,
+ FlattenedMap: StringMap
@xmlFlattened
@xmlName("Hi")
- FlattenedMapWithXmlName: MapWithXmlName,
+ FlattenedMapWithXmlName: MapWithXmlName
- MapOfLists: MapOfLists,
+ MapOfLists: MapOfLists
- NestedStructWithMap: NestedStructWithMap,
+ NestedStructWithMap: NestedStructWithMap
}
map ComplexMap {
- key: String,
- value: GreetingStruct,
+ key: String
+ value: GreetingStruct
}
map MapWithXmlName {
@xmlName("K")
- key: String,
+ key: String
@xmlName("V")
value: String
}
map MapOfLists {
- key: String,
- value: StringList,
+ key: String
+ value: StringList
}
structure NestedStructWithMap {
diff --git a/smithy-aws-protocol-tests/model/awsQuery/input.smithy b/smithy-aws-protocol-tests/model/awsQuery/input.smithy
index 4183aa91d50..df1b758fcbf 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/input.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/input.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that test the basics of input serialization.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -17,219 +16,148 @@ operation SimpleInputParams {
apply SimpleInputParams @httpRequestTests([
{
- id: "QuerySimpleInputParamsStrings",
- documentation: "Serializes strings",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Bar=val2",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Foo: "val1",
- Bar: "val2"
- }
- },
+ id: "QuerySimpleInputParamsStrings"
+ documentation: "Serializes strings"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Bar=val2"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Foo: "val1", Bar: "val2" }
+ }
{
- id: "QuerySimpleInputParamsStringAndBooleanTrue",
- documentation: "Serializes booleans that are true",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Baz=true",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Foo: "val1",
- Baz: true,
- }
- },
+ id: "QuerySimpleInputParamsStringAndBooleanTrue"
+ documentation: "Serializes booleans that are true"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Baz=true"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Foo: "val1", Baz: true }
+ }
{
- id: "QuerySimpleInputParamsStringsAndBooleanFalse",
- documentation: "Serializes booleans that are false",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Baz=false",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Baz: false,
- }
- },
+ id: "QuerySimpleInputParamsStringsAndBooleanFalse"
+ documentation: "Serializes booleans that are false"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Baz=false"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Baz: false }
+ }
{
- id: "QuerySimpleInputParamsInteger",
- documentation: "Serializes integers",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Bam=10",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Bam: 10,
- }
- },
+ id: "QuerySimpleInputParamsInteger"
+ documentation: "Serializes integers"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Bam=10"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Bam: 10 }
+ }
{
- id: "QuerySimpleInputParamsFloat",
- documentation: "Serializes floats",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Boo=10.8",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Boo: 10.8,
- }
- },
+ id: "QuerySimpleInputParamsFloat"
+ documentation: "Serializes floats"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Boo=10.8"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Boo: 10.8 }
+ }
{
- id: "QuerySimpleInputParamsBlob",
- documentation: "Blobs are base64 encoded in the query string",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Qux=dmFsdWU%3D",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Qux: "value",
- }
- },
+ id: "QuerySimpleInputParamsBlob"
+ documentation: "Blobs are base64 encoded in the query string"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Qux=dmFsdWU%3D"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Qux: "value" }
+ }
{
- id: "QueryEnums",
- documentation: "Serializes enums in the query string",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&FooEnum=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- FooEnum: "Foo",
- }
- },
+ id: "QueryEnums"
+ documentation: "Serializes enums in the query string"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&FooEnum=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { FooEnum: "Foo" }
+ }
{
- id: "QueryIntEnums",
- documentation: "Serializes intEnums in the query string",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&IntegerEnum=1",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- IntegerEnum: 1,
- }
- },
+ id: "QueryIntEnums"
+ documentation: "Serializes intEnums in the query string"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&IntegerEnum=1"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { IntegerEnum: 1 }
+ }
{
- id: "AwsQuerySupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=NaN&Boo=NaN",
- bodyMediaType: "application/x-www-form-urlencoded",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- FloatValue: "NaN",
- Boo: "NaN",
- }
- },
+ id: "AwsQuerySupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=NaN&Boo=NaN"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ params: { FloatValue: "NaN", Boo: "NaN" }
+ }
{
- id: "AwsQuerySupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=Infinity&Boo=Infinity",
- bodyMediaType: "application/x-www-form-urlencoded",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- FloatValue: "Infinity",
- Boo: "Infinity",
- }
- },
+ id: "AwsQuerySupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=Infinity&Boo=Infinity"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ params: { FloatValue: "Infinity", Boo: "Infinity" }
+ }
{
- id: "AwsQuerySupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=-Infinity&Boo=-Infinity",
- bodyMediaType: "application/x-www-form-urlencoded",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- FloatValue: "-Infinity",
- Boo: "-Infinity",
- }
- },
+ id: "AwsQuerySupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=-Infinity&Boo=-Infinity"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ params: { FloatValue: "-Infinity", Boo: "-Infinity" }
+ }
])
structure SimpleInputParamsInput {
- Foo: String,
- Bar: String,
- Baz: Boolean,
- Bam: Integer,
- FloatValue: Float,
- Boo: Double,
- Qux: Blob,
- FooEnum: FooEnum,
+ Foo: String
+ Bar: String
+ Baz: Boolean
+ Bam: Integer
+ FloatValue: Float
+ Boo: Double
+ Qux: Blob
+ FooEnum: FooEnum
IntegerEnum: IntegerEnum
}
@@ -244,39 +172,31 @@ operation QueryTimestamps {
apply QueryTimestamps @httpRequestTests([
{
- id: "QueryTimestampsInput",
- documentation: "Serializes timestamps",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=QueryTimestamps&Version=2020-01-08&normalFormat=2015-01-25T08%3A00%3A00Z&epochMember=1422172800&epochTarget=1422172800",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- normalFormat: 1422172800,
- epochMember: 1422172800,
- epochTarget: 1422172800,
- }
+ id: "QueryTimestampsInput"
+ documentation: "Serializes timestamps"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=QueryTimestamps&Version=2020-01-08&normalFormat=2015-01-25T08%3A00%3A00Z&epochMember=1422172800&epochTarget=1422172800"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { normalFormat: 1422172800, epochMember: 1422172800, epochTarget: 1422172800 }
}
])
structure QueryTimestampsInput {
// Timestamps are serialized as RFC 3339 date-time values by default.
- normalFormat: Timestamp,
+ normalFormat: Timestamp
// This member has the timestampFormat trait, so it changes the
// timestamp serialization.
@timestampFormat("epoch-seconds")
- epochMember: Timestamp,
+ epochMember: Timestamp
// The targeted shape has the timestampFormat trait, so it changes the
// timestamp serialization.
- epochTarget: EpochSeconds,
+ epochTarget: EpochSeconds
}
/// This test serializes nested and recursive structure members.
@@ -286,39 +206,33 @@ operation NestedStructures {
apply NestedStructures @httpRequestTests([
{
- id: "NestedStructures",
- documentation: "Serializes nested structures using dots",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=NestedStructures&Version=2020-01-08&Nested.StringArg=foo&Nested.OtherArg=true&Nested.RecursiveArg.StringArg=baz",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "NestedStructures"
+ documentation: "Serializes nested structures using dots"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=NestedStructures&Version=2020-01-08&Nested.StringArg=foo&Nested.OtherArg=true&Nested.RecursiveArg.StringArg=baz"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
Nested: {
- StringArg: "foo",
- OtherArg: true,
- RecursiveArg: {
- StringArg: "baz"
- }
+ StringArg: "foo"
+ OtherArg: true
+ RecursiveArg: { StringArg: "baz" }
}
}
}
])
structure NestedStructuresInput {
- Nested: StructArg,
+ Nested: StructArg
}
structure StructArg {
- StringArg: String,
- OtherArg: Boolean,
- RecursiveArg: StructArg,
+ StringArg: String
+ OtherArg: Boolean
+ RecursiveArg: StructArg
}
/// Automatically adds idempotency tokens.
@@ -329,43 +243,33 @@ operation QueryIdempotencyTokenAutoFill {
apply QueryIdempotencyTokenAutoFill @httpRequestTests([
{
- id: "QueryProtocolIdempotencyTokenAutoFill",
- documentation: "Automatically adds idempotency token when not set",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&token=00000000-0000-4000-8000-000000000000",
- bodyMediaType: "application/x-www-form-urlencoded",
- appliesTo: "client",
- },
+ id: "QueryProtocolIdempotencyTokenAutoFill"
+ documentation: "Automatically adds idempotency token when not set"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&token=00000000-0000-4000-8000-000000000000"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ appliesTo: "client"
+ }
{
- id: "QueryProtocolIdempotencyTokenAutoFillIsSet",
- documentation: "Uses the given idempotency token as-is",
- protocol: awsQuery,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&token=00000000-0000-4000-8000-000000000123",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- token: "00000000-0000-4000-8000-000000000123"
- },
- appliesTo: "client",
+ id: "QueryProtocolIdempotencyTokenAutoFillIsSet"
+ documentation: "Uses the given idempotency token as-is"
+ protocol: awsQuery
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&token=00000000-0000-4000-8000-000000000123"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { token: "00000000-0000-4000-8000-000000000123" }
+ appliesTo: "client"
}
])
structure QueryIdempotencyTokenAutoFillInput {
@idempotencyToken
- token: String,
+ token: String
}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/main.smithy b/smithy-aws-protocol-tests/model/awsQuery/main.smithy
index 4e2c7c513b4..ad7a3b1e885 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/main.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/main.smithy
@@ -5,71 +5,58 @@ namespace aws.protocoltests.query
use aws.api#service
use aws.auth#sigv4
use aws.protocols#awsQuery
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// A query service that sends query requests and XML responses.
@service(sdkId: "Query Protocol")
@sigv4(name: "awsquery")
@awsQuery
@xmlNamespace(uri: "https://example.com/")
@title("Sample Query Protocol Service")
service AwsQuery {
- version: "2020-01-08",
+ version: "2020-01-08"
operations: [
// Basic input and output tests
- NoInputAndNoOutput,
- NoInputAndOutput,
- EmptyInputAndEmptyOutput,
-
+ NoInputAndNoOutput
+ NoInputAndOutput
+ EmptyInputAndEmptyOutput
// Input tests
- SimpleInputParams,
- QueryTimestamps,
- NestedStructures,
- QueryLists,
- QueryMaps,
- QueryIdempotencyTokenAutoFill,
-
+ SimpleInputParams
+ QueryTimestamps
+ NestedStructures
+ QueryLists
+ QueryMaps
+ QueryIdempotencyTokenAutoFill
// Output tests
- XmlEmptyBlobs,
-
+ XmlEmptyBlobs
// Output XML map tests
- XmlMaps,
- XmlMapsXmlName,
- FlattenedXmlMap,
- FlattenedXmlMapWithXmlName,
- FlattenedXmlMapWithXmlNamespace,
- XmlEmptyMaps,
-
+ XmlMaps
+ XmlMapsXmlName
+ FlattenedXmlMap
+ FlattenedXmlMapWithXmlName
+ FlattenedXmlMapWithXmlNamespace
+ XmlEmptyMaps
// Output XML list tests
- XmlLists,
- XmlEmptyLists,
-
+ XmlLists
+ XmlEmptyLists
// Output XML structure tests
- SimpleScalarXmlProperties,
- XmlBlobs,
- XmlTimestamps,
- XmlEnums,
- XmlIntEnums,
- RecursiveXmlShapes,
- RecursiveXmlShapes,
- IgnoresWrappingXmlName,
- XmlNamespaces,
-
+ SimpleScalarXmlProperties
+ XmlBlobs
+ XmlTimestamps
+ XmlEnums
+ XmlIntEnums
+ RecursiveXmlShapes
+ RecursiveXmlShapes
+ IgnoresWrappingXmlName
+ XmlNamespaces
// Output error tests
- GreetingWithErrors,
-
+ GreetingWithErrors
// @endpoint and @hostLabel trait tests
- EndpointOperation,
- EndpointWithHostLabelOperation,
-
+ EndpointOperation
+ EndpointWithHostLabelOperation
// custom endpoints with paths
- HostWithPathOperation,
-
+ HostWithPathOperation
// client-only timestamp parsing tests
- DatetimeOffsets,
- FractionalSeconds,
-
+ DatetimeOffsets
+ FractionalSeconds
// requestCompression trait tests
PutWithContentEncoding
]
diff --git a/smithy-aws-protocol-tests/model/awsQuery/requestCompression.smithy b/smithy-aws-protocol-tests/model/awsQuery/requestCompression.smithy
index 79d2fdd326d..2d5dc4b6972 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/requestCompression.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/requestCompression.smithy
@@ -4,7 +4,6 @@ namespace aws.protocoltests.query
use aws.protocols#awsQuery
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
@@ -12,289 +11,285 @@ apply PutWithContentEncoding @httpRequestTests([
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: awsQuery
params: {
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkK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c2ylSEClqVBPR
+ GOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr
+ PwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS
+ YsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE
+ X5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
{
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery"
documentation: """
- Compression algorithm encoding is appended to the Content-Encoding header, and the
- user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
- traits are ignored in the awsQuery protocol.
- """
+ Compression algorithm encoding is appended to the Content-Encoding header, and the
+ user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
+ traits are ignored in the awsQuery protocol.
+ """
protocol: awsQuery
params: {
- "encoding": "custom"
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4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mnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr
+ PwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS
+ YsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE
+ X5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
])
diff --git a/smithy-aws-protocol-tests/model/awsQuery/xml-errors.smithy b/smithy-aws-protocol-tests/model/awsQuery/xml-errors.smithy
index 3d64b5626ee..c88da14c8ab 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/xml-errors.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/xml-errors.smithy
@@ -22,13 +22,12 @@
// be used to identify the request that caused the failure.
//
// See: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-responses.html#sqs-api-error-response-structure
-
$version: "2.0"
namespace aws.protocoltests.query
-use aws.protocols#awsQueryError
use aws.protocols#awsQuery
+use aws.protocols#awsQueryError
use smithy.test#httpResponseTests
/// This operation has three possible return values:
@@ -37,143 +36,127 @@ use smithy.test#httpResponseTests
/// 2. An InvalidGreeting error.
/// 3. A BadRequest error.
operation GreetingWithErrors {
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError, CustomCodeError]
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ CustomCodeError
+ ]
}
apply GreetingWithErrors @httpResponseTests([
{
- id: "QueryGreetingWithErrors",
- documentation: "Ensures that operations with errors successfully know how to deserialize the successful response",
- protocol: awsQuery,
- code: 200,
- headers: {
- "Content-Type": "text/xml"
- },
+ id: "QueryGreetingWithErrors"
+ documentation: "Ensures that operations with errors successfully know how to deserialize the successful response"
+ protocol: awsQuery
+ code: 200
+ headers: { "Content-Type": "text/xml" }
body: """
-
-
- Hello
-
-
- """,
- bodyMediaType: "application/xml",
- params: {
- greeting: "Hello"
- }
+
+
+ Hello
+
+
+ """
+ bodyMediaType: "application/xml"
+ params: { greeting: "Hello" }
}
])
structure GreetingWithErrorsOutput {
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "QueryInvalidGreetingError",
- documentation: "Parses simple XML errors",
- protocol: awsQuery,
- params: {
- Message: "Hi"
- },
- code: 400,
- headers: {
- "Content-Type": "text/xml"
- },
+ id: "QueryInvalidGreetingError"
+ documentation: "Parses simple XML errors"
+ protocol: awsQuery
+ params: { Message: "Hi" }
+ code: 400
+ headers: { "Content-Type": "text/xml" }
body: """
-
-
- Sender
- InvalidGreeting
- Hi
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
+
+
+ Sender
+ InvalidGreeting
+ Hi
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
}
])
/// This error is thrown when a request is invalid.
@error("client")
structure ComplexError {
- TopLevel: String,
-
- Nested: ComplexNestedErrorData,
+ TopLevel: String
+ Nested: ComplexNestedErrorData
}
apply ComplexError @httpResponseTests([
{
- id: "QueryComplexError",
- protocol: awsQuery,
+ id: "QueryComplexError"
+ protocol: awsQuery
params: {
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 400,
- headers: {
- "Content-Type": "text/xml"
- },
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 400
+ headers: { "Content-Type": "text/xml" }
body: """
-
-
- Sender
- ComplexError
- Top level
-
- bar
-
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
+
+
+ Sender
+ ComplexError
+ Top level
+
+ bar
+
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
}
])
structure ComplexNestedErrorData {
- Foo: String,
+ Foo: String
}
-@awsQueryError(
- code: "Customized",
- httpResponseCode: 402,
-)
+@awsQueryError(code: "Customized", httpResponseCode: 402)
@error("client")
structure CustomCodeError {
- Message: String,
+ Message: String
}
apply CustomCodeError @httpResponseTests([
{
- id: "QueryCustomizedError",
- documentation: "Parses customized XML errors",
- protocol: awsQuery,
- params: {
- Message: "Hi"
- },
- code: 402,
- headers: {
- "Content-Type": "text/xml"
- },
+ id: "QueryCustomizedError"
+ documentation: "Parses customized XML errors"
+ protocol: awsQuery
+ params: { Message: "Hi" }
+ code: 402
+ headers: { "Content-Type": "text/xml" }
body: """
-
-
- Sender
- Customized
- Hi
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
+
+
+ Sender
+ Customized
+ Hi
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
}
])
diff --git a/smithy-aws-protocol-tests/model/awsQuery/xml-lists.smithy b/smithy-aws-protocol-tests/model/awsQuery/xml-lists.smithy
index be3c8981869..413d538b082 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/xml-lists.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/xml-lists.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize lists in XML documents.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -31,102 +30,103 @@ operation XmlLists {
apply XmlLists @httpResponseTests([
{
- id: "QueryXmlLists",
- documentation: "Tests for XML list serialization",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlLists"
+ documentation: "Tests for XML list serialization"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
- foo
- bar
-
-
- foo
- bar
-
-
- 1
- 2
-
-
- true
- false
-
-
- 2014-04-29T18:30:38Z
- 2014-04-29T18:30:38Z
-
-
- Foo
- 0
-
-
- 1
- 2
-
-
-
- foo
- bar
-
-
- baz
- qux
-
-
-
- - foo
- - bar
-
- hi
- bye
- yep
- nope
- a
- b
- a
- b
-
- -
- 1
- 2
-
- -
- 3
- 4
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+ foo
+ bar
+
+
+ foo
+ bar
+
+
+ 1
+ 2
+
+
+ true
+ false
+
+
+ 2014-04-29T18:30:38Z
+ 2014-04-29T18:30:38Z
+
+
+ Foo
+ 0
+
+
+ 1
+ 2
+
+
+
+ foo
+ bar
+
+
+ baz
+ qux
+
+
+
+ - foo
+ - bar
+
+ hi
+ bye
+ yep
+ nope
+ a
+ b
+ a
+ b
+
+ -
+ 1
+ 2
+
+ -
+ 3
+ 4
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- stringList: ["foo", "bar"],
- stringSet: ["foo", "bar"],
- integerList: [1, 2],
- booleanList: [true, false],
- timestampList: [1398796238, 1398796238],
- enumList: ["Foo", "0"],
- intEnumList: [1, 2],
- nestedStringList: [["foo", "bar"], ["baz", "qux"]],
- renamedListMembers: ["foo", "bar"],
- flattenedList: ["hi", "bye"],
- flattenedList2: ["yep", "nope"],
- flattenedListWithMemberNamespace: ["a", "b"],
- flattenedListWithNamespace: ["a", "b"],
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ renamedListMembers: ["foo", "bar"]
+ flattenedList: ["hi", "bye"]
+ flattenedList2: ["yep", "nope"]
+ flattenedListWithMemberNamespace: ["a", "b"]
+ flattenedListWithNamespace: ["a", "b"]
structureList: [
{
- a: "1",
- b: "2",
- },
+ a: "1"
+ b: "2"
+ }
{
- a: "3",
- b: "4",
+ a: "3"
+ b: "4"
}
]
}
@@ -141,70 +141,68 @@ operation XmlEmptyLists {
apply XmlEmptyLists @httpResponseTests([
{
- id: "QueryXmlEmptyLists",
- documentation: "Deserializes empty XML lists",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlEmptyLists"
+ documentation: "Deserializes empty XML lists"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- stringList: [],
- stringSet: [],
- },
- appliesTo: "client",
+ stringList: []
+ stringSet: []
+ }
+ appliesTo: "client"
}
])
structure XmlListsOutput {
- stringList: StringList,
+ stringList: StringList
- stringSet: StringSet,
+ stringSet: StringSet
- integerList: IntegerList,
+ integerList: IntegerList
- booleanList: BooleanList,
+ booleanList: BooleanList
- timestampList: TimestampList,
+ timestampList: TimestampList
- enumList: FooEnumList,
+ enumList: FooEnumList
- intEnumList: IntegerEnumList,
+ intEnumList: IntegerEnumList
- nestedStringList: NestedStringList,
+ nestedStringList: NestedStringList
@xmlName("renamed")
- renamedListMembers: RenamedListMembers,
+ renamedListMembers: RenamedListMembers
@xmlFlattened
// The xmlname on the targeted list is ignored, and the member name is used.
- flattenedList: RenamedListMembers,
+ flattenedList: RenamedListMembers
@xmlName("customName")
@xmlFlattened
// the xmlName trait on the targeted list's member is ignored when
// serializing flattened lists in structures.
- flattenedList2: RenamedListMembers,
+ flattenedList2: RenamedListMembers
// The XML namespace of the flattened list's member is used, and
// list's XML namespace is disregarded.
@xmlFlattened
- flattenedListWithMemberNamespace: ListWithMemberNamespace,
+ flattenedListWithMemberNamespace: ListWithMemberNamespace
// Again, the XML namespace of the flattened list is ignored.
// The namespace of the member is used, which is empty, so
// no xmlns attribute appears on the serialized XML.
@xmlFlattened
- flattenedListWithNamespace: ListWithNamespace,
+ flattenedListWithNamespace: ListWithNamespace
@xmlName("myStructureList")
structureList: StructureList
@@ -212,29 +210,29 @@ structure XmlListsOutput {
list RenamedListMembers {
@xmlName("item")
- member: String,
+ member: String
}
list StructureList {
@xmlName("item")
- member: StructureListMember,
+ member: StructureListMember
}
structure StructureListMember {
@xmlName("value")
- a: String,
+ a: String
@xmlName("other")
- b: String,
+ b: String
}
@xmlNamespace(uri: "https://xml-list.example.com")
list ListWithMemberNamespace {
@xmlNamespace(uri: "https://xml-member.example.com")
- member: String,
+ member: String
}
@xmlNamespace(uri: "https://xml-list.example.com")
list ListWithNamespace {
- member: String,
+ member: String
}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/xml-maps.smithy b/smithy-aws-protocol-tests/model/awsQuery/xml-maps.smithy
index 84cb681b62f..401f1b985d0 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/xml-maps.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/xml-maps.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize maps in XML payloads.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -16,42 +15,36 @@ operation XmlMaps {
apply XmlMaps @httpResponseTests([
{
- id: "QueryXmlMaps",
- documentation: "Tests for XML map serialization",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlMaps"
+ documentation: "Tests for XML map serialization"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
- foo
-
- there
-
-
-
- baz
-
- bye
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+
+ foo
+
+ there
+
+
+
+ baz
+
+ bye
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
myMap: {
- foo: {
- hi: "there"
- },
- baz: {
- hi: "bye"
- }
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
}
@@ -65,57 +58,52 @@ operation XmlEmptyMaps {
apply XmlEmptyMaps @httpResponseTests([
{
- id: "QueryXmlEmptyMaps",
- documentation: "Deserializes Empty XML maps",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlEmptyMaps"
+ documentation: "Deserializes Empty XML maps"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
myMap: {}
- },
- appliesTo: "client",
- },
+ }
+ appliesTo: "client"
+ }
{
- id: "QueryXmlEmptySelfClosedMaps",
- documentation: "Deserializes Self-Closed XML maps",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlEmptySelfClosedMaps"
+ documentation: "Deserializes Self-Closed XML maps"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
myMap: {}
- },
- appliesTo: "client",
+ }
+ appliesTo: "client"
}
])
-
structure XmlMapsOutput {
- myMap: XmlMapsOutputMap,
+ myMap: XmlMapsOutputMap
}
map XmlMapsOutputMap {
- key: String,
+ key: String
value: GreetingStruct
}
@@ -126,54 +114,48 @@ operation XmlMapsXmlName {
apply XmlMapsXmlName @httpResponseTests([
{
- id: "QueryQueryXmlMapsXmlName",
- documentation: "Serializes XML lists",
- protocol: awsQuery,
- code: 200,
+ id: "QueryQueryXmlMapsXmlName"
+ documentation: "Serializes XML lists"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
- foo
-
- there
-
-
-
- baz
-
- bye
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+
+ foo
+
+ there
+
+
+
+ baz
+
+ bye
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
myMap: {
- foo: {
- hi: "there"
- },
- baz: {
- hi: "bye"
- }
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
}
])
structure XmlMapsXmlNameOutput {
- myMap: XmlMapsXmlNameOutputMap,
+ myMap: XmlMapsXmlNameOutputMap
}
map XmlMapsXmlNameOutputMap {
@xmlName("Attribute")
- key: String,
+ key: String
@xmlName("Setting")
value: GreetingStruct
@@ -186,39 +168,34 @@ operation FlattenedXmlMap {
apply FlattenedXmlMap @httpResponseTests([
{
- id: "QueryQueryFlattenedXmlMap",
- documentation: "Serializes flattened XML maps in responses",
- protocol: awsQuery,
- code: 200,
+ id: "QueryQueryFlattenedXmlMap"
+ documentation: "Serializes flattened XML maps in responses"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
- foo
- Foo
-
-
- baz
- Baz
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+ foo
+ Foo
+
+
+ baz
+ Baz
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- myMap: {
- foo: "Foo",
- baz: "Baz"
- }
+ myMap: { foo: "Foo", baz: "Baz" }
}
}
])
structure FlattenedXmlMapOutput {
@xmlFlattened
- myMap: FooEnumMap,
+ myMap: FooEnumMap
}
/// Flattened maps with @xmlName
@@ -228,32 +205,27 @@ operation FlattenedXmlMapWithXmlName {
apply FlattenedXmlMapWithXmlName @httpResponseTests([
{
- id: "QueryQueryFlattenedXmlMapWithXmlName",
- documentation: "Serializes flattened XML maps in responses that have xmlName on members",
- protocol: awsQuery,
- code: 200,
+ id: "QueryQueryFlattenedXmlMapWithXmlName"
+ documentation: "Serializes flattened XML maps in responses that have xmlName on members"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
- a
- A
-
-
- b
- B
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+ a
+ A
+
+
+ b
+ B
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
@@ -261,15 +233,15 @@ apply FlattenedXmlMapWithXmlName @httpResponseTests([
structure FlattenedXmlMapWithXmlNameOutput {
@xmlFlattened
@xmlName("KVP")
- myMap: FlattenedXmlMapWithXmlNameOutputMap,
+ myMap: FlattenedXmlMapWithXmlNameOutputMap
}
map FlattenedXmlMapWithXmlNameOutputMap {
@xmlName("K")
- key: String,
+ key: String
@xmlName("V")
- value: String,
+ value: String
}
/// Flattened maps with @xmlNamespace and @xmlName
@@ -279,32 +251,27 @@ operation FlattenedXmlMapWithXmlNamespace {
apply FlattenedXmlMapWithXmlNamespace @httpResponseTests([
{
- id: "QueryQueryFlattenedXmlMapWithXmlNamespace",
- documentation: "Serializes flattened XML maps in responses that have xmlNamespace and xmlName on members",
- protocol: awsQuery,
- code: 200,
+ id: "QueryQueryFlattenedXmlMapWithXmlNamespace"
+ documentation: "Serializes flattened XML maps in responses that have xmlNamespace and xmlName on members"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
- a
- A
-
-
- b
- B
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+ a
+ A
+
+
+ b
+ B
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
@@ -313,15 +280,15 @@ structure FlattenedXmlMapWithXmlNamespaceOutput {
@xmlFlattened
@xmlName("KVP")
@xmlNamespace(uri: "https://the-member.example.com")
- myMap: FlattenedXmlMapWithXmlNamespaceOutputMap,
+ myMap: FlattenedXmlMapWithXmlNamespaceOutputMap
}
map FlattenedXmlMapWithXmlNamespaceOutputMap {
@xmlName("K")
@xmlNamespace(uri: "https://the-key.example.com")
- key: String,
+ key: String
@xmlName("V")
@xmlNamespace(uri: "https://the-value.example.com")
- value: String,
+ value: String
}
diff --git a/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy b/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy
index a496c5660ab..3cdc6fdb871 100644
--- a/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy
+++ b/smithy-aws-protocol-tests/model/awsQuery/xml-structs.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize XML output structures.
-
$version: "2.0"
namespace aws.protocoltests.query
@@ -9,13 +8,13 @@ use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
-use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#FooEnumSet
+use aws.protocoltests.shared#HttpDate
use aws.protocoltests.shared#IntegerEnum
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#IntegerEnumSet
use aws.protocoltests.shared#IntegerEnumMap
-use aws.protocoltests.shared#HttpDate
+use aws.protocoltests.shared#IntegerEnumSet
use smithy.test#httpResponseTests
// This example serializes simple scalar types in the top level XML document.
@@ -26,124 +25,104 @@ operation SimpleScalarXmlProperties {
apply SimpleScalarXmlProperties @httpResponseTests([
{
- id: "QuerySimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: awsQuery,
- code: 200,
+ id: "QuerySimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- string
-
- true
- false
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- stringValue: "string",
- emptyStringValue: "",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- }
- },
+
+
+ string
+
+ true
+ false
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { stringValue: "string", emptyStringValue: "", trueBooleanValue: true, falseBooleanValue: false, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
{
- id: "AwsQuerySupportsNaNFloatOutputs",
- documentation: "Supports handling NaN float values.",
- protocol: awsQuery,
- code: 200,
+ id: "AwsQuerySupportsNaNFloatOutputs"
+ documentation: "Supports handling NaN float values."
+ protocol: awsQuery
+ code: 200
body: """
-
-
- NaN
- NaN
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+
+
+ NaN
+ NaN
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "AwsQuerySupportsInfinityFloatOutputs",
- documentation: "Supports handling Infinity float values.",
- protocol: awsQuery,
- code: 200,
+ id: "AwsQuerySupportsInfinityFloatOutputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: awsQuery
+ code: 200
body: """
-
-
- Infinity
- Infinity
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+
+
+ Infinity
+ Infinity
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "AwsQuerySupportsNegativeInfinityFloatOutputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: awsQuery,
- code: 200,
+ id: "AwsQuerySupportsNegativeInfinityFloatOutputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: awsQuery
+ code: 200
body: """
-
-
- -Infinity
- -Infinity
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+
+
+ -Infinity
+ -Infinity
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
structure SimpleScalarXmlPropertiesOutput {
- stringValue: String,
- emptyStringValue: String,
- trueBooleanValue: Boolean,
- falseBooleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
+ stringValue: String
+
+ emptyStringValue: String
+
+ trueBooleanValue: Boolean
+
+ falseBooleanValue: Boolean
+
+ byteValue: Byte
+
+ shortValue: Short
+
+ integerValue: Integer
+
+ longValue: Long
+
+ floatValue: Float
@xmlName("DoubleDribble")
- doubleValue: Double,
+ doubleValue: Double
}
/// Blobs are base64 encoded
@@ -153,24 +132,20 @@ operation XmlBlobs {
apply XmlBlobs @httpResponseTests([
{
- id: "QueryXmlBlobs",
- documentation: "Blobs are base64 encoded",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlBlobs"
+ documentation: "Blobs are base64 encoded"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- dmFsdWU=
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- data: "value"
- }
+
+
+ dmFsdWU=
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { data: "value" }
}
])
@@ -182,46 +157,38 @@ operation XmlEmptyBlobs {
apply XmlEmptyBlobs @httpResponseTests([
{
- id: "QueryXmlEmptyBlobs",
- documentation: "Empty blobs are deserialized as empty string",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlEmptyBlobs"
+ documentation: "Empty blobs are deserialized as empty string"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- data: ""
- },
- appliesTo: "client",
- },
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { data: "" }
+ appliesTo: "client"
+ }
{
- id: "QueryXmlEmptySelfClosedBlobs",
- documentation: "Empty self closed blobs are deserialized as empty string",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlEmptySelfClosedBlobs"
+ documentation: "Empty self closed blobs are deserialized as empty string"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- data: ""
- },
- appliesTo: "client",
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { data: "" }
+ appliesTo: "client"
}
])
@@ -238,164 +205,136 @@ operation XmlTimestamps {
apply XmlTimestamps @httpResponseTests([
{
- id: "QueryXmlTimestamps",
- documentation: "Tests how normal timestamps are serialized",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestamps"
+ documentation: "Tests how normal timestamps are serialized"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 2014-04-29T18:30:38Z
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- normal: 1398796238
- }
- },
+
+
+ 2014-04-29T18:30:38Z
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { normal: 1398796238 }
+ }
{
- id: "QueryXmlTimestampsWithDateTimeFormat",
- documentation: "Ensures that the timestampFormat of date-time works like normal timestamps",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestampsWithDateTimeFormat"
+ documentation: "Ensures that the timestampFormat of date-time works like normal timestamps"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 2014-04-29T18:30:38Z
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- dateTime: 1398796238
- }
- },
+
+
+ 2014-04-29T18:30:38Z
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { dateTime: 1398796238 }
+ }
{
- id: "QueryXmlTimestampsWithDateTimeOnTargetFormat",
- documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestampsWithDateTimeOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 2014-04-29T18:30:38Z
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- dateTimeOnTarget: 1398796238
- }
- },
+
+
+ 2014-04-29T18:30:38Z
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { dateTimeOnTarget: 1398796238 }
+ }
{
- id: "QueryXmlTimestampsWithEpochSecondsFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds works",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestampsWithEpochSecondsFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds works"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 1398796238
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- epochSeconds: 1398796238
- }
- },
+
+
+ 1398796238
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { epochSeconds: 1398796238 }
+ }
{
- id: "QueryXmlTimestampsWithEpochSecondsOnTargetFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestampsWithEpochSecondsOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 1398796238
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- epochSecondsOnTarget: 1398796238
- }
- },
+
+
+ 1398796238
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { epochSecondsOnTarget: 1398796238 }
+ }
{
- id: "QueryXmlTimestampsWithHttpDateFormat",
- documentation: "Ensures that the timestampFormat of http-date works",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestampsWithHttpDateFormat"
+ documentation: "Ensures that the timestampFormat of http-date works"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- Tue, 29 Apr 2014 18:30:38 GMT
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- httpDate: 1398796238
- }
- },
+
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { httpDate: 1398796238 }
+ }
{
- id: "QueryXmlTimestampsWithHttpDateOnTargetFormat",
- documentation: "Ensures that the timestampFormat of http-date on the target shape works",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlTimestampsWithHttpDateOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- Tue, 29 Apr 2014 18:30:38 GMT
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- httpDateOnTarget: 1398796238
- }
- },
+
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { httpDateOnTarget: 1398796238 }
+ }
])
structure XmlTimestampsOutput {
- normal: Timestamp,
+ normal: Timestamp
@timestampFormat("date-time")
- dateTime: Timestamp,
+ dateTime: Timestamp
- dateTimeOnTarget: DateTime,
+ dateTimeOnTarget: DateTime
@timestampFormat("epoch-seconds")
- epochSeconds: Timestamp,
+ epochSeconds: Timestamp
- epochSecondsOnTarget: EpochSeconds,
+ epochSecondsOnTarget: EpochSeconds
@timestampFormat("http-date")
- httpDate: Timestamp,
+ httpDate: Timestamp
- httpDateOnTarget: HttpDate,
+ httpDateOnTarget: HttpDate
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
@@ -405,62 +344,57 @@ operation XmlEnums {
apply XmlEnums @httpResponseTests([
{
- id: "QueryXmlEnums",
- documentation: "Serializes simple scalar properties",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- Foo
- 0
- 1
-
- Foo
- 0
-
-
- Foo
- 0
-
-
-
- hi
- Foo
-
-
- zero
- 0
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+ Foo
+ 0
+ 1
+
+ Foo
+ 0
+
+
+ Foo
+ 0
+
+
+
+ hi
+ Foo
+
+
+ zero
+ 0
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
structure XmlEnumsOutput {
- fooEnum1: FooEnum,
- fooEnum2: FooEnum,
- fooEnum3: FooEnum,
- fooEnumList: FooEnumList,
- fooEnumSet: FooEnumSet,
- fooEnumMap: FooEnumMap,
+ fooEnum1: FooEnum
+ fooEnum2: FooEnum
+ fooEnum3: FooEnum
+ fooEnumList: FooEnumList
+ fooEnumSet: FooEnumSet
+ fooEnumMap: FooEnumMap
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
@@ -470,62 +404,57 @@ operation XmlIntEnums {
apply XmlIntEnums @httpResponseTests([
{
- id: "QueryXmlIntEnums",
- documentation: "Serializes simple scalar properties",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlIntEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- 1
- 2
- 3
-
- 1
- 2
-
-
- 1
- 2
-
-
-
- a
- 1
-
-
- b
- 2
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+ 1
+ 2
+ 3
+
+ 1
+ 2
+
+
+ 1
+ 2
+
+
+
+ a
+ 1
+
+
+ b
+ 2
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- intEnum1: 1,
- intEnum2: 2,
- intEnum3: 3,
- intEnumList: [1, 2],
- intEnumSet: [1, 2],
- intEnumMap: {
- "a": 1,
- "b": 2
- }
+ intEnum1: 1
+ intEnum2: 2
+ intEnum3: 3
+ intEnumList: [1, 2]
+ intEnumSet: [1, 2]
+ intEnumMap: { a: 1, b: 2 }
}
}
])
structure XmlIntEnumsOutput {
- intEnum1: IntegerEnum,
- intEnum2: IntegerEnum,
- intEnum3: IntegerEnum,
- intEnumList: IntegerEnumList,
- intEnumSet: IntegerEnumSet,
- intEnumMap: IntegerEnumMap,
+ intEnum1: IntegerEnum
+ intEnum2: IntegerEnum
+ intEnum3: IntegerEnum
+ intEnumList: IntegerEnumList
+ intEnumSet: IntegerEnumSet
+ intEnumMap: IntegerEnumMap
}
/// Recursive shapes
@@ -535,42 +464,38 @@ operation RecursiveXmlShapes {
apply RecursiveXmlShapes @httpResponseTests([
{
- id: "QueryRecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: awsQuery,
- code: 200,
+ id: "QueryRecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
- Foo1
-
- Bar1
-
- Foo2
-
- Bar2
-
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+ Foo1
+
+ Bar1
+
+ Foo2
+
+ Bar2
+
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -583,13 +508,13 @@ structure RecursiveXmlShapesOutput {
}
structure RecursiveXmlShapesOutputNested1 {
- foo: String,
+ foo: String
nested: RecursiveXmlShapesOutputNested2
}
structure RecursiveXmlShapesOutputNested2 {
- bar: String,
- recursiveMember: RecursiveXmlShapesOutputNested1,
+ bar: String
+ recursiveMember: RecursiveXmlShapesOutputNested1
}
// XML namespace
@@ -599,34 +524,29 @@ operation XmlNamespaces {
apply XmlNamespaces @httpResponseTests([
{
- id: "QueryXmlNamespaces",
- documentation: "Serializes XML namespaces",
- protocol: awsQuery,
- code: 200,
+ id: "QueryXmlNamespaces"
+ documentation: "Serializes XML namespaces"
+ protocol: awsQuery
+ code: 200
body: """
-
-
-
- Foo
-
- Bar
- Baz
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
nested: {
- foo: "Foo",
- values: [
- "Bar",
- "Baz"
- ]
+ foo: "Foo"
+ values: ["Bar", "Baz"]
}
}
}
@@ -643,7 +563,7 @@ structure XmlNamespacesOutput {
@xmlNamespace(uri: "http://boo.com")
structure XmlNamespaceNested {
@xmlNamespace(uri: "http://baz.com", prefix: "baz")
- foo: String,
+ foo: String
@xmlNamespace(uri: "http://qux.com")
values: XmlNamespacedList
@@ -651,7 +571,7 @@ structure XmlNamespaceNested {
list XmlNamespacedList {
@xmlNamespace(uri: "http://bux.com")
- member: String,
+ member: String
}
/// The xmlName trait on the output structure is ignored in AWS Query.
@@ -664,24 +584,20 @@ operation IgnoresWrappingXmlName {
apply IgnoresWrappingXmlName @httpResponseTests([
{
- id: "QueryIgnoresWrappingXmlName",
- documentation: "The xmlName trait on the output structure is ignored in AWS Query",
- protocol: awsQuery,
- code: 200,
+ id: "QueryIgnoresWrappingXmlName"
+ documentation: "The xmlName trait on the output structure is ignored in AWS Query"
+ protocol: awsQuery
+ code: 200
body: """
-
-
- bar
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
- params: {
- foo: "bar"
- }
+
+
+ bar
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
+ params: { foo: "bar" }
}
])
diff --git a/smithy-aws-protocol-tests/model/ec2Query/datetime-offsets.smithy b/smithy-aws-protocol-tests/model/ec2Query/datetime-offsets.smithy
index 74550913cb4..87f7e36a686 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/datetime-offsets.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/datetime-offsets.smithy
@@ -15,39 +15,35 @@ operation DatetimeOffsets {
apply DatetimeOffsets @httpResponseTests([
{
- id: "Ec2QueryDateTimeWithNegativeOffset",
+ id: "Ec2QueryDateTimeWithNegativeOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: ec2Query,
- code: 200,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: ec2Query
+ code: 200
body: """
-
- 2019-12-16T22:48:18-01:00
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+ 2019-12-16T22:48:18-01:00
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: { datetime: 1576540098 }
- },
+ }
{
- id: "Ec2QueryDateTimeWithPositiveOffset",
+ id: "Ec2QueryDateTimeWithPositiveOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: ec2Query,
- code: 200,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: ec2Query
+ code: 200
body: """
-
- 2019-12-17T00:48:18+01:00
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+ 2019-12-17T00:48:18+01:00
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: { datetime: 1576540098 }
}
])
diff --git a/smithy-aws-protocol-tests/model/ec2Query/empty-input-output.smithy b/smithy-aws-protocol-tests/model/ec2Query/empty-input-output.smithy
index 5cf2a1b6c3e..a1b8f8a5108 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/empty-input-output.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/empty-input-output.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test the basics of empty input and
// output shape serialization.
-
$version: "2.0"
namespace aws.protocoltests.ec2
@@ -19,34 +18,30 @@ operation NoInputAndOutput {
apply NoInputAndOutput @httpRequestTests([
{
- id: "Ec2QueryNoInputAndOutput",
- documentation: "No input serializes no payload",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=NoInputAndOutput&Version=2020-01-08",
+ id: "Ec2QueryNoInputAndOutput"
+ documentation: "No input serializes no payload"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=NoInputAndOutput&Version=2020-01-08"
bodyMediaType: "application/x-www-form-urlencoded"
}
])
apply NoInputAndOutput @httpResponseTests([
{
- id: "Ec2QueryNoInputAndOutput",
- documentation: "Empty output",
- protocol: ec2Query,
- code: 200,
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+ id: "Ec2QueryNoInputAndOutput"
+ documentation: "Empty output"
+ protocol: ec2Query
+ code: 200
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
body: """
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
}
])
@@ -57,42 +52,39 @@ structure NoInputAndOutputOutput {}
///
/// While this should be rare, code generators must support this.
operation EmptyInputAndEmptyOutput {
- input: EmptyInputAndEmptyOutputInput,
+ input: EmptyInputAndEmptyOutputInput
output: EmptyInputAndEmptyOutputOutput
}
apply EmptyInputAndEmptyOutput @httpRequestTests([
{
- id: "Ec2QueryEmptyInputAndEmptyOutput",
- documentation: "Empty input serializes no extra query params",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=EmptyInputAndEmptyOutput&Version=2020-01-08",
+ id: "Ec2QueryEmptyInputAndEmptyOutput"
+ documentation: "Empty input serializes no extra query params"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=EmptyInputAndEmptyOutput&Version=2020-01-08"
bodyMediaType: "application/x-www-form-urlencoded"
- },
+ }
])
apply EmptyInputAndEmptyOutput @httpResponseTests([
{
- id: "Ec2QueryEmptyInputAndEmptyOutput",
- documentation: "Empty output",
- protocol: ec2Query,
- code: 200,
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+ id: "Ec2QueryEmptyInputAndEmptyOutput"
+ documentation: "Empty output"
+ protocol: ec2Query
+ code: 200
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
body: """
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- },
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ }
])
structure EmptyInputAndEmptyOutputInput {}
+
structure EmptyInputAndEmptyOutputOutput {}
diff --git a/smithy-aws-protocol-tests/model/ec2Query/endpoint-paths.smithy b/smithy-aws-protocol-tests/model/ec2Query/endpoint-paths.smithy
index e129bcc264f..53cf77a60ac 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/endpoint-paths.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/endpoint-paths.smithy
@@ -1,5 +1,4 @@
// This file defines tests to ensure that implementations support endpoints with paths
-
$version: "2.0"
namespace aws.protocoltests.ec2
@@ -9,16 +8,15 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "Ec2QueryHostWithPath",
+ id: "Ec2QueryHostWithPath"
documentation: """
- Custom endpoints supplied by users can have paths""",
- protocol: ec2Query,
- method: "POST",
- uri: "/custom/",
- body: "Action=HostWithPathOperation&Version=2020-01-08",
- host: "example.com/custom",
+ Custom endpoints supplied by users can have paths"""
+ protocol: ec2Query
+ method: "POST"
+ uri: "/custom/"
+ body: "Action=HostWithPathOperation&Version=2020-01-08"
+ host: "example.com/custom"
appliesTo: "client"
}
])
-
operation HostWithPathOperation {}
diff --git a/smithy-aws-protocol-tests/model/ec2Query/endpoints.smithy b/smithy-aws-protocol-tests/model/ec2Query/endpoints.smithy
index 8b09e3287c5..7272e86b333 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/endpoints.smithy
@@ -1,6 +1,5 @@
// This file defines tests to ensure that implementations support the endpoint
// trait and other features that modify the host.
-
$version: "2.0"
namespace aws.protocoltests.ec2
@@ -10,55 +9,48 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "Ec2QueryEndpointTrait",
+ id: "Ec2QueryEndpointTrait"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait.""",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=EndpointOperation&Version=2020-01-08",
- bodyMediaType: "application/x-www-form-urlencoded",
- host: "example.com",
- resolvedHost: "foo.example.com",
+ Operations can prepend to the given host if they define the
+ endpoint trait."""
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=EndpointOperation&Version=2020-01-08"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ host: "example.com"
+ resolvedHost: "foo.example.com"
}
])
@endpoint(hostPrefix: "foo.")
operation EndpointOperation {}
-
@httpRequestTests([
{
- id: "Ec2QueryEndpointTraitWithHostLabel",
+ id: "Ec2QueryEndpointTraitWithHostLabel"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input.""",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=EndpointWithHostLabelOperation&Version=2020-01-08&Label=bar",
- bodyMediaType: "application/x-www-form-urlencoded",
- host: "example.com",
- resolvedHost: "foo.bar.example.com",
- params: {
- label: "bar",
- },
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input."""
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=EndpointWithHostLabelOperation&Version=2020-01-08&Label=bar"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ host: "example.com"
+ resolvedHost: "foo.bar.example.com"
+ params: { label: "bar" }
}
])
@endpoint(hostPrefix: "foo.{label}.")
operation EndpointWithHostLabelOperation {
- input: HostLabelInput,
+ input: HostLabelInput
}
structure HostLabelInput {
@required
@hostLabel
- label: String,
+ label: String
}
diff --git a/smithy-aws-protocol-tests/model/ec2Query/fractional-seconds.smithy b/smithy-aws-protocol-tests/model/ec2Query/fractional-seconds.smithy
index bbda602b730..2a63d832a75 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/fractional-seconds.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/fractional-seconds.smithy
@@ -14,21 +14,19 @@ operation FractionalSeconds {
apply FractionalSeconds @httpResponseTests([
{
- id: "Ec2QueryDateTimeWithFractionalSeconds",
+ id: "Ec2QueryDateTimeWithFractionalSeconds"
documentation: """
- Ensures that clients can correctly parse datetime timestamps with fractional seconds""",
- protocol: ec2Query,
- code: 200,
+ Ensures that clients can correctly parse datetime timestamps with fractional seconds"""
+ protocol: ec2Query
+ code: 200
body: """
-
- 2000-01-02T20:34:56.123Z
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+ 2000-01-02T20:34:56.123Z
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: { datetime: 946845296.123 }
}
])
diff --git a/smithy-aws-protocol-tests/model/ec2Query/input-lists.smithy b/smithy-aws-protocol-tests/model/ec2Query/input-lists.smithy
index 07eeb8ee274..d756481708b 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/input-lists.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/input-lists.smithy
@@ -1,12 +1,9 @@
// This file defines test cases that test list query serialization.
-
$version: "2.0"
namespace aws.protocoltests.ec2
use aws.protocols#ec2Query
-use aws.protocoltests.shared#EpochSeconds
-use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#GreetingList
use aws.protocoltests.shared#StringList
use smithy.test#httpRequestTests
@@ -18,103 +15,94 @@ operation QueryLists {
apply QueryLists @httpRequestTests([
{
- id: "Ec2Lists",
- documentation: "Serializes query lists. All EC2 lists are flattened.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&ComplexListArg.1.Hi=hello&ComplexListArg.2.Hi=hola",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "Ec2Lists"
+ documentation: "Serializes query lists. All EC2 lists are flattened."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&ComplexListArg.1.Hi=hello&ComplexListArg.2.Hi=hola"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
- ListArg: ["foo", "bar", "baz"],
+ ListArg: ["foo", "bar", "baz"]
ComplexListArg: [
{
hi: "hello"
- },
+ }
{
hi: "hola"
}
]
}
- },
+ }
{
- id: "Ec2EmptyQueryLists",
- documentation: "Serializes empty query lists",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&ListArg=",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "Ec2EmptyQueryLists"
+ documentation: "Serializes empty query lists"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&ListArg="
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
ListArg: []
}
- },
+ }
{
- id: "Ec2ListArgWithXmlNameMember",
- documentation: "An xmlName trait in the member of a list has no effect on the list serialization.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&ListArgWithXmlNameMember.1=A&ListArgWithXmlNameMember.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "Ec2ListArgWithXmlNameMember"
+ documentation: "An xmlName trait in the member of a list has no effect on the list serialization."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&ListArgWithXmlNameMember.1=A&ListArgWithXmlNameMember.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
ListArgWithXmlNameMember: ["A", "B"]
}
- },
+ }
{
- id: "Ec2ListMemberWithXmlName",
- documentation: "Changes the name of the list using the xmlName trait",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&Hi.1=A&Hi.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "Ec2ListMemberWithXmlName"
+ documentation: "Changes the name of the list using the xmlName trait"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&Hi.1=A&Hi.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
ListArgWithXmlName: ["A", "B"]
}
- },
+ }
{
- id: "Ec2ListNestedStructWithList",
- documentation: "Nested structure with a list member",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- body: "Action=QueryLists&Version=2020-01-08&NestedWithList.ListArg.1=A&NestedWithList.ListArg.2=B",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "Ec2ListNestedStructWithList"
+ documentation: "Nested structure with a list member"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ body: "Action=QueryLists&Version=2020-01-08&NestedWithList.ListArg.1=A&NestedWithList.ListArg.2=B"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
NestedWithList: {
ListArg: ["A", "B"]
}
}
- },
+ }
])
structure QueryListsInput {
- ListArg: StringList,
- ComplexListArg: GreetingList,
+ ListArg: StringList
+
+ ComplexListArg: GreetingList
// Notice that the xmlName on the targeted list member is ignored.
- ListArgWithXmlNameMember: ListWithXmlName,
+ ListArgWithXmlNameMember: ListWithXmlName
@xmlName("Hi")
- ListArgWithXmlName: ListWithXmlName,
+ ListArgWithXmlName: ListWithXmlName
- NestedWithList: NestedStructWithList,
+ NestedWithList: NestedStructWithList
}
list ListWithXmlName {
diff --git a/smithy-aws-protocol-tests/model/ec2Query/input.smithy b/smithy-aws-protocol-tests/model/ec2Query/input.smithy
index c30d7c26085..f0cf419a0c7 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/input.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/input.smithy
@@ -1,11 +1,10 @@
// This file defines test cases that test the basics of input serialization.
-
$version: "2.0"
namespace aws.protocoltests.ec2
-use aws.protocols#ec2QueryName
use aws.protocols#ec2Query
+use aws.protocols#ec2QueryName
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use smithy.test#httpRequestTests
@@ -17,265 +16,189 @@ operation SimpleInputParams {
apply SimpleInputParams @httpRequestTests([
{
- id: "Ec2SimpleInputParamsStrings",
- documentation: "Serializes strings",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Bar=val2",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Foo: "val1",
- Bar: "val2"
- }
- },
+ id: "Ec2SimpleInputParamsStrings"
+ documentation: "Serializes strings"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Bar=val2"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Foo: "val1", Bar: "val2" }
+ }
{
- id: "Ec2SimpleInputParamsStringAndBooleanTrue",
- documentation: "Serializes booleans that are true",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Baz=true",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Foo: "val1",
- Baz: true,
- }
- },
+ id: "Ec2SimpleInputParamsStringAndBooleanTrue"
+ documentation: "Serializes booleans that are true"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Baz=true"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Foo: "val1", Baz: true }
+ }
{
- id: "Ec2SimpleInputParamsStringsAndBooleanFalse",
- documentation: "Serializes booleans that are false",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Baz=false",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Baz: false,
- }
- },
+ id: "Ec2SimpleInputParamsStringsAndBooleanFalse"
+ documentation: "Serializes booleans that are false"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Baz=false"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Baz: false }
+ }
{
- id: "Ec2SimpleInputParamsInteger",
- documentation: "Serializes integers",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Bam=10",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Bam: 10,
- }
- },
+ id: "Ec2SimpleInputParamsInteger"
+ documentation: "Serializes integers"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Bam=10"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Bam: 10 }
+ }
{
- id: "Ec2SimpleInputParamsFloat",
- documentation: "Serializes floats",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Boo=10.8",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Boo: 10.8,
- }
- },
+ id: "Ec2SimpleInputParamsFloat"
+ documentation: "Serializes floats"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Boo=10.8"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Boo: 10.8 }
+ }
{
- id: "Ec2SimpleInputParamsBlob",
- documentation: "Blobs are base64 encoded in the query string",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&Qux=dmFsdWU%3D",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- Qux: "value",
- }
- },
+ id: "Ec2SimpleInputParamsBlob"
+ documentation: "Blobs are base64 encoded in the query string"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&Qux=dmFsdWU%3D"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { Qux: "value" }
+ }
{
- id: "Ec2Enums",
- documentation: "Serializes enums in the query string",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&FooEnum=Foo",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- FooEnum: "Foo",
- }
- },
+ id: "Ec2Enums"
+ documentation: "Serializes enums in the query string"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&FooEnum=Foo"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { FooEnum: "Foo" }
+ }
{
- id: "Ec2Query",
- documentation: "Serializes query using ec2QueryName trait.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&HasQueryName=Hi",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- HasQueryName: "Hi",
- }
- },
+ id: "Ec2Query"
+ documentation: "Serializes query using ec2QueryName trait."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&HasQueryName=Hi"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { HasQueryName: "Hi" }
+ }
{
- id: "Ec2QueryIsPreferred",
- documentation: "ec2QueryName trait is preferred over xmlName.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&HasQueryAndXmlName=Hi",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- HasQueryAndXmlName: "Hi",
- }
- },
+ id: "Ec2QueryIsPreferred"
+ documentation: "ec2QueryName trait is preferred over xmlName."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&HasQueryAndXmlName=Hi"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { HasQueryAndXmlName: "Hi" }
+ }
{
- id: "Ec2XmlNameIsUppercased",
- documentation: "xmlName is used with the ec2 protocol, but the first character is uppercased",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=SimpleInputParams&Version=2020-01-08&UsesXmlName=Hi",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- UsesXmlName: "Hi",
- }
- },
+ id: "Ec2XmlNameIsUppercased"
+ documentation: "xmlName is used with the ec2 protocol, but the first character is uppercased"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=SimpleInputParams&Version=2020-01-08&UsesXmlName=Hi"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { UsesXmlName: "Hi" }
+ }
{
- id: "Ec2QuerySupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=NaN&Boo=NaN",
- bodyMediaType: "application/x-www-form-urlencoded",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- FloatValue: "NaN",
- Boo: "NaN",
- }
- },
+ id: "Ec2QuerySupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=NaN&Boo=NaN"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ params: { FloatValue: "NaN", Boo: "NaN" }
+ }
{
- id: "Ec2QuerySupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=Infinity&Boo=Infinity",
- bodyMediaType: "application/x-www-form-urlencoded",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- FloatValue: "Infinity",
- Boo: "Infinity",
- }
- },
+ id: "Ec2QuerySupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=Infinity&Boo=Infinity"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ params: { FloatValue: "Infinity", Boo: "Infinity" }
+ }
{
- id: "Ec2QuerySupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=-Infinity&Boo=-Infinity",
- bodyMediaType: "application/x-www-form-urlencoded",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- FloatValue: "-Infinity",
- Boo: "-Infinity",
- }
- },
+ id: "Ec2QuerySupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ body: "Action=SimpleInputParams&Version=2020-01-08&FloatValue=-Infinity&Boo=-Infinity"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ params: { FloatValue: "-Infinity", Boo: "-Infinity" }
+ }
])
structure SimpleInputParamsInput {
- Foo: String,
- Bar: String,
- Baz: Boolean,
- Bam: Integer,
- FloatValue: Float,
- Boo: Double,
- Qux: Blob,
- FooEnum: FooEnum,
+ Foo: String
+
+ Bar: String
+
+ Baz: Boolean
+
+ Bam: Integer
+
+ FloatValue: Float
+
+ Boo: Double
+
+ Qux: Blob
+
+ FooEnum: FooEnum
@ec2QueryName("HasQueryName")
- HasQueryName: String,
+ HasQueryName: String
@ec2QueryName("HasQueryAndXmlName")
@xmlName("hasQueryAndXmlName")
- HasQueryAndXmlName: String,
+ HasQueryAndXmlName: String
@xmlName("usesXmlName")
- UsesXmlName: String,
+ UsesXmlName: String
}
/// This test serializes timestamps.
@@ -289,39 +212,31 @@ operation QueryTimestamps {
apply QueryTimestamps @httpRequestTests([
{
- id: "Ec2TimestampsInput",
- documentation: "Serializes timestamps",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=QueryTimestamps&Version=2020-01-08&NormalFormat=2015-01-25T08%3A00%3A00Z&EpochMember=1422172800&EpochTarget=1422172800",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- normalFormat: 1422172800,
- epochMember: 1422172800,
- epochTarget: 1422172800,
- }
+ id: "Ec2TimestampsInput"
+ documentation: "Serializes timestamps"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=QueryTimestamps&Version=2020-01-08&NormalFormat=2015-01-25T08%3A00%3A00Z&EpochMember=1422172800&EpochTarget=1422172800"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { normalFormat: 1422172800, epochMember: 1422172800, epochTarget: 1422172800 }
}
])
structure QueryTimestampsInput {
// Timestamps are serialized as RFC 3339 date-time values by default.
- normalFormat: Timestamp,
+ normalFormat: Timestamp
// This member has the timestampFormat trait, so it changes the
// timestamp serialization.
@timestampFormat("epoch-seconds")
- epochMember: Timestamp,
+ epochMember: Timestamp
// The targeted shape has the timestampFormat trait, so it changes the
// timestamp serialization.
- epochTarget: EpochSeconds,
+ epochTarget: EpochSeconds
}
/// This test serializes nested and recursive structure members.
@@ -331,39 +246,33 @@ operation NestedStructures {
apply NestedStructures @httpRequestTests([
{
- id: "Ec2NestedStructures",
- documentation: "Serializes nested structures using dots",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=NestedStructures&Version=2020-01-08&Nested.StringArg=foo&Nested.OtherArg=true&Nested.RecursiveArg.StringArg=baz",
- bodyMediaType: "application/x-www-form-urlencoded",
+ id: "Ec2NestedStructures"
+ documentation: "Serializes nested structures using dots"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=NestedStructures&Version=2020-01-08&Nested.StringArg=foo&Nested.OtherArg=true&Nested.RecursiveArg.StringArg=baz"
+ bodyMediaType: "application/x-www-form-urlencoded"
params: {
Nested: {
- StringArg: "foo",
- OtherArg: true,
- RecursiveArg: {
- StringArg: "baz"
- }
+ StringArg: "foo"
+ OtherArg: true
+ RecursiveArg: { StringArg: "baz" }
}
}
}
])
structure NestedStructuresInput {
- Nested: StructArg,
+ Nested: StructArg
}
structure StructArg {
- StringArg: String,
- OtherArg: Boolean,
- RecursiveArg: StructArg,
+ StringArg: String
+ OtherArg: Boolean
+ RecursiveArg: StructArg
}
/// Automatically adds idempotency tokens.
@@ -374,43 +283,33 @@ operation QueryIdempotencyTokenAutoFill {
apply QueryIdempotencyTokenAutoFill @httpRequestTests([
{
- id: "Ec2ProtocolIdempotencyTokenAutoFill",
- documentation: "Automatically adds idempotency token when not set",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&Token=00000000-0000-4000-8000-000000000000",
- bodyMediaType: "application/x-www-form-urlencoded",
- appliesTo: "client",
- },
+ id: "Ec2ProtocolIdempotencyTokenAutoFill"
+ documentation: "Automatically adds idempotency token when not set"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&Token=00000000-0000-4000-8000-000000000000"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ appliesTo: "client"
+ }
{
- id: "Ec2ProtocolIdempotencyTokenAutoFillIsSet",
- documentation: "Uses the given idempotency token as-is",
- protocol: ec2Query,
- method: "POST",
- uri: "/",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- requireHeaders: [
- "Content-Length"
- ],
- body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&Token=00000000-0000-4000-8000-000000000123",
- bodyMediaType: "application/x-www-form-urlencoded",
- params: {
- token: "00000000-0000-4000-8000-000000000123"
- },
- appliesTo: "client",
+ id: "Ec2ProtocolIdempotencyTokenAutoFillIsSet"
+ documentation: "Uses the given idempotency token as-is"
+ protocol: ec2Query
+ method: "POST"
+ uri: "/"
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
+ requireHeaders: ["Content-Length"]
+ body: "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&Token=00000000-0000-4000-8000-000000000123"
+ bodyMediaType: "application/x-www-form-urlencoded"
+ params: { token: "00000000-0000-4000-8000-000000000123" }
+ appliesTo: "client"
}
])
structure QueryIdempotencyTokenAutoFillInput {
@idempotencyToken
- token: String,
+ token: String
}
diff --git a/smithy-aws-protocol-tests/model/ec2Query/main.smithy b/smithy-aws-protocol-tests/model/ec2Query/main.smithy
index 8979870fa9d..8b69f6deaa4 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/main.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/main.smithy
@@ -23,7 +23,6 @@
//
// EC2 errors have an additional level of nesting. See xml-errors.smithy
// for details.
-
$version: "2.0"
namespace aws.protocoltests.ec2
@@ -31,10 +30,7 @@ namespace aws.protocoltests.ec2
use aws.api#service
use aws.auth#sigv4
use aws.protocols#ec2Query
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// An EC2 query service that sends query requests and XML responses.
@service(sdkId: "EC2 Protocol")
@suppress(["SigV4Traits"])
@sigv4(name: "ec2query")
@@ -42,51 +38,42 @@ use smithy.test#httpResponseTests
@xmlNamespace(uri: "https://example.com/")
@title("Sample Ec2 Protocol Service")
service AwsEc2 {
- version: "2020-01-08",
+ version: "2020-01-08"
operations: [
// Basic input and output tests
- NoInputAndOutput,
- EmptyInputAndEmptyOutput,
-
+ NoInputAndOutput
+ EmptyInputAndEmptyOutput
// Input tests
- SimpleInputParams,
- QueryTimestamps,
- NestedStructures,
- QueryLists,
- QueryIdempotencyTokenAutoFill,
-
+ SimpleInputParams
+ QueryTimestamps
+ NestedStructures
+ QueryLists
+ QueryIdempotencyTokenAutoFill
// Output tests
- XmlEmptyBlobs,
-
+ XmlEmptyBlobs
// Output XML list tests
- XmlLists,
- XmlEmptyLists,
-
+ XmlLists
+ XmlEmptyLists
// Output XML structure tests
- SimpleScalarXmlProperties,
- XmlBlobs,
- XmlTimestamps,
- XmlEnums,
- XmlIntEnums,
- RecursiveXmlShapes,
- RecursiveXmlShapes,
- IgnoresWrappingXmlName,
- XmlNamespaces,
-
+ SimpleScalarXmlProperties
+ XmlBlobs
+ XmlTimestamps
+ XmlEnums
+ XmlIntEnums
+ RecursiveXmlShapes
+ RecursiveXmlShapes
+ IgnoresWrappingXmlName
+ XmlNamespaces
// Output error tests
- GreetingWithErrors,
-
+ GreetingWithErrors
// @endpoint and @hostLabel trait tests
- EndpointOperation,
- EndpointWithHostLabelOperation,
-
+ EndpointOperation
+ EndpointWithHostLabelOperation
// custom endpoints with paths
- HostWithPathOperation,
-
+ HostWithPathOperation
// client-only timestamp parsing tests
- DatetimeOffsets,
- FractionalSeconds,
-
+ DatetimeOffsets
+ FractionalSeconds
// requestCompression trait tests
PutWithContentEncoding
]
diff --git a/smithy-aws-protocol-tests/model/ec2Query/requestCompression.smithy b/smithy-aws-protocol-tests/model/ec2Query/requestCompression.smithy
index 402d474936f..3c2af343e30 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/requestCompression.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/requestCompression.smithy
@@ -4,7 +4,6 @@ namespace aws.protocoltests.ec2
use aws.protocols#ec2Query
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
@@ -12,289 +11,285 @@ apply PutWithContentEncoding @httpRequestTests([
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: ec2Query
params: {
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi
- gIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM
- Mb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJ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ltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
{
id: "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query"
documentation: """
- Compression algorithm encoding is appended to the Content-Encoding header, and the
- user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
- traits are ignored in the ec2Query protocol.
- """
+ Compression algorithm encoding is appended to the Content-Encoding header, and the
+ user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
+ traits are ignored in the ec2Query protocol.
+ """
protocol: ec2Query
params: {
- "encoding": "custom"
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi
- gIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM
- Mb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8
- WJO6AcF0Dpt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kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
])
diff --git a/smithy-aws-protocol-tests/model/ec2Query/xml-errors.smithy b/smithy-aws-protocol-tests/model/ec2Query/xml-errors.smithy
index 6710b6b8b98..25251257eaf 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/xml-errors.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/xml-errors.smithy
@@ -17,7 +17,6 @@
// they do not send a element in the error data.
//
// See: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html#api-error-response
-
$version: "2.0"
namespace aws.protocoltests.ec2
@@ -31,110 +30,100 @@ use smithy.test#httpResponseTests
/// 2. An InvalidGreeting error.
/// 3. A BadRequest error.
operation GreetingWithErrors {
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError]
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ ]
}
apply GreetingWithErrors @httpResponseTests([
{
- id: "Ec2GreetingWithErrors",
- documentation: "Ensures that operations with errors successfully know how to deserialize the successful response",
- protocol: ec2Query,
- code: 200,
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+ id: "Ec2GreetingWithErrors"
+ documentation: "Ensures that operations with errors successfully know how to deserialize the successful response"
+ protocol: ec2Query
+ code: 200
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
body: """
-
- Hello
- requestid
-
- """,
- bodyMediaType: "application/xml",
- params: {
- greeting: "Hello"
- }
+
+ Hello
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ params: { greeting: "Hello" }
}
])
structure GreetingWithErrorsOutput {
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "Ec2InvalidGreetingError",
- documentation: "Parses simple XML errors",
- protocol: ec2Query,
- code: 400,
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+ id: "Ec2InvalidGreetingError"
+ documentation: "Parses simple XML errors"
+ protocol: ec2Query
+ code: 400
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
body: """
-
-
-
- InvalidGreeting
- Hi
-
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
- params: {
- Message: "Hi"
- },
+
+
+
+ InvalidGreeting
+ Hi
+
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
+ params: { Message: "Hi" }
}
])
/// This error is thrown when a request is invalid.
@error("client")
structure ComplexError {
- TopLevel: String,
-
- Nested: ComplexNestedErrorData,
+ TopLevel: String
+ Nested: ComplexNestedErrorData
}
apply ComplexError @httpResponseTests([
{
- id: "Ec2ComplexError",
- protocol: ec2Query,
+ id: "Ec2ComplexError"
+ protocol: ec2Query
params: {
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 400,
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 400
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
body: """
-
-
-
- ComplexError
- Hi
- Top level
-
- bar
-
-
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
+
+
+
+ ComplexError
+ Hi
+ Top level
+
+ bar
+
+
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
}
])
structure ComplexNestedErrorData {
- Foo: String,
+ Foo: String
}
diff --git a/smithy-aws-protocol-tests/model/ec2Query/xml-lists.smithy b/smithy-aws-protocol-tests/model/ec2Query/xml-lists.smithy
index ccd1fb55e2c..96106265cb0 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/xml-lists.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/xml-lists.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize lists in XML documents.
-
$version: "2.0"
namespace aws.protocoltests.ec2
@@ -32,101 +31,102 @@ operation XmlLists {
apply XmlLists @httpResponseTests([
{
- id: "Ec2XmlLists",
- documentation: "Tests for XML list serialization",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlLists"
+ documentation: "Tests for XML list serialization"
+ protocol: ec2Query
+ code: 200
body: """
-
-
- foo
- bar
-
-
- foo
- bar
-
-
- 1
- 2
-
-
- true
- false
-
-
- 2014-04-29T18:30:38Z
- 2014-04-29T18:30:38Z
-
-
- Foo
- 0
-
-
- 1
- 2
-
-
-
- foo
- bar
-
-
- baz
- qux
-
-
-
- - foo
- - bar
-
- hi
- bye
- yep
- nope
- a
- b
- a
- b
-
- -
- 1
- 2
-
- -
- 3
- 4
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+
+ foo
+ bar
+
+
+ foo
+ bar
+
+
+ 1
+ 2
+
+
+ true
+ false
+
+
+ 2014-04-29T18:30:38Z
+ 2014-04-29T18:30:38Z
+
+
+ Foo
+ 0
+
+
+ 1
+ 2
+
+
+
+ foo
+ bar
+
+
+ baz
+ qux
+
+
+
+ - foo
+ - bar
+
+ hi
+ bye
+ yep
+ nope
+ a
+ b
+ a
+ b
+
+ -
+ 1
+ 2
+
+ -
+ 3
+ 4
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: {
- stringList: ["foo", "bar"],
- stringSet: ["foo", "bar"],
- integerList: [1, 2],
- booleanList: [true, false],
- timestampList: [1398796238, 1398796238],
- enumList: ["Foo", "0"],
- intEnumList: [1, 2],
- nestedStringList: [["foo", "bar"], ["baz", "qux"]],
- renamedListMembers: ["foo", "bar"],
- flattenedList: ["hi", "bye"],
- flattenedList2: ["yep", "nope"],
- flattenedListWithMemberNamespace: ["a", "b"],
- flattenedListWithNamespace: ["a", "b"],
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ renamedListMembers: ["foo", "bar"]
+ flattenedList: ["hi", "bye"]
+ flattenedList2: ["yep", "nope"]
+ flattenedListWithMemberNamespace: ["a", "b"]
+ flattenedListWithNamespace: ["a", "b"]
structureList: [
{
- a: "1",
- b: "2",
- },
+ a: "1"
+ b: "2"
+ }
{
- a: "3",
- b: "4",
+ a: "3"
+ b: "4"
}
]
}
@@ -141,68 +141,66 @@ operation XmlEmptyLists {
apply XmlEmptyLists @httpResponseTests([
{
- id: "Ec2XmlEmptyLists",
- documentation: "Deserializes empty XML lists",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlEmptyLists"
+ documentation: "Deserializes empty XML lists"
+ protocol: ec2Query
+ code: 200
body: """
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml"
- },
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml" }
params: {
- stringList: [],
- stringSet: [],
- },
- appliesTo: "client",
+ stringList: []
+ stringSet: []
+ }
+ appliesTo: "client"
}
])
structure XmlListsOutput {
- stringList: StringList,
+ stringList: StringList
- stringSet: StringSet,
+ stringSet: StringSet
- integerList: IntegerList,
+ integerList: IntegerList
- booleanList: BooleanList,
+ booleanList: BooleanList
- timestampList: TimestampList,
+ timestampList: TimestampList
- enumList: FooEnumList,
+ enumList: FooEnumList
- intEnumList :IntegerEnumList,
+ intEnumList: IntegerEnumList
- nestedStringList: NestedStringList,
+ nestedStringList: NestedStringList
@xmlName("renamed")
- renamedListMembers: RenamedListMembers,
+ renamedListMembers: RenamedListMembers
@xmlFlattened
// The xmlname on the targeted list is ignored, and the member name is used.
- flattenedList: RenamedListMembers,
+ flattenedList: RenamedListMembers
@xmlName("customName")
@xmlFlattened
// the xmlName trait on the targeted list's member is ignored when
// serializing flattened lists in structures.
- flattenedList2: RenamedListMembers,
+ flattenedList2: RenamedListMembers
// The XML namespace of the flattened list's member is used, and
// list's XML namespace is disregarded.
@xmlFlattened
- flattenedListWithMemberNamespace: ListWithMemberNamespace,
+ flattenedListWithMemberNamespace: ListWithMemberNamespace
// Again, the XML namespace of the flattened list is ignored.
// The namespace of the member is used, which is empty, so
// no xmlns attribute appears on the serialized XML.
@xmlFlattened
- flattenedListWithNamespace: ListWithNamespace,
+ flattenedListWithNamespace: ListWithNamespace
@xmlName("myStructureList")
structureList: StructureList
@@ -210,29 +208,29 @@ structure XmlListsOutput {
list RenamedListMembers {
@xmlName("item")
- member: String,
+ member: String
}
list StructureList {
@xmlName("item")
- member: StructureListMember,
+ member: StructureListMember
}
structure StructureListMember {
@xmlName("value")
- a: String,
+ a: String
@xmlName("other")
- b: String,
+ b: String
}
@xmlNamespace(uri: "https://xml-list.example.com")
list ListWithMemberNamespace {
@xmlNamespace(uri: "https://xml-member.example.com")
- member: String,
+ member: String
}
@xmlNamespace(uri: "https://xml-list.example.com")
list ListWithNamespace {
- member: String,
+ member: String
}
diff --git a/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy b/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy
index 49f4f2d7057..4838cf2d741 100644
--- a/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy
+++ b/smithy-aws-protocol-tests/model/ec2Query/xml-structs.smithy
@@ -1,22 +1,21 @@
// This file defines test cases that serialize XML output structures.
-
$version: "2.0"
namespace aws.protocoltests.ec2
-use aws.protocols#ec2QueryName
use aws.protocols#ec2Query
+use aws.protocols#ec2QueryName
use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
-use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#FooEnumSet
+use aws.protocoltests.shared#HttpDate
use aws.protocoltests.shared#IntegerEnum
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#IntegerEnumSet
use aws.protocoltests.shared#IntegerEnumMap
-use aws.protocoltests.shared#HttpDate
+use aws.protocoltests.shared#IntegerEnumSet
use smithy.test#httpResponseTests
// This example serializes simple scalar types in the top level XML document.
@@ -27,120 +26,99 @@ operation SimpleScalarXmlProperties {
apply SimpleScalarXmlProperties @httpResponseTests([
{
- id: "Ec2SimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2SimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: ec2Query
+ code: 200
body: """
-
- string
-
- true
- false
- 1
- 2
- 3
- 4
- 5.5
- 6.5
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- stringValue: "string",
- emptyStringValue: "",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- }
- },
+
+ string
+
+ true
+ false
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { stringValue: "string", emptyStringValue: "", trueBooleanValue: true, falseBooleanValue: false, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
{
- id: "Ec2QuerySupportsNaNFloatOutputs",
- documentation: "Supports handling NaN float values.",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2QuerySupportsNaNFloatOutputs"
+ documentation: "Supports handling NaN float values."
+ protocol: ec2Query
+ code: 200
body: """
-
- NaN
- NaN
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+
+ NaN
+ NaN
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "Ec2QuerySupportsInfinityFloatOutputs",
- documentation: "Supports handling Infinity float values.",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2QuerySupportsInfinityFloatOutputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: ec2Query
+ code: 200
body: """
-
- Infinity
- Infinity
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+
+ Infinity
+ Infinity
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "Ec2QuerySupportsNegativeInfinityFloatOutputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2QuerySupportsNegativeInfinityFloatOutputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: ec2Query
+ code: 200
body: """
-
- -Infinity
- -Infinity
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+
+ -Infinity
+ -Infinity
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
structure SimpleScalarXmlPropertiesOutput {
// @ec2QueryName is ignored on output.
@ec2QueryName("IgnoreMe")
- stringValue: String,
+ stringValue: String
+
+ emptyStringValue: String
+
+ trueBooleanValue: Boolean
- emptyStringValue: String,
- trueBooleanValue: Boolean,
- falseBooleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
+ falseBooleanValue: Boolean
+
+ byteValue: Byte
+
+ shortValue: Short
+
+ integerValue: Integer
+
+ longValue: Long
+
+ floatValue: Float
@xmlName("DoubleDribble")
- doubleValue: Double,
+ doubleValue: Double
}
/// Blobs are base64 encoded
@@ -150,23 +128,19 @@ operation XmlBlobs {
apply XmlBlobs @httpResponseTests([
{
- id: "Ec2XmlBlobs",
- documentation: "Blobs are base64 encoded",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlBlobs"
+ documentation: "Blobs are base64 encoded"
+ protocol: ec2Query
+ code: 200
body: """
-
- dmFsdWU=
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- data: "value"
- }
+
+ dmFsdWU=
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { data: "value" }
}
])
@@ -178,44 +152,36 @@ operation XmlEmptyBlobs {
apply XmlEmptyBlobs @httpResponseTests([
{
- id: "Ec2XmlEmptyBlobs",
- documentation: "Empty blobs are deserialized as empty string",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlEmptyBlobs"
+ documentation: "Empty blobs are deserialized as empty string"
+ protocol: ec2Query
+ code: 200
body: """
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- data: ""
- },
- appliesTo: "client",
- },
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { data: "" }
+ appliesTo: "client"
+ }
{
- id: "Ec2XmlEmptySelfClosedBlobs",
- documentation: "Empty self closed blobs are deserialized as empty string",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlEmptySelfClosedBlobs"
+ documentation: "Empty self closed blobs are deserialized as empty string"
+ protocol: ec2Query
+ code: 200
body: """
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- data: ""
- },
- appliesTo: "client",
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { data: "" }
+ appliesTo: "client"
}
])
@@ -232,157 +198,129 @@ operation XmlTimestamps {
apply XmlTimestamps @httpResponseTests([
{
- id: "Ec2XmlTimestamps",
- documentation: "Tests how normal timestamps are serialized",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestamps"
+ documentation: "Tests how normal timestamps are serialized"
+ protocol: ec2Query
+ code: 200
body: """
-
- 2014-04-29T18:30:38Z
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- normal: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { normal: 1398796238 }
+ }
{
- id: "Ec2XmlTimestampsWithDateTimeFormat",
- documentation: "Ensures that the timestampFormat of date-time works like normal timestamps",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestampsWithDateTimeFormat"
+ documentation: "Ensures that the timestampFormat of date-time works like normal timestamps"
+ protocol: ec2Query
+ code: 200
body: """
-
- 2014-04-29T18:30:38Z
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- dateTime: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { dateTime: 1398796238 }
+ }
{
- id: "Ec2XmlTimestampsWithDateTimeOnTargetFormat",
- documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestampsWithDateTimeOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps"
+ protocol: ec2Query
+ code: 200
body: """
-
- 2014-04-29T18:30:38Z
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- dateTimeOnTarget: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { dateTimeOnTarget: 1398796238 }
+ }
{
- id: "Ec2XmlTimestampsWithEpochSecondsFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds works",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestampsWithEpochSecondsFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds works"
+ protocol: ec2Query
+ code: 200
body: """
-
- 1398796238
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- epochSeconds: 1398796238
- }
- },
+
+ 1398796238
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { epochSeconds: 1398796238 }
+ }
{
- id: "Ec2XmlTimestampsWithEpochSecondsOnTargetFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestampsWithEpochSecondsOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works"
+ protocol: ec2Query
+ code: 200
body: """
-
- 1398796238
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- epochSecondsOnTarget: 1398796238
- }
- },
+
+ 1398796238
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { epochSecondsOnTarget: 1398796238 }
+ }
{
- id: "Ec2XmlTimestampsWithHttpDateFormat",
- documentation: "Ensures that the timestampFormat of http-date works",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestampsWithHttpDateFormat"
+ documentation: "Ensures that the timestampFormat of http-date works"
+ protocol: ec2Query
+ code: 200
body: """
-
- Tue, 29 Apr 2014 18:30:38 GMT
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- httpDate: 1398796238
- }
- },
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { httpDate: 1398796238 }
+ }
{
- id: "Ec2XmlTimestampsWithHttpDateOnTargetFormat",
- documentation: "Ensures that the timestampFormat of http-date on the target shape works",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlTimestampsWithHttpDateOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works"
+ protocol: ec2Query
+ code: 200
body: """
-
- Tue, 29 Apr 2014 18:30:38 GMT
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- httpDateOnTarget: 1398796238
- }
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { httpDateOnTarget: 1398796238 }
}
])
structure XmlTimestampsOutput {
- normal: Timestamp,
+ normal: Timestamp
@timestampFormat("date-time")
- dateTime: Timestamp,
+ dateTime: Timestamp
- dateTimeOnTarget: DateTime,
+ dateTimeOnTarget: DateTime
@timestampFormat("epoch-seconds")
- epochSeconds: Timestamp,
+ epochSeconds: Timestamp
- epochSecondsOnTarget: EpochSeconds,
+ epochSecondsOnTarget: EpochSeconds
@timestampFormat("http-date")
- httpDate: Timestamp,
+ httpDate: Timestamp
- httpDateOnTarget: HttpDate,
+ httpDateOnTarget: HttpDate
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
@@ -392,61 +330,56 @@ operation XmlEnums {
apply XmlEnums @httpResponseTests([
{
- id: "Ec2XmlEnums",
- documentation: "Serializes simple scalar properties",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: ec2Query
+ code: 200
body: """
-
- Foo
- 0
- 1
-
- Foo
- 0
-
-
- Foo
- 0
-
-
-
- hi
- Foo
-
-
- zero
- 0
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+ Foo
+ 0
+ 1
+
+ Foo
+ 0
+
+
+ Foo
+ 0
+
+
+
+ hi
+ Foo
+
+
+ zero
+ 0
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
structure XmlEnumsOutput {
- fooEnum1: FooEnum,
- fooEnum2: FooEnum,
- fooEnum3: FooEnum,
- fooEnumList: FooEnumList,
- fooEnumSet: FooEnumSet,
- fooEnumMap: FooEnumMap,
+ fooEnum1: FooEnum
+ fooEnum2: FooEnum
+ fooEnum3: FooEnum
+ fooEnumList: FooEnumList
+ fooEnumSet: FooEnumSet
+ fooEnumMap: FooEnumMap
}
/// This example serializes intEnums as top level properties, in lists, sets, and maps.
@@ -456,61 +389,56 @@ operation XmlIntEnums {
apply XmlIntEnums @httpResponseTests([
{
- id: "Ec2XmlIntEnums",
- documentation: "Serializes simple scalar properties",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlIntEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: ec2Query
+ code: 200
body: """
-
- 1
- 2
- 3
-
- 1
- 2
-
-
- 1
- 2
-
-
-
- a
- 1
-
-
- b
- 2
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+ 1
+ 2
+ 3
+
+ 1
+ 2
+
+
+ 1
+ 2
+
+
+
+ a
+ 1
+
+
+ b
+ 2
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: {
- intEnum1: 1,
- intEnum2: 2,
- intEnum3: 3,
- intEnumList: [1, 2],
- intEnumSet: [1, 2],
- intEnumMap: {
- "a": 1,
- "b": 2
- }
+ intEnum1: 1
+ intEnum2: 2
+ intEnum3: 3
+ intEnumList: [1, 2]
+ intEnumSet: [1, 2]
+ intEnumMap: { a: 1, b: 2 }
}
}
])
structure XmlIntEnumsOutput {
- intEnum1: IntegerEnum,
- intEnum2: IntegerEnum,
- intEnum3: IntegerEnum,
- intEnumList: IntegerEnumList,
- intEnumSet: IntegerEnumSet,
- intEnumMap: IntegerEnumMap,
+ intEnum1: IntegerEnum
+ intEnum2: IntegerEnum
+ intEnum3: IntegerEnum
+ intEnumList: IntegerEnumList
+ intEnumSet: IntegerEnumSet
+ intEnumMap: IntegerEnumMap
}
/// Recursive shapes
@@ -520,41 +448,37 @@ operation RecursiveXmlShapes {
apply RecursiveXmlShapes @httpResponseTests([
{
- id: "Ec2RecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2RecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: ec2Query
+ code: 200
body: """
-
-
- Foo1
-
- Bar1
-
- Foo2
-
- Bar2
-
-
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+
+ Foo1
+
+ Bar1
+
+ Foo2
+
+ Bar2
+
+
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -567,13 +491,13 @@ structure RecursiveXmlShapesOutput {
}
structure RecursiveXmlShapesOutputNested1 {
- foo: String,
+ foo: String
nested: RecursiveXmlShapesOutputNested2
}
structure RecursiveXmlShapesOutputNested2 {
- bar: String,
- recursiveMember: RecursiveXmlShapesOutputNested1,
+ bar: String
+ recursiveMember: RecursiveXmlShapesOutputNested1
}
// XML namespace
@@ -583,33 +507,28 @@ operation XmlNamespaces {
apply XmlNamespaces @httpResponseTests([
{
- id: "Ec2XmlNamespaces",
- documentation: "Serializes XML namespaces",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2XmlNamespaces"
+ documentation: "Serializes XML namespaces"
+ protocol: ec2Query
+ code: 200
body: """
-
-
- Foo
-
- Bar
- Baz
-
-
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
params: {
nested: {
- foo: "Foo",
- values: [
- "Bar",
- "Baz"
- ]
+ foo: "Foo"
+ values: ["Bar", "Baz"]
}
}
}
@@ -626,7 +545,7 @@ structure XmlNamespacesOutput {
@xmlNamespace(uri: "http://foo.com")
structure XmlNamespaceNested {
@xmlNamespace(uri: "http://baz.com", prefix: "baz")
- foo: String,
+ foo: String
@xmlNamespace(uri: "http://qux.com")
values: XmlNamespacedList
@@ -634,7 +553,7 @@ structure XmlNamespaceNested {
list XmlNamespacedList {
@xmlNamespace(uri: "http://bux.com")
- member: String,
+ member: String
}
/// The xmlName trait on the output structure is ignored in AWS Query.
@@ -646,23 +565,19 @@ operation IgnoresWrappingXmlName {
apply IgnoresWrappingXmlName @httpResponseTests([
{
- id: "Ec2IgnoresWrappingXmlName",
- documentation: "The xmlName trait on the output structure is ignored in the ec2 protocol",
- protocol: ec2Query,
- code: 200,
+ id: "Ec2IgnoresWrappingXmlName"
+ documentation: "The xmlName trait on the output structure is ignored in the ec2 protocol"
+ protocol: ec2Query
+ code: 200
body: """
-
- bar
- requestid
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "text/xml;charset=UTF-8"
- },
- params: {
- foo: "bar"
- }
+
+ bar
+ requestid
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "text/xml;charset=UTF-8" }
+ params: { foo: "bar" }
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/datetime-offsets.smithy b/smithy-aws-protocol-tests/model/restJson1/datetime-offsets.smithy
index 8a218af66ef..8d9972af699 100644
--- a/smithy-aws-protocol-tests/model/restJson1/datetime-offsets.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/datetime-offsets.smithy
@@ -16,37 +16,35 @@ operation DatetimeOffsets {
apply DatetimeOffsets @httpResponseTests([
{
- id: "RestJsonDateTimeWithNegativeOffset",
+ id: "RestJsonDateTimeWithNegativeOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: restJson1,
- code: 200,
- body:
- """
- {
- "datetime": "2019-12-16T22:48:18-01:00"
- }
- """,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "datetime": "2019-12-16T22:48:18-01:00"
+ }
+ """
params: { datetime: 1576540098 }
- bodyMediaType: "application/json",
+ bodyMediaType: "application/json"
appliesTo: "client"
- },
+ }
{
- id: "RestJsonDateTimeWithPositiveOffset",
+ id: "RestJsonDateTimeWithPositiveOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: restJson1,
- code: 200,
- body:
- """
- {
- "datetime": "2019-12-17T00:48:18+01:00"
- }
- """,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "datetime": "2019-12-17T00:48:18+01:00"
+ }
+ """
params: { datetime: 1576540098 }
- bodyMediaType: "application/json",
+ bodyMediaType: "application/json"
appliesTo: "client"
- },
+ }
])
structure DatetimeOffsetsOutput {
diff --git a/smithy-aws-protocol-tests/model/restJson1/documents.smithy b/smithy-aws-protocol-tests/model/restJson1/documents.smithy
index 9ca1e68fea4..557cd4eea8d 100644
--- a/smithy-aws-protocol-tests/model/restJson1/documents.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/documents.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize document types.
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -15,220 +14,192 @@ document Document
@idempotent
@http(uri: "/DocumentType", method: "PUT")
operation DocumentType {
- input: DocumentTypeInputOutput,
+ input: DocumentTypeInputOutput
output: DocumentTypeInputOutput
}
structure DocumentTypeInputOutput {
- stringValue: String,
- documentValue: Document,
+ stringValue: String
+ documentValue: Document
}
apply DocumentType @httpRequestTests([
{
- id: "DocumentTypeInputWithObject",
- documentation: "Serializes document types as part of the JSON request payload with no escaping.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentType",
+ id: "DocumentTypeInputWithObject"
+ documentation: "Serializes document types as part of the JSON request payload with no escaping."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentType"
body: """
- {
- "stringValue": "string",
- "documentValue": {
- "foo": "bar"
- }
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ {
+ "stringValue": "string",
+ "documentValue": {
+ "foo": "bar"
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- stringValue: "string",
- documentValue: {
- foo: "bar"
- }
+ stringValue: "string"
+ documentValue: { foo: "bar" }
}
- },
+ }
{
- id: "DocumentInputWithString",
- documentation: "Serializes document types using a string.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentType",
+ id: "DocumentInputWithString"
+ documentation: "Serializes document types using a string."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentType"
body: """
- {
- "stringValue": "string",
- "documentValue": "hello"
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- stringValue: "string",
- documentValue: "hello"
- }
- },
+ {
+ "stringValue": "string",
+ "documentValue": "hello"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: "string", documentValue: "hello" }
+ }
{
- id: "DocumentInputWithNumber",
- documentation: "Serializes document types using a number.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentType",
+ id: "DocumentInputWithNumber"
+ documentation: "Serializes document types using a number."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentType"
body: """
- {
- "stringValue": "string",
- "documentValue": 10
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- stringValue: "string",
- documentValue: 10
- }
- },
+ {
+ "stringValue": "string",
+ "documentValue": 10
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: "string", documentValue: 10 }
+ }
{
- id: "DocumentInputWithBoolean",
- documentation: "Serializes document types using a boolean.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentType",
+ id: "DocumentInputWithBoolean"
+ documentation: "Serializes document types using a boolean."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentType"
body: """
- {
- "stringValue": "string",
- "documentValue": true
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- stringValue: "string",
- documentValue: true
- }
- },
+ {
+ "stringValue": "string",
+ "documentValue": true
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: "string", documentValue: true }
+ }
{
- id: "DocumentInputWithList",
- documentation: "Serializes document types using a list.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentType",
+ id: "DocumentInputWithList"
+ documentation: "Serializes document types using a list."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentType"
body: """
- {
- "stringValue": "string",
- "documentValue": [
- true,
- "hi",
- [
- 1,
- 2
- ],
- {
- "foo": {
- "baz": [
- 3,
- 4
- ]
- }
- }
- ]
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ {
+ "stringValue": "string",
+ "documentValue": [
+ true,
+ "hi",
+ [
+ 1,
+ 2
+ ],
+ {
+ "foo": {
+ "baz": [
+ 3,
+ 4
+ ]
+ }
+ }
+ ]
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- stringValue: "string",
+ stringValue: "string"
documentValue: [
- true,
- "hi",
- [
- 1,
- 2
- ],
+ true
+ "hi"
+ [1, 2]
{
- "foo": {
- "baz": [
- 3,
- 4
- ]
+ foo: {
+ baz: [3, 4]
}
}
]
}
- },
+ }
])
apply DocumentType @httpResponseTests([
{
- id: "DocumentOutput",
- documentation: "Serializes documents as part of the JSON response payload with no escaping.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentOutput"
+ documentation: "Serializes documents as part of the JSON response payload with no escaping."
+ protocol: restJson1
+ code: 200
body: """
{
"stringValue": "string",
"documentValue": {
"foo": "bar"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- stringValue: "string",
- documentValue: {
- foo: "bar"
- }
+ stringValue: "string"
+ documentValue: { foo: "bar" }
}
- },
+ }
{
- id: "DocumentOutputString",
- documentation: "Document types can be JSON scalars too.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentOutputString"
+ documentation: "Document types can be JSON scalars too."
+ protocol: restJson1
+ code: 200
body: """
{
"stringValue": "string",
"documentValue": "hello"
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- stringValue: "string",
- documentValue: "hello"
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: "string", documentValue: "hello" }
+ }
{
- id: "DocumentOutputNumber",
- documentation: "Document types can be JSON scalars too.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentOutputNumber"
+ documentation: "Document types can be JSON scalars too."
+ protocol: restJson1
+ code: 200
body: """
{
"stringValue": "string",
"documentValue": 10
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- stringValue: "string",
- documentValue: 10
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: "string", documentValue: 10 }
+ }
{
- id: "DocumentOutputBoolean",
- documentation: "Document types can be JSON scalars too.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentOutputBoolean"
+ documentation: "Document types can be JSON scalars too."
+ protocol: restJson1
+ code: 200
body: """
{
"stringValue": "string",
"documentValue": false
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- stringValue: "string",
- documentValue: false
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: "string", documentValue: false }
+ }
{
- id: "DocumentOutputArray",
- documentation: "Document types can be JSON arrays.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentOutputArray"
+ documentation: "Document types can be JSON arrays."
+ protocol: restJson1
+ code: 200
body: """
{
"stringValue": "string",
@@ -236,11 +207,11 @@ apply DocumentType @httpResponseTests([
true,
false
]
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- stringValue: "string",
+ stringValue: "string"
documentValue: [true, false]
}
}
@@ -250,78 +221,70 @@ apply DocumentType @httpResponseTests([
@idempotent
@http(uri: "/DocumentTypeAsPayload", method: "PUT")
operation DocumentTypeAsPayload {
- input: DocumentTypeAsPayloadInputOutput,
+ input: DocumentTypeAsPayloadInputOutput
output: DocumentTypeAsPayloadInputOutput
}
structure DocumentTypeAsPayloadInputOutput {
@httpPayload
- documentValue: Document,
+ documentValue: Document
}
apply DocumentTypeAsPayload @httpRequestTests([
{
- id: "DocumentTypeAsPayloadInput",
- documentation: "Serializes a document as the target of the httpPayload trait.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentTypeAsPayload",
+ id: "DocumentTypeAsPayloadInput"
+ documentation: "Serializes a document as the target of the httpPayload trait."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentTypeAsPayload"
body: """
- {
- "foo": "bar"
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ {
+ "foo": "bar"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- documentValue: {
- foo: "bar"
- }
+ documentValue: { foo: "bar" }
}
- },
+ }
{
- id: "DocumentTypeAsPayloadInputString",
- documentation: "Serializes a document as the target of the httpPayload trait using a string.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentTypeAsPayload",
- body: "\"hello\"",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- documentValue: "hello"
- }
+ id: "DocumentTypeAsPayloadInputString"
+ documentation: "Serializes a document as the target of the httpPayload trait using a string."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentTypeAsPayload"
+ body: "\"hello\""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { documentValue: "hello" }
}
])
apply DocumentTypeAsPayload @httpResponseTests([
{
- id: "DocumentTypeAsPayloadOutput",
- documentation: "Serializes a document as the target of the httpPayload trait.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentTypeAsPayloadOutput"
+ documentation: "Serializes a document as the target of the httpPayload trait."
+ protocol: restJson1
+ code: 200
body: """
{
"foo": "bar"
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- documentValue: {
- foo: "bar"
- }
+ documentValue: { foo: "bar" }
}
- },
+ }
{
- id: "DocumentTypeAsPayloadOutputString",
- documentation: "Serializes a document as a payload string.",
- protocol: restJson1,
- code: 200,
- body: "\"hello\"",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- documentValue: "hello"
- }
+ id: "DocumentTypeAsPayloadOutputString"
+ documentation: "Serializes a document as a payload string."
+ protocol: restJson1
+ code: 200
+ body: "\"hello\""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { documentValue: "hello" }
}
])
@@ -329,26 +292,26 @@ apply DocumentTypeAsPayload @httpResponseTests([
@idempotent
@http(uri: "/DocumentTypeAsMapValue", method: "PUT")
operation DocumentTypeAsMapValue {
- input: DocumentTypeAsMapValueInputOutput,
- output: DocumentTypeAsMapValueInputOutput,
+ input: DocumentTypeAsMapValueInputOutput
+ output: DocumentTypeAsMapValueInputOutput
}
structure DocumentTypeAsMapValueInputOutput {
- docValuedMap: DocumentValuedMap,
+ docValuedMap: DocumentValuedMap
}
map DocumentValuedMap {
- key: String,
- value: Document,
+ key: String
+ value: Document
}
apply DocumentTypeAsMapValue @httpRequestTests([
{
- id: "DocumentTypeAsMapValueInput",
- documentation: "Serializes a map that uses documents as the value.",
- protocol: restJson1,
- method: "PUT",
- uri: "/DocumentTypeAsMapValue",
+ id: "DocumentTypeAsMapValueInput"
+ documentation: "Serializes a map that uses documents as the value."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/DocumentTypeAsMapValue"
body: """
{
"docValuedMap": {
@@ -356,25 +319,25 @@ apply DocumentTypeAsMapValue @httpRequestTests([
"bar": [ "b", "a", "r" ],
"baz": "BAZ"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
docValuedMap: {
- "foo": { "f": 1, "o": 2 },
- "bar": [ "b", "a", "r" ],
- "baz": "BAZ",
- },
- },
- },
+ foo: { f: 1, o: 2 }
+ bar: ["b", "a", "r"]
+ baz: "BAZ"
+ }
+ }
+ }
])
apply DocumentTypeAsMapValue @httpResponseTests([
{
- id: "DocumentTypeAsMapValueOutput",
- documentation: "Serializes a map that uses documents as the value.",
- protocol: restJson1,
- code: 200,
+ id: "DocumentTypeAsMapValueOutput"
+ documentation: "Serializes a map that uses documents as the value."
+ protocol: restJson1
+ code: 200
body: """
{
"docValuedMap": {
@@ -382,15 +345,15 @@ apply DocumentTypeAsMapValue @httpResponseTests([
"bar": [ "b", "a", "r" ],
"baz": "BAZ"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
docValuedMap: {
- "foo": { "f": 1, "o": 2 },
- "bar": [ "b", "a", "r" ],
- "baz": "BAZ",
- },
- },
- },
+ foo: { f: 1, o: 2 }
+ bar: ["b", "a", "r"]
+ baz: "BAZ"
+ }
+ }
+ }
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/empty-input-output.smithy b/smithy-aws-protocol-tests/model/restJson1/empty-input-output.smithy
index b9f23b5aaa3..2871e40cf76 100644
--- a/smithy-aws-protocol-tests/model/restJson1/empty-input-output.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/empty-input-output.smithy
@@ -2,7 +2,6 @@
// output shape serialization.
//
// TODO: does an operation with no input always send {}? What about no output?
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -19,91 +18,87 @@ operation NoInputAndNoOutput {}
apply NoInputAndNoOutput @httpRequestTests([
{
- id: "RestJsonNoInputAndNoOutput",
+ id: "RestJsonNoInputAndNoOutput"
documentation: """
- No input serializes no payload. When clients do not need to
- serialize any data in the payload, they should omit a payload
- altogether.""",
- protocol: restJson1,
- method: "POST",
- uri: "/NoInputAndNoOutput",
+ No input serializes no payload. When clients do not need to
+ serialize any data in the payload, they should omit a payload
+ altogether."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/NoInputAndNoOutput"
body: ""
- },
+ }
{
- id: "RestJsonNoInputAllowsAccept",
+ id: "RestJsonNoInputAllowsAccept"
documentation: """
- Servers should allow the accept header to be set to the
- default content-type.""",
- protocol: restJson1,
- method: "POST",
- uri: "/NoInputAndNoOutput",
- body: "",
- headers: {
- "Accept": "application/json"
- },
- appliesTo: "server",
+ Servers should allow the accept header to be set to the
+ default content-type."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/NoInputAndNoOutput"
+ body: ""
+ headers: { Accept: "application/json" }
+ appliesTo: "server"
}
])
apply NoInputAndNoOutput @httpResponseTests([
- {
- id: "RestJsonNoInputAndNoOutput",
- documentation: """
+ {
+ id: "RestJsonNoInputAndNoOutput"
+ documentation: """
When an operation does not define output, the service will respond
with an empty payload, and may optionally include the content-type
- header.""",
- protocol: restJson1,
- code: 200,
- body: ""
- }
+ header."""
+ protocol: restJson1
+ code: 200
+ body: ""
+ }
])
/// This test is similar to NoInputAndNoOutput, but uses explicit Unit types.
@http(uri: "/UnitInputAndOutput", method: "POST")
operation UnitInputAndOutput {
- input: Unit,
+ input: Unit
output: Unit
}
apply UnitInputAndOutput @httpRequestTests([
{
- id: "RestJsonUnitInputAndOutput",
+ id: "RestJsonUnitInputAndOutput"
documentation: """
- A unit type input serializes no payload. When clients do not
- need to serialize any data in the payload, they should omit
- a payload altogether.""",
- protocol: restJson1,
- method: "POST",
- uri: "/UnitInputAndOutput",
+ A unit type input serializes no payload. When clients do not
+ need to serialize any data in the payload, they should omit
+ a payload altogether."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/UnitInputAndOutput"
body: ""
- },
+ }
{
- id: "RestJsonUnitInputAllowsAccept",
+ id: "RestJsonUnitInputAllowsAccept"
documentation: """
- Servers should allow the accept header to be set to the
- default content-type.""",
- protocol: restJson1,
- method: "POST",
- uri: "/UnitInputAndOutput",
- body: "",
- headers: {
- "Accept": "application/json"
- },
- appliesTo: "server",
+ Servers should allow the accept header to be set to the
+ default content-type."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/UnitInputAndOutput"
+ body: ""
+ headers: { Accept: "application/json" }
+ appliesTo: "server"
}
])
apply UnitInputAndOutput @httpResponseTests([
- {
- id: "RestJsonUnitInputAndOutputNoOutput",
- documentation: """
+ {
+ id: "RestJsonUnitInputAndOutputNoOutput"
+ documentation: """
When an operation defines Unit output, the service will respond
with an empty payload, and may optionally include the content-type
- header.""",
- protocol: restJson1,
- code: 200,
- body: ""
- }
+ header."""
+ protocol: restJson1
+ code: 200
+ body: ""
+ }
])
/// The example tests how requests and responses are serialized when there's
@@ -117,57 +112,53 @@ operation NoInputAndOutput {
apply NoInputAndOutput @httpRequestTests([
{
- id: "RestJsonNoInputAndOutput",
+ id: "RestJsonNoInputAndOutput"
documentation: """
- No input serializes no payload. When clients do not need to
- serialize any data in the payload, they should omit a payload
- altogether.""",
- protocol: restJson1,
- method: "POST",
- uri: "/NoInputAndOutputOutput",
- body: "",
- },
+ No input serializes no payload. When clients do not need to
+ serialize any data in the payload, they should omit a payload
+ altogether."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/NoInputAndOutputOutput"
+ body: ""
+ }
{
- id: "RestJsonNoInputAndOutputAllowsAccept",
+ id: "RestJsonNoInputAndOutputAllowsAccept"
documentation: """
- Servers should allow the accept header to be set to the
- default content-type.""",
- protocol: restJson1,
- method: "POST",
- uri: "/NoInputAndOutputOutput",
- body: "",
- headers: {
- "Accept": "application/json"
- },
+ Servers should allow the accept header to be set to the
+ default content-type."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/NoInputAndOutputOutput"
+ body: ""
+ headers: { Accept: "application/json" }
appliesTo: "server"
}
])
apply NoInputAndOutput @httpResponseTests([
{
- id: "RestJsonNoInputAndOutputWithJson",
+ id: "RestJsonNoInputAndOutputWithJson"
documentation: """
- Operations that define output and do not bind anything to
- the payload return a JSON object in the response.""",
- protocol: restJson1,
- code: 200,
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- },
+ Operations that define output and do not bind anything to
+ the payload return a JSON object in the response."""
+ protocol: restJson1
+ code: 200
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ }
{
- id: "RestJsonNoInputAndOutputNoPayload",
- documentation: """
+ id: "RestJsonNoInputAndOutputNoPayload"
+ documentation: """
This test is similar to RestJsonNoInputAndOutputWithJson, but
it ensures that clients can gracefully handle responses that
- omit a JSON payload.""",
- protocol: restJson1,
- code: 200,
- body: "",
- appliesTo: "client",
- }
+ omit a JSON payload."""
+ protocol: restJson1
+ code: 200
+ body: ""
+ appliesTo: "client"
+ }
])
@output
@@ -179,64 +170,60 @@ structure NoInputAndOutputOutput {}
/// be rare, code generators must support this.
@http(uri: "/EmptyInputAndEmptyOutput", method: "POST")
operation EmptyInputAndEmptyOutput {
- input: EmptyInputAndEmptyOutputInput,
+ input: EmptyInputAndEmptyOutputInput
output: EmptyInputAndEmptyOutputOutput
}
apply EmptyInputAndEmptyOutput @httpRequestTests([
{
- id: "RestJsonEmptyInputAndEmptyOutput",
+ id: "RestJsonEmptyInputAndEmptyOutput"
documentation: """
- Clients should not serialize a JSON payload when no parameters
- are given that are sent in the body. A service will tolerate
- clients that omit a payload or that send a JSON object.""",
- protocol: restJson1,
- method: "POST",
- uri: "/EmptyInputAndEmptyOutput",
- body: "",
- },
+ Clients should not serialize a JSON payload when no parameters
+ are given that are sent in the body. A service will tolerate
+ clients that omit a payload or that send a JSON object."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/EmptyInputAndEmptyOutput"
+ body: ""
+ }
{
- id: "RestJsonEmptyInputAndEmptyOutputWithJson",
+ id: "RestJsonEmptyInputAndEmptyOutputWithJson"
documentation: """
- Similar to RestJsonEmptyInputAndEmptyOutput, but ensures that
- services gracefully handles receiving a JSON object.""",
- protocol: restJson1,
- method: "POST",
- uri: "/EmptyInputAndEmptyOutput",
- headers: {
- "Content-Type": "application/json",
- },
- body: "{}",
- bodyMediaType: "application/json",
- appliesTo: "server",
- },
+ Similar to RestJsonEmptyInputAndEmptyOutput, but ensures that
+ services gracefully handles receiving a JSON object."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/EmptyInputAndEmptyOutput"
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
+ appliesTo: "server"
+ }
])
apply EmptyInputAndEmptyOutput @httpResponseTests([
{
- id: "RestJsonEmptyInputAndEmptyOutput",
+ id: "RestJsonEmptyInputAndEmptyOutput"
documentation: """
- As of January 2021, server implementations are expected to
- respond with a JSON object regardless of if the output
- parameters are empty.""",
- protocol: restJson1,
- code: 200,
- headers: {
- "Content-Type": "application/json",
- },
- body: "{}",
- bodyMediaType: "application/json",
- },
+ As of January 2021, server implementations are expected to
+ respond with a JSON object regardless of if the output
+ parameters are empty."""
+ protocol: restJson1
+ code: 200
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
+ }
{
- id: "RestJsonEmptyInputAndEmptyOutputJsonObjectOutput",
+ id: "RestJsonEmptyInputAndEmptyOutputJsonObjectOutput"
documentation: """
- This test ensures that clients can gracefully handle
- situations where a service omits a JSON payload entirely.""",
- protocol: restJson1,
- code: 200,
- body: "",
- appliesTo: "client",
- },
+ This test ensures that clients can gracefully handle
+ situations where a service omits a JSON payload entirely."""
+ protocol: restJson1
+ code: 200
+ body: ""
+ appliesTo: "client"
+ }
])
@input
diff --git a/smithy-aws-protocol-tests/model/restJson1/endpoint-paths.smithy b/smithy-aws-protocol-tests/model/restJson1/endpoint-paths.smithy
index a5badcad7f6..64e3e56063c 100644
--- a/smithy-aws-protocol-tests/model/restJson1/endpoint-paths.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/endpoint-paths.smithy
@@ -1,5 +1,4 @@
// This file defines tests to ensure that implementations support endpoints with paths
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -9,14 +8,14 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "RestJsonHostWithPath",
+ id: "RestJsonHostWithPath"
documentation: """
- Custom endpoints supplied by users can have paths""",
- protocol: restJson1,
- method: "GET",
- uri: "/custom/HostWithPathOperation",
- body: "",
- host: "example.com/custom",
+ Custom endpoints supplied by users can have paths"""
+ protocol: restJson1
+ method: "GET"
+ uri: "/custom/HostWithPathOperation"
+ body: ""
+ host: "example.com/custom"
appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/endpoints.smithy b/smithy-aws-protocol-tests/model/restJson1/endpoints.smithy
index 44fa70961f2..8fc6ce7f3e4 100644
--- a/smithy-aws-protocol-tests/model/restJson1/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/endpoints.smithy
@@ -1,6 +1,5 @@
// This file defines tests to ensure that implementations support the endpoint
// trait and other features that modify the host.
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -10,50 +9,47 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "RestJsonEndpointTrait",
+ id: "RestJsonEndpointTrait"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait.""",
- protocol: restJson1,
- method: "POST",
- uri: "/EndpointOperation",
- body: "",
- host: "example.com",
- resolvedHost: "foo.example.com",
+ Operations can prepend to the given host if they define the
+ endpoint trait."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/EndpointOperation"
+ body: ""
+ host: "example.com"
+ resolvedHost: "foo.example.com"
}
])
@endpoint(hostPrefix: "foo.")
@http(uri: "/EndpointOperation", method: "POST")
operation EndpointOperation {}
-
@httpRequestTests([
{
- id: "RestJsonEndpointTraitWithHostLabel",
+ id: "RestJsonEndpointTraitWithHostLabel"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input.""",
- protocol: restJson1,
- method: "POST",
- uri: "/EndpointWithHostLabelOperation",
- body: "{\"label\": \"bar\"}",
- bodyMediaType: "application/json",
- host: "example.com",
- resolvedHost: "foo.bar.example.com",
- params: {
- label: "bar",
- },
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/EndpointWithHostLabelOperation"
+ body: "{\"label\": \"bar\"}"
+ bodyMediaType: "application/json"
+ host: "example.com"
+ resolvedHost: "foo.bar.example.com"
+ params: { label: "bar" }
}
])
@endpoint(hostPrefix: "foo.{label}.")
@http(uri: "/EndpointWithHostLabelOperation", method: "POST")
operation EndpointWithHostLabelOperation {
- input: HostLabelInput,
+ input: HostLabelInput
}
structure HostLabelInput {
@required
@hostLabel
- label: String,
+ label: String
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/errors.smithy b/smithy-aws-protocol-tests/model/restJson1/errors.smithy
index 7e387fe0363..aca1c184b2a 100644
--- a/smithy-aws-protocol-tests/model/restJson1/errors.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/errors.smithy
@@ -1,11 +1,9 @@
// This file defines test cases that test error serialization.
-
$version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
-use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
/// This operation has four possible return values:
@@ -21,81 +19,71 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/GreetingWithErrors", method: "PUT")
operation GreetingWithErrors {
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError, FooError]
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ FooError
+ ]
}
apply GreetingWithErrors @httpResponseTests([
{
- id: "RestJsonGreetingWithErrors",
+ id: "RestJsonGreetingWithErrors"
documentation: """
- Ensures that operations with errors successfully know how
- to deserialize a successful response. As of January 2021,
- server implementations are expected to respond with a
- JSON object regardless of if the output parameters are
- empty.""",
- protocol: restJson1,
- code: 200,
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "X-Greeting": "Hello",
- },
- params: {
- greeting: "Hello"
- }
- },
+ Ensures that operations with errors successfully know how
+ to deserialize a successful response. As of January 2021,
+ server implementations are expected to respond with a
+ JSON object regardless of if the output parameters are
+ empty."""
+ protocol: restJson1
+ code: 200
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "X-Greeting": "Hello" }
+ params: { greeting: "Hello" }
+ }
{
- id: "RestJsonGreetingWithErrorsNoPayload",
+ id: "RestJsonGreetingWithErrorsNoPayload"
documentation: """
- This test is similar to RestJsonGreetingWithErrors, but it
- ensures that clients can gracefully deal with a server
- omitting a response payload.""",
- protocol: restJson1,
- code: 200,
- body: "",
- headers: {
- "X-Greeting": "Hello",
- },
- params: {
- greeting: "Hello"
- },
+ This test is similar to RestJsonGreetingWithErrors, but it
+ ensures that clients can gracefully deal with a server
+ omitting a response payload."""
+ protocol: restJson1
+ code: 200
+ body: ""
+ headers: { "X-Greeting": "Hello" }
+ params: { greeting: "Hello" }
appliesTo: "client"
- },
+ }
])
structure GreetingWithErrorsOutput {
@httpHeader("X-Greeting")
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
@httpError(400)
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "RestJsonInvalidGreetingError",
- documentation: "Parses simple JSON errors",
- protocol: restJson1,
- params: {
- Message: "Hi"
- },
- code: 400,
- headers: {
- "Content-Type": "application/json",
- "X-Amzn-Errortype": "InvalidGreeting",
- },
+ id: "RestJsonInvalidGreetingError"
+ documentation: "Parses simple JSON errors"
+ protocol: restJson1
+ params: { Message: "Hi" }
+ code: 400
+ headers: { "Content-Type": "application/json", "X-Amzn-Errortype": "InvalidGreeting" }
body: """
- {
- "Message": "Hi"
- }""",
- bodyMediaType: "application/json",
- },
-
+ {
+ "Message": "Hi"
+ }"""
+ bodyMediaType: "application/json"
+ }
])
/// This error is thrown when a request is invalid.
@@ -104,57 +92,48 @@ apply InvalidGreeting @httpResponseTests([
structure ComplexError {
// Errors support HTTP bindings!
@httpHeader("X-Header")
- Header: String,
+ Header: String
- TopLevel: String,
+ TopLevel: String
- Nested: ComplexNestedErrorData,
+ Nested: ComplexNestedErrorData
}
apply ComplexError @httpResponseTests([
{
- id: "RestJsonComplexErrorWithNoMessage",
- documentation: "Serializes a complex error with no message member",
- protocol: restJson1,
+ id: "RestJsonComplexErrorWithNoMessage"
+ documentation: "Serializes a complex error with no message member"
+ protocol: restJson1
params: {
- Header: "Header",
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 403,
- headers: {
- "Content-Type": "application/json",
- "X-Header": "Header",
- "X-Amzn-Errortype": "ComplexError",
- },
+ Header: "Header"
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 403
+ headers: { "Content-Type": "application/json", "X-Header": "Header", "X-Amzn-Errortype": "ComplexError" }
body: """
- {
- "TopLevel": "Top level",
- "Nested": {
- "Fooooo": "bar"
- }
- }""",
- bodyMediaType: "application/json",
- },
+ {
+ "TopLevel": "Top level",
+ "Nested": {
+ "Fooooo": "bar"
+ }
+ }"""
+ bodyMediaType: "application/json"
+ }
{
- id: "RestJsonEmptyComplexErrorWithNoMessage",
- protocol: restJson1,
- params: {},
- code: 403,
- headers: {
- "Content-Type": "application/json",
- "X-Amzn-Errortype": "ComplexError"
- },
- body: "{}",
- bodyMediaType: "application/json",
- },
+ id: "RestJsonEmptyComplexErrorWithNoMessage"
+ protocol: restJson1
+ params: {}
+ code: 403
+ headers: { "Content-Type": "application/json", "X-Amzn-Errortype": "ComplexError" }
+ body: "{}"
+ bodyMediaType: "application/json"
+ }
])
structure ComplexNestedErrorData {
@jsonName("Fooooo")
- Foo: String,
+ Foo: String
}
/// This error has test cases that test some of the dark corners of Amazon service
@@ -166,145 +145,117 @@ structure FooError {}
apply FooError @httpResponseTests([
{
- id: "RestJsonFooErrorUsingXAmznErrorType",
- documentation: "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.",
- protocol: restJson1,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "FooError",
- },
- appliesTo: "client",
- },
+ id: "RestJsonFooErrorUsingXAmznErrorType"
+ documentation: "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS."
+ protocol: restJson1
+ code: 500
+ headers: { "X-Amzn-Errortype": "FooError" }
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorUsingXAmznErrorTypeWithUri",
+ id: "RestJsonFooErrorUsingXAmznErrorTypeWithUri"
documentation: """
- Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take \
- only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'
+ Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'
is to be interpreted as 'ValidationException'.
- For an example service see Amazon Polly.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/",
- },
- appliesTo: "client",
- },
+ For an example service see Amazon Polly."""
+ protocol: restJson1
+ code: 500
+ headers: { "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" }
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorUsingXAmznErrorTypeWithUriAndNamespace",
+ id: "RestJsonFooErrorUsingXAmznErrorTypeWithUriAndNamespace"
documentation: """
- X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape \
- name. This is a pathalogical case that might not actually happen in any deployed AWS service.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "X-Amzn-Errortype": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/",
- },
- appliesTo: "client",
- },
+ X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service."""
+ protocol: restJson1
+ code: 500
+ headers: { "X-Amzn-Errortype": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" }
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorUsingCode",
+ id: "RestJsonFooErrorUsingCode"
documentation: """
- This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some \
- services do this though it's preferable to send the X-Amzn-Errortype. Client implementations \
- must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.
+ This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.
- For example service see Amazon S3 Glacier.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "Content-Type": "application/json"
- },
+ For example service see Amazon S3 Glacier."""
+ protocol: restJson1
+ code: 500
+ headers: { "Content-Type": "application/json" }
body: """
- {
- "code": "FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorUsingCodeAndNamespace",
+ id: "RestJsonFooErrorUsingCodeAndNamespace"
documentation: """
- Some services serialize errors using code, and it might contain a namespace. \
- Clients should just take the last part of the string after '#'.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "Content-Type": "application/json"
- },
+ Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'."""
+ protocol: restJson1
+ code: 500
+ headers: { "Content-Type": "application/json" }
body: """
- {
- "code": "aws.protocoltests.restjson#FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "aws.protocoltests.restjson#FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorUsingCodeUriAndNamespace",
+ id: "RestJsonFooErrorUsingCodeUriAndNamespace"
documentation: """
- Some services serialize errors using code, and it might contain a namespace. It also might \
- contain a URI. Clients should just take the last part of the string after '#' and before ":". \
- This is a pathalogical case that might not occur in any deployed AWS service.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "Content-Type": "application/json"
- },
+ Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before ":". This is a pathalogical case that might not occur in any deployed AWS service."""
+ protocol: restJson1
+ code: 500
+ headers: { "Content-Type": "application/json" }
body: """
- {
- "code": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "code": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorWithDunderType",
- documentation: "Some services serialize errors using __type.",
- protocol: restJson1,
- code: 500,
- headers: {
- "Content-Type": "application/json"
- },
+ id: "RestJsonFooErrorWithDunderType"
+ documentation: "Some services serialize errors using __type."
+ protocol: restJson1
+ code: 500
+ headers: { "Content-Type": "application/json" }
body: """
- {
- "__type": "FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "__type": "FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorWithDunderTypeAndNamespace",
+ id: "RestJsonFooErrorWithDunderTypeAndNamespace"
documentation: """
- Some services serialize errors using __type, and it might contain a namespace. \
- Clients should just take the last part of the string after '#'.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "Content-Type": "application/json"
- },
+ Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'."""
+ protocol: restJson1
+ code: 500
+ headers: { "Content-Type": "application/json" }
body: """
- {
- "__type": "aws.protocoltests.restjson#FooError"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
- },
+ {
+ "__type": "aws.protocoltests.restjson#FooError"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
+ }
{
- id: "RestJsonFooErrorWithDunderTypeUriAndNamespace",
+ id: "RestJsonFooErrorWithDunderTypeUriAndNamespace"
documentation: """
- Some services serialize errors using __type, and it might contain a namespace. It also might \
- contain a URI. Clients should just take the last part of the string after '#' and before ":". \
- This is a pathalogical case that might not occur in any deployed AWS service.""",
- protocol: restJson1,
- code: 500,
- headers: {
- "Content-Type": "application/json"
- },
+ Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before ":". This is a pathalogical case that might not occur in any deployed AWS service."""
+ protocol: restJson1
+ code: 500
+ headers: { "Content-Type": "application/json" }
body: """
- {
- "__type": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
- }""",
- bodyMediaType: "application/json",
- appliesTo: "client",
+ {
+ "__type": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"
+ }"""
+ bodyMediaType: "application/json"
+ appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/fractional-seconds.smithy b/smithy-aws-protocol-tests/model/restJson1/fractional-seconds.smithy
index cb0d624a653..e3298f6f13a 100644
--- a/smithy-aws-protocol-tests/model/restJson1/fractional-seconds.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/fractional-seconds.smithy
@@ -15,19 +15,18 @@ operation FractionalSeconds {
apply FractionalSeconds @httpResponseTests([
{
- id: "RestJsonDateTimeWithFractionalSeconds",
+ id: "RestJsonDateTimeWithFractionalSeconds"
documentation: """
- Ensures that clients can correctly parse datetime timestamps with fractional seconds""",
- protocol: restJson1,
- code: 200,
- body:
- """
- {
- "datetime": "2000-01-02T20:34:56.123Z"
- }
- """,
+ Ensures that clients can correctly parse datetime timestamps with fractional seconds"""
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "datetime": "2000-01-02T20:34:56.123Z"
+ }
+ """
params: { datetime: 946845296.123 }
- bodyMediaType: "application/json",
+ bodyMediaType: "application/json"
appliesTo: "client"
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy
index 2f2f49e941d..6b9b760be68 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-accept.smithy
@@ -2,43 +2,38 @@ $version: "1.0"
namespace aws.protocoltests.misc
-use aws.protocols#restJson1
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
@readonly
@http(method: "GET", uri: "/test-accept-header")
@documentation("Service accepts `*` in ACCEPT header")
@httpRequestTests([
{
- id: "AcceptHeaderStarRequestTest",
- protocol: "aws.protocols#restJson1",
- uri: "/test-accept-header",
- headers: {
- "Accept": "application/*",
- },
- params: {},
- method: "GET",
- appliesTo: "server",
- },
+ id: "AcceptHeaderStarRequestTest"
+ protocol: "aws.protocols#restJson1"
+ uri: "/test-accept-header"
+ headers: { Accept: "application/*" }
+ params: {}
+ method: "GET"
+ appliesTo: "server"
+ }
{
- id: "AcceptHeaderStarStarRequestTest",
- protocol: "aws.protocols#restJson1",
- uri: "/test-accept-header",
- headers: {
- "Accept": "*/*",
- },
- params: {},
- method: "GET",
- appliesTo: "server",
+ id: "AcceptHeaderStarStarRequestTest"
+ protocol: "aws.protocols#restJson1"
+ uri: "/test-accept-header"
+ headers: { Accept: "*/*" }
+ params: {}
+ method: "GET"
+ appliesTo: "server"
}
])
operation AcceptHeaderStarService {
- input: AcceptHeaderStarServiceInput,
- output: AcceptHeaderStarServiceOutput,
+ input: AcceptHeaderStarServiceInput
+ output: AcceptHeaderStarServiceOutput
}
@output
structure AcceptHeaderStarServiceOutput {}
+
@input
structure AcceptHeaderStarServiceInput {}
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-checksums.smithy b/smithy-aws-protocol-tests/model/restJson1/http-checksums.smithy
index c6ae91a6d90..106c87ab379 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-checksums.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-checksums.smithy
@@ -12,33 +12,28 @@ use smithy.test#httpRequestTests
@httpChecksumRequired
@http(uri: "/HttpChecksumRequired", method: "POST")
operation HttpChecksumRequired {
- input: HttpChecksumRequiredInputOutput,
+ input: HttpChecksumRequiredInputOutput
output: HttpChecksumRequiredInputOutput
}
-structure HttpChecksumRequiredInputOutput{
+structure HttpChecksumRequiredInputOutput {
foo: String
}
apply HttpChecksumRequired @httpRequestTests([
{
- id: "RestJsonHttpChecksumRequired",
- documentation: "Adds Content-MD5 header",
- protocol: restJson1,
- method: "POST",
- uri: "/HttpChecksumRequired",
+ id: "RestJsonHttpChecksumRequired"
+ documentation: "Adds Content-MD5 header"
+ protocol: restJson1
+ method: "POST"
+ uri: "/HttpChecksumRequired"
body: """
- {
- "foo":"base64 encoded md5 checksum"
- }
- """,
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- "Content-MD5": "iB0/3YSo7maijL0IGOgA9g=="
- },
- params: {
- foo: "base64 encoded md5 checksum"
- }
+ {
+ "foo":"base64 encoded md5 checksum"
+ }
+ """
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json", "Content-MD5": "iB0/3YSo7maijL0IGOgA9g==" }
+ params: { foo: "base64 encoded md5 checksum" }
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-content-type.smithy b/smithy-aws-protocol-tests/model/restJson1/http-content-type.smithy
index 3301bb60100..038ea3b98e7 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-content-type.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-content-type.smithy
@@ -1,76 +1,57 @@
// This file defines test cases that test both the HTTP body
// and content-type handling.
-
$version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
-use aws.protocoltests.shared#TextPlainBlob
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// This example operation serializes a structure in the HTTP body.
-///
-/// It should ensure Content-Type: application/json is
-/// used in all requests and that an "empty" body is
-/// an empty JSON document ({}).
-///
@idempotent
@http(uri: "/body", method: "POST")
operation TestBodyStructure {
- input: TestBodyStructureInputOutput,
+ input: TestBodyStructureInputOutput
output: TestBodyStructureInputOutput
}
apply TestBodyStructure @httpRequestTests([
{
- id: "RestJsonTestBodyStructure",
- documentation: "Serializes a structure",
- protocol: restJson1,
- method: "POST",
- uri: "/body",
+ id: "RestJsonTestBodyStructure"
+ documentation: "Serializes a structure"
+ protocol: restJson1
+ method: "POST"
+ uri: "/body"
body: """
- {"testConfig":
- {"timeout": 10}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ {"testConfig":
+ {"timeout": 10}
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ requireHeaders: ["Content-Length"]
params: {
- testConfig: {
- timeout: 10,
- }
+ testConfig: { timeout: 10 }
}
}
])
apply TestBodyStructure @httpRequestTests([
{
- id: "RestJsonHttpWithEmptyBody",
- documentation: "Serializes an empty structure in the body",
- protocol: restJson1,
- method: "POST",
- uri: "/body",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RestJsonHttpWithEmptyBody"
+ documentation: "Serializes an empty structure in the body"
+ protocol: restJson1
+ method: "POST"
+ uri: "/body"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ requireHeaders: ["Content-Length"]
params: {}
}
])
structure TestBodyStructureInputOutput {
@httpHeader("x-amz-test-id")
- testId: String,
+ testId: String
testConfig: TestConfig
}
@@ -87,79 +68,62 @@ structure TestConfig {
@idempotent
@http(uri: "/payload", method: "POST")
operation TestPayloadStructure {
- input: TestPayloadStructureInputOutput,
+ input: TestPayloadStructureInputOutput
output: TestPayloadStructureInputOutput
}
apply TestPayloadStructure @httpRequestTests([
{
- id: "RestJsonHttpWithEmptyStructurePayload",
- documentation: "Serializes a payload targeting an empty structure",
- protocol: restJson1,
- method: "POST",
- uri: "/payload",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RestJsonHttpWithEmptyStructurePayload"
+ documentation: "Serializes a payload targeting an empty structure"
+ protocol: restJson1
+ method: "POST"
+ uri: "/payload"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ requireHeaders: ["Content-Length"]
params: {}
}
])
apply TestPayloadStructure @httpRequestTests([
{
- id: "RestJsonTestPayloadStructure",
- documentation: "Serializes a payload targeting a structure",
- protocol: restJson1,
- method: "POST",
- uri: "/payload",
+ id: "RestJsonTestPayloadStructure"
+ documentation: "Serializes a payload targeting a structure"
+ protocol: restJson1
+ method: "POST"
+ uri: "/payload"
body: """
- {"data": 25
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ {"data": 25
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ requireHeaders: ["Content-Length"]
params: {
- payloadConfig: {
- data: 25,
- }
+ payloadConfig: { data: 25 }
}
}
])
apply TestPayloadStructure @httpRequestTests([
{
- id: "RestJsonHttpWithHeadersButNoPayload",
- documentation: "Serializes an request with header members but no payload",
- protocol: restJson1,
- method: "POST",
- uri: "/payload",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- "X-Amz-Test-Id": "t-12345"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- testId: "t-12345"
- }
+ id: "RestJsonHttpWithHeadersButNoPayload"
+ documentation: "Serializes an request with header members but no payload"
+ protocol: restJson1
+ method: "POST"
+ uri: "/payload"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json", "X-Amz-Test-Id": "t-12345" }
+ requireHeaders: ["Content-Length"]
+ params: { testId: "t-12345" }
}
])
structure TestPayloadStructureInputOutput {
@httpHeader("x-amz-test-id")
- testId: String,
+ testId: String
@httpPayload
payloadConfig: PayloadConfig
@@ -180,51 +144,42 @@ structure PayloadConfig {
@idempotent
@http(uri: "/blob_payload", method: "POST")
operation TestPayloadBlob {
- input: TestPayloadBlobInputOutput,
+ input: TestPayloadBlobInputOutput
output: TestPayloadBlobInputOutput
}
apply TestPayloadBlob @httpRequestTests([
{
- id: "RestJsonHttpWithEmptyBlobPayload",
- documentation: "Serializes a payload targeting an empty blob",
- protocol: restJson1,
- method: "POST",
- uri: "/blob_payload",
- body: "",
- bodyMediaType: "application/octet-stream",
- headers: {
- "Content-Type": "application/octet-stream"
- },
+ id: "RestJsonHttpWithEmptyBlobPayload"
+ documentation: "Serializes a payload targeting an empty blob"
+ protocol: restJson1
+ method: "POST"
+ uri: "/blob_payload"
+ body: ""
+ bodyMediaType: "application/octet-stream"
+ headers: { "Content-Type": "application/octet-stream" }
params: {}
}
])
apply TestPayloadBlob @httpRequestTests([
{
- id: "RestJsonTestPayloadBlob",
- documentation: "Serializes a payload targeting a blob",
- protocol: restJson1,
- method: "POST",
- uri: "/blob_payload",
- body: "1234",
- bodyMediaType: "image/jpg",
- headers: {
- "Content-Type": "image/jpg"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- contentType: "image/jpg",
- data: "1234"
- }
+ id: "RestJsonTestPayloadBlob"
+ documentation: "Serializes a payload targeting a blob"
+ protocol: restJson1
+ method: "POST"
+ uri: "/blob_payload"
+ body: "1234"
+ bodyMediaType: "image/jpg"
+ headers: { "Content-Type": "image/jpg" }
+ requireHeaders: ["Content-Length"]
+ params: { contentType: "image/jpg", data: "1234" }
}
])
structure TestPayloadBlobInputOutput {
@httpHeader("Content-Type")
- contentType: String,
+ contentType: String
@httpPayload
data: Blob
@@ -239,48 +194,38 @@ structure TestPayloadBlobInputOutput {
@readonly
@http(uri: "/no_payload", method: "GET")
operation TestNoPayload {
- input: TestNoPayloadInputOutput,
+ input: TestNoPayloadInputOutput
output: TestNoPayloadInputOutput
}
apply TestNoPayload @httpRequestTests([
{
- id: "RestJsonHttpWithNoModeledBody",
- documentation: "Serializes a GET request with no modeled body",
- protocol: restJson1,
- method: "GET",
- uri: "/no_payload",
- body: "",
- forbidHeaders: [
- "Content-Length",
- "Content-Type"
- ],
+ id: "RestJsonHttpWithNoModeledBody"
+ documentation: "Serializes a GET request with no modeled body"
+ protocol: restJson1
+ method: "GET"
+ uri: "/no_payload"
+ body: ""
+ forbidHeaders: ["Content-Length", "Content-Type"]
params: {}
}
])
apply TestNoPayload @httpRequestTests([
{
- id: "RestJsonHttpWithHeaderMemberNoModeledBody",
- documentation: "Serializes a GET request with header member but no modeled body",
- protocol: restJson1,
- method: "GET",
- uri: "/no_payload",
- body: "",
- headers: {
- "X-Amz-Test-Id": "t-12345"
- },
- forbidHeaders: [
- "Content-Length",
- "Content-Type"
- ],
- params: {
- testId: "t-12345"
- }
+ id: "RestJsonHttpWithHeaderMemberNoModeledBody"
+ documentation: "Serializes a GET request with header member but no modeled body"
+ protocol: restJson1
+ method: "GET"
+ uri: "/no_payload"
+ body: ""
+ headers: { "X-Amz-Test-Id": "t-12345" }
+ forbidHeaders: ["Content-Length", "Content-Type"]
+ params: { testId: "t-12345" }
}
])
structure TestNoPayloadInputOutput {
@httpHeader("X-Amz-Test-Id")
- testId: String,
+ testId: String
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-headers.smithy b/smithy-aws-protocol-tests/model/restJson1/http-headers.smithy
index 46eeafd0b36..d2f1abdb5d8 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-headers.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-headers.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP header bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -11,9 +10,9 @@ use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
+use aws.protocoltests.shared#HttpDate
use aws.protocoltests.shared#IntegerEnum
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#HttpDate
use aws.protocoltests.shared#IntegerList
use aws.protocoltests.shared#StringList
use aws.protocoltests.shared#StringSet
@@ -25,391 +24,302 @@ use smithy.test#httpResponseTests
/// no input or output payload but there are HTTP header bindings.
@http(uri: "/InputAndOutputWithHeaders", method: "POST")
operation InputAndOutputWithHeaders {
- input: InputAndOutputWithHeadersIO,
+ input: InputAndOutputWithHeadersIO
output: InputAndOutputWithHeadersIO
}
apply InputAndOutputWithHeaders @httpRequestTests([
{
- id: "RestJsonInputAndOutputWithStringHeaders",
- documentation: "Tests requests with string header bindings",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-String": "Hello",
- "X-StringList": "a, b, c",
- "X-StringSet": "a, b, c"
- },
- body: "",
+ id: "RestJsonInputAndOutputWithStringHeaders"
+ documentation: "Tests requests with string header bindings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-String": "Hello", "X-StringList": "a, b, c", "X-StringSet": "a, b, c" }
+ body: ""
params: {
- headerString: "Hello",
- headerStringList: ["a", "b", "c"],
- headerStringSet: ["a", "b", "c"],
+ headerString: "Hello"
+ headerStringList: ["a", "b", "c"]
+ headerStringSet: ["a", "b", "c"]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithQuotedStringHeaders",
- documentation: "Tests requests with string list header bindings that require quoting",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-StringList": "\"b,c\", \"\\\"def\\\"\", a"
- },
- body: "",
+ id: "RestJsonInputAndOutputWithQuotedStringHeaders"
+ documentation: "Tests requests with string list header bindings that require quoting"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-StringList": "\"b,c\", \"\\\"def\\\"\", a" }
+ body: ""
params: {
headerStringList: ["b,c", "\"def\"", "a"]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithNumericHeaders",
- documentation: "Tests requests with numeric header bindings",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-Byte": "1",
- "X-Short": "123",
- "X-Integer": "123",
- "X-Long": "123",
- "X-Float": "1.1",
- "X-Double": "1.1",
- "X-IntegerList": "1, 2, 3",
- },
- body: "",
+ id: "RestJsonInputAndOutputWithNumericHeaders"
+ documentation: "Tests requests with numeric header bindings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-Byte": "1", "X-Short": "123", "X-Integer": "123", "X-Long": "123", "X-Float": "1.1", "X-Double": "1.1", "X-IntegerList": "1, 2, 3" }
+ body: ""
params: {
- headerByte: 1,
- headerShort: 123,
- headerInteger: 123,
- headerLong: 123,
- headerFloat: 1.1,
- headerDouble: 1.1,
- headerIntegerList: [1, 2, 3],
+ headerByte: 1
+ headerShort: 123
+ headerInteger: 123
+ headerLong: 123
+ headerFloat: 1.1
+ headerDouble: 1.1
+ headerIntegerList: [1, 2, 3]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithBooleanHeaders",
- documentation: "Tests requests with boolean header bindings",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-Boolean1": "true",
- "X-Boolean2": "false",
- "X-BooleanList": "true, false, true"
- },
- body: "",
+ id: "RestJsonInputAndOutputWithBooleanHeaders"
+ documentation: "Tests requests with boolean header bindings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-Boolean1": "true", "X-Boolean2": "false", "X-BooleanList": "true, false, true" }
+ body: ""
params: {
- headerTrueBool: true,
- headerFalseBool: false,
+ headerTrueBool: true
+ headerFalseBool: false
headerBooleanList: [true, false, true]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithTimestampHeaders",
- documentation: "Tests requests with timestamp header bindings",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT"
- },
- body: "",
+ id: "RestJsonInputAndOutputWithTimestampHeaders"
+ documentation: "Tests requests with timestamp header bindings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT" }
+ body: ""
params: {
headerTimestampList: [1576540098, 1576540098]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithEnumHeaders",
- documentation: "Tests requests with enum header bindings",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-Enum": "Foo",
- "X-EnumList": "Foo, Bar, Baz"
- },
- body: "",
+ id: "RestJsonInputAndOutputWithEnumHeaders"
+ documentation: "Tests requests with enum header bindings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-Enum": "Foo", "X-EnumList": "Foo, Bar, Baz" }
+ body: ""
params: {
- headerEnum: "Foo",
- headerEnumList: ["Foo", "Bar", "Baz"],
+ headerEnum: "Foo"
+ headerEnumList: ["Foo", "Bar", "Baz"]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithIntEnumHeaders",
- documentation: "Tests requests with intEnum header bindings",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-IntegerEnum": "1",
- "X-IntegerEnumList": "1, 2, 3"
- },
- body: "",
+ id: "RestJsonInputAndOutputWithIntEnumHeaders"
+ documentation: "Tests requests with intEnum header bindings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-IntegerEnum": "1", "X-IntegerEnumList": "1, 2, 3" }
+ body: ""
params: {
- headerIntegerEnum: 1,
- headerIntegerEnumList: [1, 2, 3],
+ headerIntegerEnum: 1
+ headerIntegerEnumList: [1, 2, 3]
}
- },
-
+ }
{
- id: "RestJsonSupportsNaNFloatHeaderInputs",
- documentation: "Supports handling NaN float header values.",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- body: "",
- headers: {
- "X-Float": "NaN",
- "X-Double": "NaN",
- },
- params: {
- headerFloat: "NaN",
- headerDouble: "NaN",
- }
- },
+ id: "RestJsonSupportsNaNFloatHeaderInputs"
+ documentation: "Supports handling NaN float header values."
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ body: ""
+ headers: { "X-Float": "NaN", "X-Double": "NaN" }
+ params: { headerFloat: "NaN", headerDouble: "NaN" }
+ }
{
- id: "RestJsonSupportsInfinityFloatHeaderInputs",
- documentation: "Supports handling Infinity float header values.",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- body: "",
- headers: {
- "X-Float": "Infinity",
- "X-Double": "Infinity",
- },
- params: {
- headerFloat: "Infinity",
- headerDouble: "Infinity",
- }
- },
+ id: "RestJsonSupportsInfinityFloatHeaderInputs"
+ documentation: "Supports handling Infinity float header values."
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ body: ""
+ headers: { "X-Float": "Infinity", "X-Double": "Infinity" }
+ params: { headerFloat: "Infinity", headerDouble: "Infinity" }
+ }
{
- id: "RestJsonSupportsNegativeInfinityFloatHeaderInputs",
- documentation: "Supports handling -Infinity float header values.",
- protocol: restJson1,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- body: "",
- headers: {
- "X-Float": "-Infinity",
- "X-Double": "-Infinity",
- },
- params: {
- headerFloat: "-Infinity",
- headerDouble: "-Infinity",
- }
- },
+ id: "RestJsonSupportsNegativeInfinityFloatHeaderInputs"
+ documentation: "Supports handling -Infinity float header values."
+ protocol: restJson1
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ body: ""
+ headers: { "X-Float": "-Infinity", "X-Double": "-Infinity" }
+ params: { headerFloat: "-Infinity", headerDouble: "-Infinity" }
+ }
])
apply InputAndOutputWithHeaders @httpResponseTests([
{
- id: "RestJsonInputAndOutputWithStringHeaders",
- documentation: "Tests responses with string header bindings",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-String": "Hello",
- "X-StringList": "a, b, c",
- "X-StringSet": "a, b, c"
- },
+ id: "RestJsonInputAndOutputWithStringHeaders"
+ documentation: "Tests responses with string header bindings"
+ protocol: restJson1
+ code: 200
+ headers: { "X-String": "Hello", "X-StringList": "a, b, c", "X-StringSet": "a, b, c" }
params: {
- headerString: "Hello",
- headerStringList: ["a", "b", "c"],
- headerStringSet: ["a", "b", "c"],
+ headerString: "Hello"
+ headerStringList: ["a", "b", "c"]
+ headerStringSet: ["a", "b", "c"]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithQuotedStringHeaders",
- documentation: "Tests responses with string list header bindings that require quoting",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-StringList": "\"b,c\", \"\\\"def\\\"\", a"
- },
+ id: "RestJsonInputAndOutputWithQuotedStringHeaders"
+ documentation: "Tests responses with string list header bindings that require quoting"
+ protocol: restJson1
+ code: 200
+ headers: { "X-StringList": "\"b,c\", \"\\\"def\\\"\", a" }
params: {
headerStringList: ["b,c", "\"def\"", "a"]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithNumericHeaders",
- documentation: "Tests responses with numeric header bindings",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Byte": "1",
- "X-Short": "123",
- "X-Integer": "123",
- "X-Long": "123",
- "X-Float": "1.1",
- "X-Double": "1.1",
- "X-IntegerList": "1, 2, 3",
- },
+ id: "RestJsonInputAndOutputWithNumericHeaders"
+ documentation: "Tests responses with numeric header bindings"
+ protocol: restJson1
+ code: 200
+ headers: { "X-Byte": "1", "X-Short": "123", "X-Integer": "123", "X-Long": "123", "X-Float": "1.1", "X-Double": "1.1", "X-IntegerList": "1, 2, 3" }
params: {
- headerByte: 1,
- headerShort: 123,
- headerInteger: 123,
- headerLong: 123,
- headerFloat: 1.1,
- headerDouble: 1.1,
- headerIntegerList: [1, 2, 3],
+ headerByte: 1
+ headerShort: 123
+ headerInteger: 123
+ headerLong: 123
+ headerFloat: 1.1
+ headerDouble: 1.1
+ headerIntegerList: [1, 2, 3]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithBooleanHeaders",
- documentation: "Tests responses with boolean header bindings",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Boolean1": "true",
- "X-Boolean2": "false",
- "X-BooleanList": "true, false, true"
- },
+ id: "RestJsonInputAndOutputWithBooleanHeaders"
+ documentation: "Tests responses with boolean header bindings"
+ protocol: restJson1
+ code: 200
+ headers: { "X-Boolean1": "true", "X-Boolean2": "false", "X-BooleanList": "true, false, true" }
params: {
- headerTrueBool: true,
- headerFalseBool: false,
+ headerTrueBool: true
+ headerFalseBool: false
headerBooleanList: [true, false, true]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithTimestampHeaders",
- documentation: "Tests responses with timestamp header bindings",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT"
- },
+ id: "RestJsonInputAndOutputWithTimestampHeaders"
+ documentation: "Tests responses with timestamp header bindings"
+ protocol: restJson1
+ code: 200
+ headers: { "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT" }
params: {
headerTimestampList: [1576540098, 1576540098]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithEnumHeaders",
- documentation: "Tests responses with enum header bindings",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Enum": "Foo",
- "X-EnumList": "Foo, Bar, Baz"
- },
+ id: "RestJsonInputAndOutputWithEnumHeaders"
+ documentation: "Tests responses with enum header bindings"
+ protocol: restJson1
+ code: 200
+ headers: { "X-Enum": "Foo", "X-EnumList": "Foo, Bar, Baz" }
params: {
- headerEnum: "Foo",
- headerEnumList: ["Foo", "Bar", "Baz"],
+ headerEnum: "Foo"
+ headerEnumList: ["Foo", "Bar", "Baz"]
}
- },
+ }
{
- id: "RestJsonInputAndOutputWithIntEnumHeaders",
- documentation: "Tests responses with intEnum header bindings",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-IntegerEnum": "1",
- "X-IntegerEnumList": "1, 2, 3"
- },
+ id: "RestJsonInputAndOutputWithIntEnumHeaders"
+ documentation: "Tests responses with intEnum header bindings"
+ protocol: restJson1
+ code: 200
+ headers: { "X-IntegerEnum": "1", "X-IntegerEnumList": "1, 2, 3" }
params: {
- headerIntegerEnum: 1,
- headerIntegerEnumList: [1, 2, 3],
+ headerIntegerEnum: 1
+ headerIntegerEnumList: [1, 2, 3]
}
- },
+ }
{
- id: "RestJsonSupportsNaNFloatHeaderOutputs",
- documentation: "Supports handling NaN float header values.",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Float": "NaN",
- "X-Double": "NaN",
- },
- params: {
- headerFloat: "NaN",
- headerDouble: "NaN",
- }
- },
+ id: "RestJsonSupportsNaNFloatHeaderOutputs"
+ documentation: "Supports handling NaN float header values."
+ protocol: restJson1
+ code: 200
+ headers: { "X-Float": "NaN", "X-Double": "NaN" }
+ params: { headerFloat: "NaN", headerDouble: "NaN" }
+ }
{
- id: "RestJsonSupportsInfinityFloatHeaderOutputs",
- documentation: "Supports handling Infinity float header values.",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Float": "Infinity",
- "X-Double": "Infinity",
- },
- params: {
- headerFloat: "Infinity",
- headerDouble: "Infinity",
- }
- },
+ id: "RestJsonSupportsInfinityFloatHeaderOutputs"
+ documentation: "Supports handling Infinity float header values."
+ protocol: restJson1
+ code: 200
+ headers: { "X-Float": "Infinity", "X-Double": "Infinity" }
+ params: { headerFloat: "Infinity", headerDouble: "Infinity" }
+ }
{
- id: "RestJsonSupportsNegativeInfinityFloatHeaderOutputs",
- documentation: "Supports handling -Infinity float header values.",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Float": "-Infinity",
- "X-Double": "-Infinity",
- },
- params: {
- headerFloat: "-Infinity",
- headerDouble: "-Infinity",
- }
- },
+ id: "RestJsonSupportsNegativeInfinityFloatHeaderOutputs"
+ documentation: "Supports handling -Infinity float header values."
+ protocol: restJson1
+ code: 200
+ headers: { "X-Float": "-Infinity", "X-Double": "-Infinity" }
+ params: { headerFloat: "-Infinity", headerDouble: "-Infinity" }
+ }
])
structure InputAndOutputWithHeadersIO {
@httpHeader("X-String")
- headerString: String,
+ headerString: String
@httpHeader("X-Byte")
- headerByte: Byte,
+ headerByte: Byte
@httpHeader("X-Short")
- headerShort: Short,
+ headerShort: Short
@httpHeader("X-Integer")
- headerInteger: Integer,
+ headerInteger: Integer
@httpHeader("X-Long")
- headerLong: Long,
+ headerLong: Long
@httpHeader("X-Float")
- headerFloat: Float,
+ headerFloat: Float
@httpHeader("X-Double")
- headerDouble: Double,
+ headerDouble: Double
@httpHeader("X-Boolean1")
- headerTrueBool: Boolean,
+ headerTrueBool: Boolean
@httpHeader("X-Boolean2")
- headerFalseBool: Boolean,
+ headerFalseBool: Boolean
@httpHeader("X-StringList")
- headerStringList: StringList,
+ headerStringList: StringList
@httpHeader("X-StringSet")
- headerStringSet: StringSet,
+ headerStringSet: StringSet
@httpHeader("X-IntegerList")
- headerIntegerList: IntegerList,
+ headerIntegerList: IntegerList
@httpHeader("X-BooleanList")
- headerBooleanList: BooleanList,
+ headerBooleanList: BooleanList
@httpHeader("X-TimestampList")
- headerTimestampList: TimestampList,
+ headerTimestampList: TimestampList
@httpHeader("X-Enum")
- headerEnum: FooEnum,
+ headerEnum: FooEnum
@httpHeader("X-EnumList")
- headerEnumList: FooEnumList,
+ headerEnumList: FooEnumList
@httpHeader("X-IntegerEnum")
- headerIntegerEnum: IntegerEnum,
+ headerIntegerEnum: IntegerEnum
@httpHeader("X-IntegerEnumList")
- headerIntegerEnumList: IntegerEnumList,
+ headerIntegerEnumList: IntegerEnumList
}
/// Null and empty headers are not sent over the wire.
@@ -417,26 +327,26 @@ structure InputAndOutputWithHeadersIO {
@http(uri: "/NullAndEmptyHeadersClient", method: "GET")
@tags(["client-only"])
operation NullAndEmptyHeadersClient {
- input: NullAndEmptyHeadersIO,
+ input: NullAndEmptyHeadersIO
output: NullAndEmptyHeadersIO
}
apply NullAndEmptyHeadersClient @httpRequestTests([
{
- id: "RestJsonNullAndEmptyHeaders",
- documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
- protocol: restJson1,
- method: "GET",
- uri: "/NullAndEmptyHeadersClient",
- forbidHeaders: ["X-A", "X-B", "X-C"],
- body: "",
+ id: "RestJsonNullAndEmptyHeaders"
+ documentation: "Do not send null values, empty strings, or empty lists over the wire in headers"
+ protocol: restJson1
+ method: "GET"
+ uri: "/NullAndEmptyHeadersClient"
+ forbidHeaders: ["X-A", "X-B", "X-C"]
+ body: ""
params: {
- a: null,
- b: "",
- c: [],
- },
- appliesTo: "client",
- },
+ a: null
+ b: ""
+ c: []
+ }
+ appliesTo: "client"
+ }
])
/// Null and empty headers are not sent over the wire.
@@ -444,174 +354,134 @@ apply NullAndEmptyHeadersClient @httpRequestTests([
@http(uri: "/NullAndEmptyHeadersServer", method: "GET")
@tags(["server-only"])
operation NullAndEmptyHeadersServer {
- input: NullAndEmptyHeadersIO,
+ input: NullAndEmptyHeadersIO
output: NullAndEmptyHeadersIO
}
apply NullAndEmptyHeadersServer @httpResponseTests([
{
- id: "RestJsonNullAndEmptyHeaders",
- documentation: "Do not send null or empty headers",
- protocol: restJson1,
- code: 200,
- forbidHeaders: ["X-A", "X-B", "X-C"],
+ id: "RestJsonNullAndEmptyHeaders"
+ documentation: "Do not send null or empty headers"
+ protocol: restJson1
+ code: 200
+ forbidHeaders: ["X-A", "X-B", "X-C"]
params: {
- a: null,
- b: "",
- c: [],
- },
- appliesTo: "server",
- },
+ a: null
+ b: ""
+ c: []
+ }
+ appliesTo: "server"
+ }
])
structure NullAndEmptyHeadersIO {
@httpHeader("X-A")
- a: String,
+ a: String
@httpHeader("X-B")
- b: String,
+ b: String
@httpHeader("X-C")
- c: StringList,
+ c: StringList
}
/// This example tests how timestamp request and response headers are serialized.
@http(uri: "/TimestampFormatHeaders", method: "POST")
operation TimestampFormatHeaders {
- input: TimestampFormatHeadersIO,
+ input: TimestampFormatHeadersIO
output: TimestampFormatHeadersIO
}
apply TimestampFormatHeaders @httpRequestTests([
{
- id: "RestJsonTimestampFormatHeaders",
- documentation: "Tests how timestamp request headers are serialized",
- protocol: restJson1,
- method: "POST",
- uri: "/TimestampFormatHeaders",
- headers: {
- "X-memberEpochSeconds": "1576540098",
- "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-memberDateTime": "2019-12-16T23:48:18Z",
- "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetEpochSeconds": "1576540098",
- "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetDateTime": "2019-12-16T23:48:18Z",
- },
- body: "",
- params: {
- memberEpochSeconds: 1576540098,
- memberHttpDate: 1576540098,
- memberDateTime: 1576540098,
- defaultFormat: 1576540098,
- targetEpochSeconds: 1576540098,
- targetHttpDate: 1576540098,
- targetDateTime: 1576540098,
- }
- },
+ id: "RestJsonTimestampFormatHeaders"
+ documentation: "Tests how timestamp request headers are serialized"
+ protocol: restJson1
+ method: "POST"
+ uri: "/TimestampFormatHeaders"
+ headers: { "X-memberEpochSeconds": "1576540098", "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberDateTime": "2019-12-16T23:48:18Z", "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetEpochSeconds": "1576540098", "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetDateTime": "2019-12-16T23:48:18Z" }
+ body: ""
+ params: { memberEpochSeconds: 1576540098, memberHttpDate: 1576540098, memberDateTime: 1576540098, defaultFormat: 1576540098, targetEpochSeconds: 1576540098, targetHttpDate: 1576540098, targetDateTime: 1576540098 }
+ }
])
apply TimestampFormatHeaders @httpResponseTests([
{
- id: "RestJsonTimestampFormatHeaders",
- documentation: "Tests how timestamp response headers are serialized",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-memberEpochSeconds": "1576540098",
- "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-memberDateTime": "2019-12-16T23:48:18Z",
- "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetEpochSeconds": "1576540098",
- "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetDateTime": "2019-12-16T23:48:18Z",
- },
- params: {
- memberEpochSeconds: 1576540098,
- memberHttpDate: 1576540098,
- memberDateTime: 1576540098,
- defaultFormat: 1576540098,
- targetEpochSeconds: 1576540098,
- targetHttpDate: 1576540098,
- targetDateTime: 1576540098,
- }
- },
+ id: "RestJsonTimestampFormatHeaders"
+ documentation: "Tests how timestamp response headers are serialized"
+ protocol: restJson1
+ code: 200
+ headers: { "X-memberEpochSeconds": "1576540098", "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberDateTime": "2019-12-16T23:48:18Z", "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetEpochSeconds": "1576540098", "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetDateTime": "2019-12-16T23:48:18Z" }
+ params: { memberEpochSeconds: 1576540098, memberHttpDate: 1576540098, memberDateTime: 1576540098, defaultFormat: 1576540098, targetEpochSeconds: 1576540098, targetHttpDate: 1576540098, targetDateTime: 1576540098 }
+ }
])
structure TimestampFormatHeadersIO {
@httpHeader("X-memberEpochSeconds")
@timestampFormat("epoch-seconds")
- memberEpochSeconds: Timestamp,
+ memberEpochSeconds: Timestamp
@httpHeader("X-memberHttpDate")
@timestampFormat("http-date")
- memberHttpDate: Timestamp,
+ memberHttpDate: Timestamp
@httpHeader("X-memberDateTime")
@timestampFormat("date-time")
- memberDateTime: Timestamp,
+ memberDateTime: Timestamp
@httpHeader("X-defaultFormat")
- defaultFormat: Timestamp,
+ defaultFormat: Timestamp
@httpHeader("X-targetEpochSeconds")
- targetEpochSeconds: EpochSeconds,
+ targetEpochSeconds: EpochSeconds
@httpHeader("X-targetHttpDate")
- targetHttpDate: HttpDate,
+ targetHttpDate: HttpDate
@httpHeader("X-targetDateTime")
- targetDateTime: DateTime,
+ targetDateTime: DateTime
}
/// This example ensures that mediaType strings are base64 encoded in headers.
@readonly
@http(uri: "/MediaTypeHeader", method: "GET")
operation MediaTypeHeader {
- input: MediaTypeHeaderInput,
+ input: MediaTypeHeaderInput
output: MediaTypeHeaderOutput
}
apply MediaTypeHeader @httpRequestTests([
{
- id: "MediaTypeHeaderInputBase64",
- documentation: "Headers that target strings with a mediaType are base64 encoded",
- protocol: restJson1,
- method: "GET",
- uri: "/MediaTypeHeader",
- headers: {
- "X-Json": "dHJ1ZQ=="
- },
- body: "",
- params: {
- json: "true"
- }
- },
+ id: "MediaTypeHeaderInputBase64"
+ documentation: "Headers that target strings with a mediaType are base64 encoded"
+ protocol: restJson1
+ method: "GET"
+ uri: "/MediaTypeHeader"
+ headers: { "X-Json": "dHJ1ZQ==" }
+ body: ""
+ params: { json: "true" }
+ }
])
apply MediaTypeHeader @httpResponseTests([
{
- id: "MediaTypeHeaderOutputBase64",
- documentation: "Headers that target strings with a mediaType are base64 encoded",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Json": "dHJ1ZQ=="
- },
- params: {
- json: "true"
- }
- },
+ id: "MediaTypeHeaderOutputBase64"
+ documentation: "Headers that target strings with a mediaType are base64 encoded"
+ protocol: restJson1
+ code: 200
+ headers: { "X-Json": "dHJ1ZQ==" }
+ params: { json: "true" }
+ }
])
structure MediaTypeHeaderInput {
@httpHeader("X-Json")
- json: JsonValue,
+ json: JsonValue
}
structure MediaTypeHeaderOutput {
@httpHeader("X-Json")
- json: JsonValue,
+ json: JsonValue
}
@mediaType("application/json")
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-labels.smithy b/smithy-aws-protocol-tests/model/restJson1/http-labels.smithy
index 1ffccfbcd56..91405b506ce 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-labels.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-labels.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP URI label bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httplabel-trait
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -10,158 +9,128 @@ use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#HttpDate
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// The example tests how requests are serialized when there's no input
-/// payload but there are HTTP labels.
@readonly
-@http(method: "GET", uri: "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}")
+@http(
+ method: "GET"
+ uri: "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}"
+)
operation HttpRequestWithLabels {
input: HttpRequestWithLabelsInput
}
apply HttpRequestWithLabels @httpRequestTests([
{
- id: "RestJsonInputWithHeadersAndAllParams",
- documentation: "Sends a GET request that uses URI label bindings",
- protocol: restJson1,
- method: "GET",
- uri: "/HttpRequestWithLabels/string/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
- body: "",
- params: {
- string: "string",
- short: 1,
- integer: 2,
- long: 3,
- float: 4.1,
- double: 5.1,
- boolean: true,
- timestamp: 1576540098
- }
- },
+ id: "RestJsonInputWithHeadersAndAllParams"
+ documentation: "Sends a GET request that uses URI label bindings"
+ protocol: restJson1
+ method: "GET"
+ uri: "/HttpRequestWithLabels/string/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z"
+ body: ""
+ params: { string: "string", short: 1, integer: 2, long: 3, float: 4.1, double: 5.1, boolean: true, timestamp: 1576540098 }
+ }
{
- id: "RestJsonHttpRequestLabelEscaping",
- documentation: "Sends a GET request that uses URI label bindings",
- protocol: restJson1,
- method: "GET",
- uri: "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
- body: "",
- params: {
- string: " %:/?#[]@!$&'()*+,;=😹",
- short: 1,
- integer: 2,
- long: 3,
- float: 4.1,
- double: 5.1,
- boolean: true,
- timestamp: 1576540098
- }
- },
+ id: "RestJsonHttpRequestLabelEscaping"
+ documentation: "Sends a GET request that uses URI label bindings"
+ protocol: restJson1
+ method: "GET"
+ uri: "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z"
+ body: ""
+ params: { string: " %:/?#[]@!$&'()*+,;=😹", short: 1, integer: 2, long: 3, float: 4.1, double: 5.1, boolean: true, timestamp: 1576540098 }
+ }
])
structure HttpRequestWithLabelsInput {
@httpLabel
@required
- string: String,
+ string: String
@httpLabel
@required
- short: Short,
+ short: Short
@httpLabel
@required
- integer: Integer,
+ integer: Integer
@httpLabel
@required
- long: Long,
+ long: Long
@httpLabel
@required
- float: Float,
+ float: Float
@httpLabel
@required
- double: Double,
+ double: Double
/// Serialized in the path as true or false.
@httpLabel
@required
- boolean: Boolean,
+ boolean: Boolean
/// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
@httpLabel
@required
- timestamp: Timestamp,
+ timestamp: Timestamp
}
/// The example tests how requests serialize different timestamp formats in the
/// URI path.
@readonly
-@http(method: "GET", uri: "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}")
+@http(
+ method: "GET"
+ uri: "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}"
+)
operation HttpRequestWithLabelsAndTimestampFormat {
input: HttpRequestWithLabelsAndTimestampFormatInput
}
apply HttpRequestWithLabelsAndTimestampFormat @httpRequestTests([
{
- id: "RestJsonHttpRequestWithLabelsAndTimestampFormat",
- documentation: "Serializes different timestamp formats in URI labels",
- protocol: restJson1,
- method: "GET",
+ id: "RestJsonHttpRequestWithLabelsAndTimestampFormat"
+ documentation: "Serializes different timestamp formats in URI labels"
+ protocol: restJson1
+ method: "GET"
uri: """
- /HttpRequestWithLabelsAndTimestampFormat\
- /1576540098\
- /Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT\
- /2019-12-16T23%3A48%3A18Z\
- /2019-12-16T23%3A48%3A18Z\
- /1576540098\
- /Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT\
- /2019-12-16T23%3A48%3A18Z""",
- body: "",
- params: {
- memberEpochSeconds: 1576540098,
- memberHttpDate: 1576540098,
- memberDateTime: 1576540098,
- defaultFormat: 1576540098,
- targetEpochSeconds: 1576540098,
- targetHttpDate: 1576540098,
- targetDateTime: 1576540098,
- }
- },
+ /HttpRequestWithLabelsAndTimestampFormat/1576540098/Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT/2019-12-16T23%3A48%3A18Z/2019-12-16T23%3A48%3A18Z/1576540098/Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT/2019-12-16T23%3A48%3A18Z"""
+ body: ""
+ params: { memberEpochSeconds: 1576540098, memberHttpDate: 1576540098, memberDateTime: 1576540098, defaultFormat: 1576540098, targetEpochSeconds: 1576540098, targetHttpDate: 1576540098, targetDateTime: 1576540098 }
+ }
])
structure HttpRequestWithLabelsAndTimestampFormatInput {
@httpLabel
@required
@timestampFormat("epoch-seconds")
- memberEpochSeconds: Timestamp,
+ memberEpochSeconds: Timestamp
@httpLabel
@required
@timestampFormat("http-date")
- memberHttpDate: Timestamp,
+ memberHttpDate: Timestamp
@httpLabel
@required
@timestampFormat("date-time")
- memberDateTime: Timestamp,
+ memberDateTime: Timestamp
@httpLabel
@required
- defaultFormat: Timestamp,
+ defaultFormat: Timestamp
@httpLabel
@required
- targetEpochSeconds: EpochSeconds,
+ targetEpochSeconds: EpochSeconds
@httpLabel
@required
- targetHttpDate: HttpDate,
+ targetHttpDate: HttpDate
@httpLabel
@required
- targetDateTime: DateTime,
+ targetDateTime: DateTime
}
// This example uses a greedy label and a normal label.
@@ -173,66 +142,54 @@ operation HttpRequestWithGreedyLabelInPath {
apply HttpRequestWithGreedyLabelInPath @httpRequestTests([
{
- id: "RestJsonHttpRequestWithGreedyLabelInPath",
- documentation: "Serializes greedy labels and normal labels",
- protocol: restJson1,
- method: "GET",
- uri: "/HttpRequestWithGreedyLabelInPath/foo/hello%2Fescape/baz/there/guy",
- body: "",
- params: {
- foo: "hello/escape",
- baz: "there/guy",
- }
- },
+ id: "RestJsonHttpRequestWithGreedyLabelInPath"
+ documentation: "Serializes greedy labels and normal labels"
+ protocol: restJson1
+ method: "GET"
+ uri: "/HttpRequestWithGreedyLabelInPath/foo/hello%2Fescape/baz/there/guy"
+ body: ""
+ params: { foo: "hello/escape", baz: "there/guy" }
+ }
])
structure HttpRequestWithGreedyLabelInPathInput {
@httpLabel
@required
- foo: String,
+ foo: String
@httpLabel
@required
- baz: String,
+ baz: String
}
apply HttpRequestWithFloatLabels @httpRequestTests([
{
- id: "RestJsonSupportsNaNFloatLabels",
- documentation: "Supports handling NaN float label values.",
- protocol: restJson1,
- method: "GET",
- uri: "/FloatHttpLabels/NaN/NaN",
- body: "",
- params: {
- float: "NaN",
- double: "NaN",
- }
- },
+ id: "RestJsonSupportsNaNFloatLabels"
+ documentation: "Supports handling NaN float label values."
+ protocol: restJson1
+ method: "GET"
+ uri: "/FloatHttpLabels/NaN/NaN"
+ body: ""
+ params: { float: "NaN", double: "NaN" }
+ }
{
- id: "RestJsonSupportsInfinityFloatLabels",
- documentation: "Supports handling Infinity float label values.",
- protocol: restJson1,
- method: "GET",
- uri: "/FloatHttpLabels/Infinity/Infinity",
- body: "",
- params: {
- float: "Infinity",
- double: "Infinity",
- }
- },
+ id: "RestJsonSupportsInfinityFloatLabels"
+ documentation: "Supports handling Infinity float label values."
+ protocol: restJson1
+ method: "GET"
+ uri: "/FloatHttpLabels/Infinity/Infinity"
+ body: ""
+ params: { float: "Infinity", double: "Infinity" }
+ }
{
- id: "RestJsonSupportsNegativeInfinityFloatLabels",
- documentation: "Supports handling -Infinity float label values.",
- protocol: restJson1,
- method: "GET",
- uri: "/FloatHttpLabels/-Infinity/-Infinity",
- body: "",
- params: {
- float: "-Infinity",
- double: "-Infinity",
- }
- },
+ id: "RestJsonSupportsNegativeInfinityFloatLabels"
+ documentation: "Supports handling -Infinity float label values."
+ protocol: restJson1
+ method: "GET"
+ uri: "/FloatHttpLabels/-Infinity/-Infinity"
+ body: ""
+ params: { float: "-Infinity", double: "-Infinity" }
+ }
])
@readonly
@@ -244,25 +201,23 @@ operation HttpRequestWithFloatLabels {
structure HttpRequestWithFloatLabelsInput {
@httpLabel
@required
- float: Float,
+ float: Float
@httpLabel
@required
- double: Double,
+ double: Double
}
apply HttpRequestWithRegexLiteral @httpRequestTests([
{
- id: "RestJsonToleratesRegexCharsInSegments",
- documentation: "Path matching is not broken by regex expressions in literal segments",
- protocol: restJson1,
- method: "GET",
- uri: "/ReDosLiteral/abc/(a+)+",
- body: "",
- params: {
- str: "abc"
- }
- },
+ id: "RestJsonToleratesRegexCharsInSegments"
+ documentation: "Path matching is not broken by regex expressions in literal segments"
+ protocol: restJson1
+ method: "GET"
+ uri: "/ReDosLiteral/abc/(a+)+"
+ body: ""
+ params: { str: "abc" }
+ }
])
@readonly
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-payload.smithy b/smithy-aws-protocol-tests/model/restJson1/http-payload.smithy
index d2acdae8fb7..6319740bda4 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-payload.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-payload.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP payload bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httppayload-trait
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -16,184 +15,137 @@ use smithy.test#httpResponseTests
/// not a structure or a union type.
@http(uri: "/HttpPayloadTraits", method: "POST")
operation HttpPayloadTraits {
- input: HttpPayloadTraitsInputOutput,
+ input: HttpPayloadTraitsInputOutput
output: HttpPayloadTraitsInputOutput
}
apply HttpPayloadTraits @httpRequestTests([
{
- id: "RestJsonHttpPayloadTraitsWithBlob",
- documentation: "Serializes a blob in the HTTP payload",
- protocol: restJson1,
- method: "POST",
- uri: "/HttpPayloadTraits",
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "Content-Type": "application/octet-stream",
- "X-Foo": "Foo"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "RestJsonHttpPayloadTraitsWithBlob"
+ documentation: "Serializes a blob in the HTTP payload"
+ protocol: restJson1
+ method: "POST"
+ uri: "/HttpPayloadTraits"
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "Content-Type": "application/octet-stream", "X-Foo": "Foo" }
+ requireHeaders: ["Content-Length"]
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "RestJsonHttpPayloadTraitsWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restJson1,
- method: "POST",
- uri: "/HttpPayloadTraits",
- body: "",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
- },
+ id: "RestJsonHttpPayloadTraitsWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restJson1
+ method: "POST"
+ uri: "/HttpPayloadTraits"
+ body: ""
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
+ }
{
- id: "RestJsonHttpPayloadTraitsWithBlobAcceptsAllContentTypes",
+ id: "RestJsonHttpPayloadTraitsWithBlobAcceptsAllContentTypes"
documentation: """
Servers must accept any content type for blob inputs
- without the media type trait.""",
- protocol: restJson1,
- method: "POST",
- uri: "/HttpPayloadTraits",
- body: "This is definitely a jpeg",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "image/jpeg"
- },
- params: {
- foo: "Foo",
- blob: "This is definitely a jpeg"
- },
- appliesTo: "server",
- },
+ without the media type trait."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/HttpPayloadTraits"
+ body: "This is definitely a jpeg"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "image/jpeg" }
+ params: { foo: "Foo", blob: "This is definitely a jpeg" }
+ appliesTo: "server"
+ }
{
- id: "RestJsonHttpPayloadTraitsWithBlobAcceptsAllAccepts",
+ id: "RestJsonHttpPayloadTraitsWithBlobAcceptsAllAccepts"
documentation: """
Servers must accept any accept header for blob inputs
- without the media type trait.""",
- protocol: restJson1,
- method: "POST",
- uri: "/HttpPayloadTraits",
- body: "This is definitely a jpeg",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Accept": "image/jpeg"
- },
- params: {
- foo: "Foo",
- blob: "This is definitely a jpeg"
- },
- appliesTo: "server",
- },
+ without the media type trait."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/HttpPayloadTraits"
+ body: "This is definitely a jpeg"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", Accept: "image/jpeg" }
+ params: { foo: "Foo", blob: "This is definitely a jpeg" }
+ appliesTo: "server"
+ }
])
apply HttpPayloadTraits @httpResponseTests([
{
- id: "RestJsonHttpPayloadTraitsWithBlob",
- documentation: "Serializes a blob in the HTTP payload",
- protocol: restJson1,
- code: 200,
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "RestJsonHttpPayloadTraitsWithBlob"
+ documentation: "Serializes a blob in the HTTP payload"
+ protocol: restJson1
+ code: 200
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "RestJsonHttpPayloadTraitsWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restJson1,
- code: 200,
- body: "",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
- },
+ id: "RestJsonHttpPayloadTraitsWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restJson1
+ code: 200
+ body: ""
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
+ }
])
structure HttpPayloadTraitsInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
- blob: Blob,
+ blob: Blob
}
/// This example uses a `@mediaType` trait on the payload to force a custom
/// content-type to be serialized.
@http(uri: "/HttpPayloadTraitsWithMediaType", method: "POST")
operation HttpPayloadTraitsWithMediaType {
- input: HttpPayloadTraitsWithMediaTypeInputOutput,
+ input: HttpPayloadTraitsWithMediaTypeInputOutput
output: HttpPayloadTraitsWithMediaTypeInputOutput
}
apply HttpPayloadTraitsWithMediaType @httpRequestTests([
{
- id: "RestJsonHttpPayloadTraitsWithMediaTypeWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a content-type",
- protocol: restJson1,
- method: "POST",
- uri: "/HttpPayloadTraitsWithMediaType",
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "text/plain"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
+ id: "RestJsonHttpPayloadTraitsWithMediaTypeWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a content-type"
+ protocol: restJson1
+ method: "POST"
+ uri: "/HttpPayloadTraitsWithMediaType"
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "text/plain" }
+ requireHeaders: ["Content-Length"]
+ params: { foo: "Foo", blob: "blobby blob blob" }
}
])
apply HttpPayloadTraitsWithMediaType @httpResponseTests([
{
- id: "RestJsonHttpPayloadTraitsWithMediaTypeWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a content-type",
- protocol: restJson1,
- code: 200,
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "text/plain"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
+ id: "RestJsonHttpPayloadTraitsWithMediaTypeWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a content-type"
+ protocol: restJson1
+ code: 200
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "text/plain" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
}
])
structure HttpPayloadTraitsWithMediaTypeInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
- blob: TextPlainBlob,
+ blob: TextPlainBlob
}
/// This example serializes a structure in the payload.
@@ -203,151 +155,127 @@ structure HttpPayloadTraitsWithMediaTypeInputOutput {
@idempotent
@http(uri: "/HttpPayloadWithStructure", method: "PUT")
operation HttpPayloadWithStructure {
- input: HttpPayloadWithStructureInputOutput,
+ input: HttpPayloadWithStructureInputOutput
output: HttpPayloadWithStructureInputOutput
}
apply HttpPayloadWithStructure @httpRequestTests([
{
- id: "RestJsonHttpPayloadWithStructure",
- documentation: "Serializes a structure in the payload",
- protocol: restJson1,
- method: "PUT",
- uri: "/HttpPayloadWithStructure",
+ id: "RestJsonHttpPayloadWithStructure"
+ documentation: "Serializes a structure in the payload"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/HttpPayloadWithStructure"
body: """
- {
- "greeting": "hello",
- "name": "Phreddy"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ {
+ "greeting": "hello",
+ "name": "Phreddy"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- greeting: "hello",
- name: "Phreddy"
- }
+ nested: { greeting: "hello", name: "Phreddy" }
}
}
])
apply HttpPayloadWithStructure @httpResponseTests([
{
- id: "RestJsonHttpPayloadWithStructure",
- documentation: "Serializes a structure in the payload",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonHttpPayloadWithStructure"
+ documentation: "Serializes a structure in the payload"
+ protocol: restJson1
+ code: 200
body: """
- {
- "greeting": "hello",
- "name": "Phreddy"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ {
+ "greeting": "hello",
+ "name": "Phreddy"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- nested: {
- greeting: "hello",
- name: "Phreddy"
- }
+ nested: { greeting: "hello", name: "Phreddy" }
}
}
])
structure HttpPayloadWithStructureInputOutput {
@httpPayload
- nested: NestedPayload,
+ nested: NestedPayload
}
structure NestedPayload {
- greeting: String,
- name: String,
+ greeting: String
+ name: String
}
/// This example serializes a union in the payload.
@idempotent
@http(uri: "/HttpPayloadWithUnion", method: "PUT")
operation HttpPayloadWithUnion {
- input: HttpPayloadWithUnionInputOutput,
+ input: HttpPayloadWithUnionInputOutput
output: HttpPayloadWithUnionInputOutput
}
apply HttpPayloadWithUnion @httpRequestTests([
{
- id: "RestJsonHttpPayloadWithUnion",
- documentation: "Serializes a union in the payload.",
- protocol: restJson1,
- method: "PUT",
- uri: "/HttpPayloadWithUnion",
+ id: "RestJsonHttpPayloadWithUnion"
+ documentation: "Serializes a union in the payload."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/HttpPayloadWithUnion"
body: """
- {
- "greeting": "hello"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ {
+ "greeting": "hello"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- greeting: "hello"
- }
+ nested: { greeting: "hello" }
}
- },
+ }
{
- id: "RestJsonHttpPayloadWithUnsetUnion",
- documentation: "No payload is sent if the union has no value.",
- protocol: restJson1,
- method: "PUT",
- uri: "/HttpPayloadWithUnion",
- body: "",
+ id: "RestJsonHttpPayloadWithUnsetUnion"
+ documentation: "No payload is sent if the union has no value."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/HttpPayloadWithUnion"
+ body: ""
params: {}
}
])
apply HttpPayloadWithUnion @httpResponseTests([
{
- id: "RestJsonHttpPayloadWithUnion",
- documentation: "Serializes a union in the payload.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonHttpPayloadWithUnion"
+ documentation: "Serializes a union in the payload."
+ protocol: restJson1
+ code: 200
body: """
- {
- "greeting": "hello"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ {
+ "greeting": "hello"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- nested: {
- greeting: "hello"
- }
+ nested: { greeting: "hello" }
}
- },
+ }
{
- id: "RestJsonHttpPayloadWithUnsetUnion",
- documentation: "No payload is sent if the union has no value.",
- protocol: restJson1,
- code: 200,
- body: "",
- headers: {
- "Content-Length": "0"
- },
+ id: "RestJsonHttpPayloadWithUnsetUnion"
+ documentation: "No payload is sent if the union has no value."
+ protocol: restJson1
+ code: 200
+ body: ""
+ headers: { "Content-Length": "0" }
params: {}
}
])
structure HttpPayloadWithUnionInputOutput {
@httpPayload
- nested: UnionPayload,
+ nested: UnionPayload
}
union UnionPayload {
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-prefix-headers.smithy b/smithy-aws-protocol-tests/model/restJson1/http-prefix-headers.smithy
index 8c279b6aadb..a3ca0827da6 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-prefix-headers.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-prefix-headers.smithy
@@ -1,127 +1,104 @@
// This file defines test cases that test httpPrefix headers.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpprefixheaders-trait
-
$version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
+use aws.protocoltests.shared#StringMap
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
-use aws.protocoltests.shared#StringMap
/// This examples adds headers to the input of a request and response by prefix.
@readonly
@http(uri: "/HttpPrefixHeaders", method: "GET")
@externalDocumentation("httpPrefixHeaders Trait": "https://smithy.io/2.0/spec/http-bindings.html#httpprefixheaders-trait")
-operation HttpPrefixHeaders {
- input: HttpPrefixHeadersInput,
+operation HttpPrefixHeaders {
+ input: HttpPrefixHeadersInput
output: HttpPrefixHeadersOutput
}
apply HttpPrefixHeaders @httpRequestTests([
{
- id: "RestJsonHttpPrefixHeadersArePresent",
- documentation: "Adds headers by prefix",
- protocol: restJson1,
- method: "GET",
- uri: "/HttpPrefixHeaders",
- body: "",
- headers: {
- "X-Foo": "Foo",
- "X-Foo-Abc": "Abc value",
- "X-Foo-Def": "Def value",
- },
+ id: "RestJsonHttpPrefixHeadersArePresent"
+ documentation: "Adds headers by prefix"
+ protocol: restJson1
+ method: "GET"
+ uri: "/HttpPrefixHeaders"
+ body: ""
+ headers: { "X-Foo": "Foo", "X-Foo-Abc": "Abc value", "X-Foo-Def": "Def value" }
params: {
- foo: "Foo",
- fooMap: {
- Abc: "Abc value",
- Def: "Def value",
- }
+ foo: "Foo"
+ fooMap: { Abc: "Abc value", Def: "Def value" }
}
- },
+ }
{
- id: "RestJsonHttpPrefixHeadersAreNotPresent",
- documentation: "No prefix headers are serialized because the value is empty",
- protocol: restJson1,
- method: "GET",
- uri: "/HttpPrefixHeaders",
- body: "",
- headers: {
- "X-Foo": "Foo"
- },
+ id: "RestJsonHttpPrefixHeadersAreNotPresent"
+ documentation: "No prefix headers are serialized because the value is empty"
+ protocol: restJson1
+ method: "GET"
+ uri: "/HttpPrefixHeaders"
+ body: ""
+ headers: { "X-Foo": "Foo" }
params: {
- foo: "Foo",
+ foo: "Foo"
fooMap: {}
- },
+ }
appliesTo: "client"
- },
+ }
])
apply HttpPrefixHeaders @httpResponseTests([
{
- id: "RestJsonHttpPrefixHeadersArePresent",
- documentation: "Adds headers by prefix",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Foo": "Foo",
- "X-Foo-Abc": "Abc value",
- "X-Foo-Def": "Def value",
- },
+ id: "RestJsonHttpPrefixHeadersArePresent"
+ documentation: "Adds headers by prefix"
+ protocol: restJson1
+ code: 200
+ headers: { "X-Foo": "Foo", "X-Foo-Abc": "Abc value", "X-Foo-Def": "Def value" }
params: {
- foo: "Foo",
- fooMap: {
- Abc: "Abc value",
- Def: "Def value",
- }
+ foo: "Foo"
+ fooMap: { Abc: "Abc value", Def: "Def value" }
}
- },
+ }
])
@input
structure HttpPrefixHeadersInput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPrefixHeaders("X-Foo-")
- fooMap: StringMap,
+ fooMap: StringMap
}
@output
structure HttpPrefixHeadersOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPrefixHeaders("X-Foo-")
- fooMap: StringMap,
+ fooMap: StringMap
}
/// Clients that perform this test extract all headers from the response.
@readonly
@http(uri: "/HttpPrefixHeadersResponse", method: "GET")
-operation HttpPrefixHeadersInResponse {
- input: HttpPrefixHeadersInResponseInput,
+operation HttpPrefixHeadersInResponse {
+ input: HttpPrefixHeadersInResponseInput
output: HttpPrefixHeadersInResponseOutput
}
apply HttpPrefixHeadersInResponse @httpResponseTests([
{
- id: "HttpPrefixHeadersResponse",
- documentation: "(de)serializes all response headers",
- protocol: restJson1,
- code: 200,
- headers: {
- "X-Foo": "Foo",
- "Hello": "Hello"
- },
+ id: "HttpPrefixHeadersResponse"
+ documentation: "(de)serializes all response headers"
+ protocol: restJson1
+ code: 200
+ headers: { "X-Foo": "Foo", Hello: "Hello" }
params: {
- prefixHeaders: {
- "X-Foo": "Foo",
- "Hello": "Hello"
- }
+ prefixHeaders: { "X-Foo": "Foo", Hello: "Hello" }
}
- },
+ }
])
@input
@@ -130,5 +107,5 @@ structure HttpPrefixHeadersInResponseInput {}
@output
structure HttpPrefixHeadersInResponseOutput {
@httpPrefixHeaders("")
- prefixHeaders: StringMap,
+ prefixHeaders: StringMap
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy
index 8bf4abfe4bd..739df0a10ea 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-query.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-query.smithy
@@ -1,7 +1,6 @@
// This file defines test cases that test HTTP query string bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpquery-trait and
// https://smithy.io/2.0/spec/http-bindings.html#httpqueryparams-trait
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -32,192 +31,139 @@ operation AllQueryStringTypes {
apply AllQueryStringTypes @httpRequestTests([
{
- id: "RestJsonAllQueryStringTypes",
- documentation: "Serializes query string parameters with all supported types",
- protocol: restJson1,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "String=Hello%20there",
- "StringList=a",
- "StringList=b",
- "StringList=c",
- "StringSet=a",
- "StringSet=b",
- "StringSet=c",
- "Byte=1",
- "Short=2",
- "Integer=3",
- "IntegerList=1",
- "IntegerList=2",
- "IntegerList=3",
- "IntegerSet=1",
- "IntegerSet=2",
- "IntegerSet=3",
- "Long=4",
- "Float=1.1",
- "Double=1.1",
- "DoubleList=1.1",
- "DoubleList=2.1",
- "DoubleList=3.1",
- "Boolean=true",
- "BooleanList=true",
- "BooleanList=false",
- "BooleanList=true",
- "Timestamp=1970-01-01T00%3A00%3A01Z",
- "TimestampList=1970-01-01T00%3A00%3A01Z",
- "TimestampList=1970-01-01T00%3A00%3A02Z",
- "TimestampList=1970-01-01T00%3A00%3A03Z",
- "Enum=Foo",
- "EnumList=Foo",
- "EnumList=Baz",
- "EnumList=Bar",
- "IntegerEnum=1",
- "IntegerEnumList=1",
- "IntegerEnumList=2",
- "IntegerEnumList=3",
- ],
+ id: "RestJsonAllQueryStringTypes"
+ documentation: "Serializes query string parameters with all supported types"
+ protocol: restJson1
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["String=Hello%20there", "StringList=a", "StringList=b", "StringList=c", "StringSet=a", "StringSet=b", "StringSet=c", "Byte=1", "Short=2", "Integer=3", "IntegerList=1", "IntegerList=2", "IntegerList=3", "IntegerSet=1", "IntegerSet=2", "IntegerSet=3", "Long=4", "Float=1.1", "Double=1.1", "DoubleList=1.1", "DoubleList=2.1", "DoubleList=3.1", "Boolean=true", "BooleanList=true", "BooleanList=false", "BooleanList=true", "Timestamp=1970-01-01T00%3A00%3A01Z", "TimestampList=1970-01-01T00%3A00%3A01Z", "TimestampList=1970-01-01T00%3A00%3A02Z", "TimestampList=1970-01-01T00%3A00%3A03Z", "Enum=Foo", "EnumList=Foo", "EnumList=Baz", "EnumList=Bar", "IntegerEnum=1", "IntegerEnumList=1", "IntegerEnumList=2", "IntegerEnumList=3"]
params: {
- queryString: "Hello there",
- queryStringList: ["a", "b", "c"],
- queryStringSet: ["a", "b", "c"],
- queryByte: 1,
- queryShort: 2,
- queryInteger: 3,
- queryIntegerList: [1, 2, 3],
- queryIntegerSet: [1, 2, 3],
- queryLong: 4,
- queryFloat: 1.1,
- queryDouble: 1.1,
- queryDoubleList: [1.1, 2.1, 3.1],
- queryBoolean: true,
- queryBooleanList: [true, false, true],
- queryTimestamp: 1,
- queryTimestampList: [1, 2, 3],
- queryEnum: "Foo",
- queryEnumList: ["Foo", "Baz", "Bar"],
- queryIntegerEnum: 1,
- queryIntegerEnumList: [1, 2, 3],
+ queryString: "Hello there"
+ queryStringList: ["a", "b", "c"]
+ queryStringSet: ["a", "b", "c"]
+ queryByte: 1
+ queryShort: 2
+ queryInteger: 3
+ queryIntegerList: [1, 2, 3]
+ queryIntegerSet: [1, 2, 3]
+ queryLong: 4
+ queryFloat: 1.1
+ queryDouble: 1.1
+ queryDoubleList: [1.1, 2.1, 3.1]
+ queryBoolean: true
+ queryBooleanList: [true, false, true]
+ queryTimestamp: 1
+ queryTimestampList: [1, 2, 3]
+ queryEnum: "Foo"
+ queryEnumList: ["Foo", "Baz", "Bar"]
+ queryIntegerEnum: 1
+ queryIntegerEnumList: [1, 2, 3]
queryParamsMapOfStringList: {
- "String": ["Hello there"],
- "StringList": ["a", "b", "c"],
- "StringSet": ["a", "b", "c"],
- "Byte": ["1"],
- "Short": ["2"],
- "Integer": ["3"],
- "IntegerList": ["1", "2", "3"],
- "IntegerSet": ["1", "2", "3"],
- "Long": ["4"],
- "Float": ["1.1"],
- "Double": ["1.1"],
- "DoubleList": ["1.1", "2.1", "3.1"],
- "Boolean": ["true"],
- "BooleanList": ["true", "false", "true"],
- "Timestamp": ["1970-01-01T00:00:01Z"],
- "TimestampList": ["1970-01-01T00:00:01Z", "1970-01-01T00:00:02Z", "1970-01-01T00:00:03Z"],
- "Enum": ["Foo"],
- "EnumList": ["Foo", "Baz", "Bar"],
- "IntegerEnum": ["1"],
- "IntegerEnumList": ["1", "2", "3"]
- },
+ String: ["Hello there"]
+ StringList: ["a", "b", "c"]
+ StringSet: ["a", "b", "c"]
+ Byte: ["1"]
+ Short: ["2"]
+ Integer: ["3"]
+ IntegerList: ["1", "2", "3"]
+ IntegerSet: ["1", "2", "3"]
+ Long: ["4"]
+ Float: ["1.1"]
+ Double: ["1.1"]
+ DoubleList: ["1.1", "2.1", "3.1"]
+ Boolean: ["true"]
+ BooleanList: ["true", "false", "true"]
+ Timestamp: ["1970-01-01T00:00:01Z"]
+ TimestampList: ["1970-01-01T00:00:01Z", "1970-01-01T00:00:02Z", "1970-01-01T00:00:03Z"]
+ Enum: ["Foo"]
+ EnumList: ["Foo", "Baz", "Bar"]
+ IntegerEnum: ["1"]
+ IntegerEnumList: ["1", "2", "3"]
+ }
}
- },
+ }
{
- id: "RestJsonQueryStringMap",
- documentation: "Handles query string maps",
- protocol: restJson1,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "QueryParamsStringKeyA=Foo",
- "QueryParamsStringKeyB=Bar",
- ],
+ id: "RestJsonQueryStringMap"
+ documentation: "Handles query string maps"
+ protocol: restJson1
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["QueryParamsStringKeyA=Foo", "QueryParamsStringKeyB=Bar"]
params: {
queryParamsMapOfStringList: {
- "QueryParamsStringKeyA": ["Foo"],
- "QueryParamsStringKeyB": ["Bar"],
- },
+ QueryParamsStringKeyA: ["Foo"]
+ QueryParamsStringKeyB: ["Bar"]
+ }
}
- },
+ }
{
- id: "RestJsonQueryStringEscaping",
- documentation: "Handles escaping all required characters in the query string.",
- protocol: restJson1,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9",
- ],
+ id: "RestJsonQueryStringEscaping"
+ documentation: "Handles escaping all required characters in the query string."
+ protocol: restJson1
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"]
params: {
- queryString: " %:/?#[]@!$&'()*+,;=😹",
- queryParamsMapOfStringList: {
- "String": [" %:/?#[]@!$&'()*+,;=😹"]
- }
+ queryString: " %:/?#[]@!$&'()*+,;=😹"
+ queryParamsMapOfStringList: {
+ String: [" %:/?#[]@!$&'()*+,;=😹"]
+ }
}
- },
+ }
{
- id: "RestJsonSupportsNaNFloatQueryValues",
- documentation: "Supports handling NaN float query values.",
- protocol: restJson1,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "Float=NaN",
- "Double=NaN",
- ],
+ id: "RestJsonSupportsNaNFloatQueryValues"
+ documentation: "Supports handling NaN float query values."
+ protocol: restJson1
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["Float=NaN", "Double=NaN"]
params: {
- queryFloat: "NaN",
- queryDouble: "NaN",
+ queryFloat: "NaN"
+ queryDouble: "NaN"
queryParamsMapOfStringList: {
- "Float": ["NaN"],
- "Double": ["NaN"],
+ Float: ["NaN"]
+ Double: ["NaN"]
}
}
- },
+ }
{
- id: "RestJsonSupportsInfinityFloatQueryValues",
- documentation: "Supports handling Infinity float query values.",
- protocol: restJson1,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "Float=Infinity",
- "Double=Infinity",
- ],
+ id: "RestJsonSupportsInfinityFloatQueryValues"
+ documentation: "Supports handling Infinity float query values."
+ protocol: restJson1
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["Float=Infinity", "Double=Infinity"]
params: {
- queryFloat: "Infinity",
- queryDouble: "Infinity",
+ queryFloat: "Infinity"
+ queryDouble: "Infinity"
queryParamsMapOfStringList: {
- "Float": ["Infinity"],
- "Double": ["Infinity"],
+ Float: ["Infinity"]
+ Double: ["Infinity"]
}
}
- },
+ }
{
- id: "RestJsonSupportsNegativeInfinityFloatQueryValues",
- documentation: "Supports handling -Infinity float query values.",
- protocol: restJson1,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "Float=-Infinity",
- "Double=-Infinity",
- ],
+ id: "RestJsonSupportsNegativeInfinityFloatQueryValues"
+ documentation: "Supports handling -Infinity float query values."
+ protocol: restJson1
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["Float=-Infinity", "Double=-Infinity"]
params: {
- queryFloat: "-Infinity",
- queryDouble: "-Infinity",
+ queryFloat: "-Infinity"
+ queryDouble: "-Infinity"
queryParamsMapOfStringList: {
- "Float": ["-Infinity"],
- "Double": ["-Infinity"],
+ Float: ["-Infinity"]
+ Double: ["-Infinity"]
}
}
- },
+ }
{
id: "RestJsonZeroAndFalseQueryValues"
documentation: "Query values of 0 and false are serialized"
@@ -225,16 +171,13 @@ apply AllQueryStringTypes @httpRequestTests([
method: "GET"
uri: "/AllQueryStringTypesInput"
body: ""
- queryParams: [
- "Integer=0"
- "Boolean=false"
- ]
+ queryParams: ["Integer=0", "Boolean=false"]
params: {
queryInteger: 0
queryBoolean: false
queryParamsMapOfStringList: {
- "Integer": ["0"]
- "Boolean": ["false"]
+ Integer: ["0"]
+ Boolean: ["false"]
}
}
}
@@ -243,67 +186,67 @@ apply AllQueryStringTypes @httpRequestTests([
@suppress(["HttpQueryParamsTrait"])
structure AllQueryStringTypesInput {
@httpQuery("String")
- queryString: String,
+ queryString: String
@httpQuery("StringList")
- queryStringList: StringList,
+ queryStringList: StringList
@httpQuery("StringSet")
- queryStringSet: StringSet,
+ queryStringSet: StringSet
@httpQuery("Byte")
- queryByte: Byte,
+ queryByte: Byte
@httpQuery("Short")
- queryShort: Short,
+ queryShort: Short
@httpQuery("Integer")
- queryInteger: Integer,
+ queryInteger: Integer
@httpQuery("IntegerList")
- queryIntegerList: IntegerList,
+ queryIntegerList: IntegerList
@httpQuery("IntegerSet")
- queryIntegerSet: IntegerSet,
+ queryIntegerSet: IntegerSet
@httpQuery("Long")
- queryLong: Long,
+ queryLong: Long
@httpQuery("Float")
- queryFloat: Float,
+ queryFloat: Float
@httpQuery("Double")
- queryDouble: Double,
+ queryDouble: Double
@httpQuery("DoubleList")
- queryDoubleList: DoubleList,
+ queryDoubleList: DoubleList
@httpQuery("Boolean")
- queryBoolean: Boolean,
+ queryBoolean: Boolean
@httpQuery("BooleanList")
- queryBooleanList: BooleanList,
+ queryBooleanList: BooleanList
@httpQuery("Timestamp")
- queryTimestamp: Timestamp,
+ queryTimestamp: Timestamp
@httpQuery("TimestampList")
- queryTimestampList: TimestampList,
+ queryTimestampList: TimestampList
@httpQuery("Enum")
- queryEnum: FooEnum,
+ queryEnum: FooEnum
@httpQuery("EnumList")
- queryEnumList: FooEnumList,
+ queryEnumList: FooEnumList
@httpQuery("IntegerEnum")
- queryIntegerEnum: IntegerEnum,
+ queryIntegerEnum: IntegerEnum
@httpQuery("IntegerEnumList")
- queryIntegerEnumList: IntegerEnumList,
+ queryIntegerEnumList: IntegerEnumList
@httpQueryParams
- queryParamsMapOfStringList: StringListMap,
+ queryParamsMapOfStringList: StringListMap
}
/// This example uses a constant query string parameters and a label.
@@ -314,20 +257,15 @@ structure AllQueryStringTypesInput {
@http(uri: "/ConstantQueryString/{hello}?foo=bar&hello", method: "GET")
@httpRequestTests([
{
- id: "RestJsonConstantQueryString",
- documentation: "Includes constant query string parameters",
- protocol: restJson1,
- method: "GET",
- uri: "/ConstantQueryString/hi",
- queryParams: [
- "foo=bar",
- "hello",
- ],
- body: "",
- params: {
- hello: "hi"
- }
- },
+ id: "RestJsonConstantQueryString"
+ documentation: "Includes constant query string parameters"
+ protocol: restJson1
+ method: "GET"
+ uri: "/ConstantQueryString/hi"
+ queryParams: ["foo=bar", "hello"]
+ body: ""
+ params: { hello: "hi" }
+ }
])
operation ConstantQueryString {
input: ConstantQueryStringInput
@@ -336,7 +274,7 @@ operation ConstantQueryString {
structure ConstantQueryStringInput {
@httpLabel
@required
- hello: String,
+ hello: String
}
/// This example uses fixed query string params and variable query string params.
@@ -350,46 +288,34 @@ operation ConstantAndVariableQueryString {
apply ConstantAndVariableQueryString @httpRequestTests([
{
- id: "RestJsonConstantAndVariableQueryStringMissingOneValue",
- documentation: "Mixes constant and variable query string parameters",
- protocol: restJson1,
- method: "GET",
- uri: "/ConstantAndVariableQueryString",
- queryParams: [
- "foo=bar",
- "baz=bam",
- ],
- forbidQueryParams: ["maybeSet"],
- body: "",
- params: {
- baz: "bam"
- }
- },
+ id: "RestJsonConstantAndVariableQueryStringMissingOneValue"
+ documentation: "Mixes constant and variable query string parameters"
+ protocol: restJson1
+ method: "GET"
+ uri: "/ConstantAndVariableQueryString"
+ queryParams: ["foo=bar", "baz=bam"]
+ forbidQueryParams: ["maybeSet"]
+ body: ""
+ params: { baz: "bam" }
+ }
{
- id: "RestJsonConstantAndVariableQueryStringAllValues",
- documentation: "Mixes constant and variable query string parameters",
- protocol: restJson1,
- method: "GET",
- uri: "/ConstantAndVariableQueryString",
- queryParams: [
- "foo=bar",
- "baz=bam",
- "maybeSet=yes"
- ],
- body: "",
- params: {
- baz: "bam",
- maybeSet: "yes"
- }
- },
+ id: "RestJsonConstantAndVariableQueryStringAllValues"
+ documentation: "Mixes constant and variable query string parameters"
+ protocol: restJson1
+ method: "GET"
+ uri: "/ConstantAndVariableQueryString"
+ queryParams: ["foo=bar", "baz=bam", "maybeSet=yes"]
+ body: ""
+ params: { baz: "bam", maybeSet: "yes" }
+ }
])
structure ConstantAndVariableQueryStringInput {
@httpQuery("baz")
- baz: String,
+ baz: String
@httpQuery("maybeSet")
- maybeSet: String,
+ maybeSet: String
}
/// This example ensures that query string bound request parameters are
@@ -403,33 +329,31 @@ operation IgnoreQueryParamsInResponse {
apply IgnoreQueryParamsInResponse @httpResponseTests([
{
- id: "RestJsonIgnoreQueryParamsInResponse",
+ id: "RestJsonIgnoreQueryParamsInResponse"
documentation: """
- Query parameters must be ignored when serializing the output
- of an operation. As of January 2021, server implementations
- are expected to respond with a JSON object regardless of
- if the output parameters are empty.""",
- protocol: restJson1,
- code: 200,
- headers: {
- "Content-Type": "application/json"
- },
- body: "{}",
- bodyMediaType: "application/json",
+ Query parameters must be ignored when serializing the output
+ of an operation. As of January 2021, server implementations
+ are expected to respond with a JSON object regardless of
+ if the output parameters are empty."""
+ protocol: restJson1
+ code: 200
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
params: {}
- },
+ }
{
- id: "RestJsonIgnoreQueryParamsInResponseNoPayload",
+ id: "RestJsonIgnoreQueryParamsInResponseNoPayload"
documentation: """
- This test is similar to RestJsonIgnoreQueryParamsInResponse,
- but it ensures that clients gracefully handle responses from
- the server that do not serialize an empty JSON object.""",
- protocol: restJson1,
- code: 200,
- body: "",
- params: {},
- appliesTo: "client",
- },
+ This test is similar to RestJsonIgnoreQueryParamsInResponse,
+ but it ensures that clients gracefully handle responses from
+ the server that do not serialize an empty JSON object."""
+ protocol: restJson1
+ code: 200
+ body: ""
+ params: {}
+ appliesTo: "client"
+ }
])
structure IgnoreQueryParamsInResponseOutput {
@@ -447,54 +371,44 @@ operation OmitsNullSerializesEmptyString {
apply OmitsNullSerializesEmptyString @httpRequestTests([
{
- id: "RestJsonOmitsNullQuery",
- documentation: "Omits null query values",
- protocol: restJson1,
- method: "GET",
- uri: "/OmitsNullSerializesEmptyString",
- body: "",
- params: {
- nullValue: null
- },
- "appliesTo": "client",
- },
+ id: "RestJsonOmitsNullQuery"
+ documentation: "Omits null query values"
+ protocol: restJson1
+ method: "GET"
+ uri: "/OmitsNullSerializesEmptyString"
+ body: ""
+ params: { nullValue: null }
+ appliesTo: "client"
+ }
{
- id: "RestJsonSerializesEmptyQueryValue",
- documentation: "Serializes empty query strings",
- protocol: restJson1,
- method: "GET",
- uri: "/OmitsNullSerializesEmptyString",
- body: "",
- queryParams: [
- "Empty=",
- ],
- params: {
- emptyString: "",
- },
- },
+ id: "RestJsonSerializesEmptyQueryValue"
+ documentation: "Serializes empty query strings"
+ protocol: restJson1
+ method: "GET"
+ uri: "/OmitsNullSerializesEmptyString"
+ body: ""
+ queryParams: ["Empty="]
+ params: { emptyString: "" }
+ }
{
- id: "RestJsonServersAcceptStaticQueryParamAsEmptyString",
- documentation: "Servers accept static query params as empty strings.",
- protocol: restJson1,
- method: "GET",
- uri: "/OmitsNullSerializesEmptyString",
- body: "",
- queryParams: [
- "Empty",
- ],
- params: {
- emptyString: "",
- },
+ id: "RestJsonServersAcceptStaticQueryParamAsEmptyString"
+ documentation: "Servers accept static query params as empty strings."
+ protocol: restJson1
+ method: "GET"
+ uri: "/OmitsNullSerializesEmptyString"
+ body: ""
+ queryParams: ["Empty"]
+ params: { emptyString: "" }
appliesTo: "server"
- },
+ }
])
structure OmitsNullSerializesEmptyStringInput {
@httpQuery("Null")
- nullValue: String,
+ nullValue: String
@httpQuery("Empty")
- emptyString: String,
+ emptyString: String
}
/// Omits serializing empty lists. Because empty strings are serilized as
@@ -508,46 +422,46 @@ operation OmitsSerializingEmptyLists {
apply OmitsSerializingEmptyLists @httpRequestTests([
{
- id: "RestJsonOmitsEmptyListQueryValues",
- documentation: "Supports omitting empty lists.",
- protocol: restJson1,
- method: "POST",
- uri: "/OmitsSerializingEmptyLists",
- body: "",
- queryParams: [],
+ id: "RestJsonOmitsEmptyListQueryValues"
+ documentation: "Supports omitting empty lists."
+ protocol: restJson1
+ method: "POST"
+ uri: "/OmitsSerializingEmptyLists"
+ body: ""
+ queryParams: []
params: {
- queryStringList: [],
- queryIntegerList: [],
- queryDoubleList: [],
- queryBooleanList: [],
- queryTimestampList: [],
- queryEnumList: [],
- queryIntegerEnumList: [],
+ queryStringList: []
+ queryIntegerList: []
+ queryDoubleList: []
+ queryBooleanList: []
+ queryTimestampList: []
+ queryEnumList: []
+ queryIntegerEnumList: []
}
}
])
structure OmitsSerializingEmptyListsInput {
@httpQuery("StringList")
- queryStringList: StringList,
+ queryStringList: StringList
@httpQuery("IntegerList")
- queryIntegerList: IntegerList,
+ queryIntegerList: IntegerList
@httpQuery("DoubleList")
- queryDoubleList: DoubleList,
+ queryDoubleList: DoubleList
@httpQuery("BooleanList")
- queryBooleanList: BooleanList,
+ queryBooleanList: BooleanList
@httpQuery("TimestampList")
- queryTimestampList: TimestampList,
+ queryTimestampList: TimestampList
@httpQuery("EnumList")
- queryEnumList: FooEnumList,
+ queryEnumList: FooEnumList
@httpQuery("IntegerEnumList")
- queryIntegerEnumList: IntegerEnumList,
+ queryIntegerEnumList: IntegerEnumList
}
/// Automatically adds idempotency tokens.
@@ -559,38 +473,32 @@ operation QueryIdempotencyTokenAutoFill {
apply QueryIdempotencyTokenAutoFill @httpRequestTests([
{
- id: "RestJsonQueryIdempotencyTokenAutoFill",
- documentation: "Automatically adds idempotency token when not set",
- protocol: restJson1,
- method: "POST",
- uri: "/QueryIdempotencyTokenAutoFill",
- body: "",
- queryParams: [
- "token=00000000-0000-4000-8000-000000000000",
- ],
- appliesTo: "client",
- },
+ id: "RestJsonQueryIdempotencyTokenAutoFill"
+ documentation: "Automatically adds idempotency token when not set"
+ protocol: restJson1
+ method: "POST"
+ uri: "/QueryIdempotencyTokenAutoFill"
+ body: ""
+ queryParams: ["token=00000000-0000-4000-8000-000000000000"]
+ appliesTo: "client"
+ }
{
- id: "RestJsonQueryIdempotencyTokenAutoFillIsSet",
- documentation: "Uses the given idempotency token as-is",
- protocol: restJson1,
- method: "POST",
- uri: "/QueryIdempotencyTokenAutoFill",
- body: "",
- queryParams: [
- "token=00000000-0000-4000-8000-000000000000",
- ],
- params: {
- token: "00000000-0000-4000-8000-000000000000"
- },
- appliesTo: "client",
+ id: "RestJsonQueryIdempotencyTokenAutoFillIsSet"
+ documentation: "Uses the given idempotency token as-is"
+ protocol: restJson1
+ method: "POST"
+ uri: "/QueryIdempotencyTokenAutoFill"
+ body: ""
+ queryParams: ["token=00000000-0000-4000-8000-000000000000"]
+ params: { token: "00000000-0000-4000-8000-000000000000" }
+ appliesTo: "client"
}
])
structure QueryIdempotencyTokenAutoFillInput {
@httpQuery("token")
@idempotencyToken
- token: String,
+ token: String
}
// Clients must make named query members take precedence over unnamed members
@@ -602,51 +510,39 @@ operation QueryPrecedence {
apply QueryPrecedence @httpRequestTests([
{
- id: "RestJsonQueryPrecedence",
- documentation: "Prefer named query parameters when serializing",
- protocol: restJson1,
- method: "POST",
- uri: "/Precedence",
- body: "",
- queryParams: [
- "bar=named",
- "qux=alsoFromMap"
- ],
+ id: "RestJsonQueryPrecedence"
+ documentation: "Prefer named query parameters when serializing"
+ protocol: restJson1
+ method: "POST"
+ uri: "/Precedence"
+ body: ""
+ queryParams: ["bar=named", "qux=alsoFromMap"]
params: {
- foo: "named",
- baz: {
- bar: "fromMap",
- qux: "alsoFromMap"
- }
- },
- appliesTo: "client",
- },
+ foo: "named"
+ baz: { bar: "fromMap", qux: "alsoFromMap" }
+ }
+ appliesTo: "client"
+ }
{
- id: "RestJsonServersPutAllQueryParamsInMap",
- documentation: "Servers put all query params in map",
- protocol: restJson1,
- method: "POST",
- uri: "/Precedence",
- body: "",
- queryParams: [
- "bar=named",
- "qux=fromMap"
- ],
+ id: "RestJsonServersPutAllQueryParamsInMap"
+ documentation: "Servers put all query params in map"
+ protocol: restJson1
+ method: "POST"
+ uri: "/Precedence"
+ body: ""
+ queryParams: ["bar=named", "qux=fromMap"]
params: {
- foo: "named",
- baz: {
- bar: "named",
- qux: "fromMap"
- }
- },
- appliesTo: "server",
+ foo: "named"
+ baz: { bar: "named", qux: "fromMap" }
+ }
+ appliesTo: "server"
}
])
@suppress(["HttpQueryParamsTrait"])
structure QueryPrecedenceInput {
@httpQuery("bar")
- foo: String,
+ foo: String
@httpQueryParams
baz: StringMap
@@ -660,44 +556,36 @@ operation QueryParamsAsStringListMap {
apply QueryParamsAsStringListMap @httpRequestTests([
{
- id: "RestJsonQueryParamsStringListMap",
- documentation: "Serialize query params from map of list strings",
- protocol: restJson1,
- method: "POST",
- uri: "/StringListMap",
- body: "",
- queryParams: [
- "corge=named",
- "baz=bar",
- "baz=qux"
- ],
+ id: "RestJsonQueryParamsStringListMap"
+ documentation: "Serialize query params from map of list strings"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StringListMap"
+ body: ""
+ queryParams: ["corge=named", "baz=bar", "baz=qux"]
params: {
- qux: "named",
+ qux: "named"
foo: {
- "baz": ["bar", "qux"]
+ baz: ["bar", "qux"]
}
- },
+ }
appliesTo: "client"
- },
+ }
{
- id: "RestJsonServersQueryParamsStringListMap",
- documentation: "Servers put all query params in map",
- protocol: restJson1,
- method: "POST",
- uri: "/StringListMap",
- body: "",
- queryParams: [
- "corge=named",
- "baz=bar",
- "baz=qux"
- ],
+ id: "RestJsonServersQueryParamsStringListMap"
+ documentation: "Servers put all query params in map"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StringListMap"
+ body: ""
+ queryParams: ["corge=named", "baz=bar", "baz=qux"]
params: {
- qux: "named",
+ qux: "named"
foo: {
- "corge": ["named"],
- "baz": ["bar", "qux"]
+ corge: ["named"]
+ baz: ["bar", "qux"]
}
- },
+ }
appliesTo: "server"
}
])
@@ -705,7 +593,7 @@ apply QueryParamsAsStringListMap @httpRequestTests([
@suppress(["HttpQueryParamsTrait"])
structure QueryParamsAsStringListMapInput {
@httpQuery("corge")
- qux: String,
+ qux: String
@httpQueryParams
foo: StringListMap
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-response-code.smithy b/smithy-aws-protocol-tests/model/restJson1/http-response-code.smithy
index 858cf84b720..d842c077a31 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-response-code.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-response-code.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP response code bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpresponsecode-trait
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -22,112 +21,98 @@ structure HttpResponseCodeOutput {
@readonly
@http(method: "GET", uri: "/responseCodeRequired", code: 200)
operation ResponseCodeRequired {
- output: ResponseCodeRequiredOutput,
+ output: ResponseCodeRequiredOutput
}
@output
structure ResponseCodeRequiredOutput {
@required
@httpResponseCode
- responseCode: Integer,
+ responseCode: Integer
}
@readonly
@http(method: "GET", uri: "/responseCodeHttpFallback", code: 201)
operation ResponseCodeHttpFallback {
- input: ResponseCodeHttpFallbackInputOutput,
- output: ResponseCodeHttpFallbackInputOutput,
+ input: ResponseCodeHttpFallbackInputOutput
+ output: ResponseCodeHttpFallbackInputOutput
}
structure ResponseCodeHttpFallbackInputOutput {}
apply HttpResponseCode @httpResponseTests([
{
- id: "RestJsonHttpResponseCode",
+ id: "RestJsonHttpResponseCode"
documentation: """
- Binds the http response code to an output structure. Note that
- even though all members are bound outside of the payload, an
- empty JSON object is serialized in the response. However,
- clients should be able to handle an empty JSON object or an
- empty payload without failing to deserialize a response.""",
- protocol: restJson1,
- code: 201,
- headers: {
- "Content-Type": "application/json",
- },
- body: "{}",
- bodyMediaType: "application/json",
- params: {
- Status: 201,
- }
- },
+ Binds the http response code to an output structure. Note that
+ even though all members are bound outside of the payload, an
+ empty JSON object is serialized in the response. However,
+ clients should be able to handle an empty JSON object or an
+ empty payload without failing to deserialize a response."""
+ protocol: restJson1
+ code: 201
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
+ params: { Status: 201 }
+ }
{
- id: "RestJsonHttpResponseCodeDefaultsToModeledCode",
+ id: "RestJsonHttpResponseCodeDefaultsToModeledCode"
documentation: """
- Binds the http response code to the http trait's code if the
- code isn't explicitly set. A client would be parsing the
- http response code, so this would always be present, but
- a server doesn't require it to be set to serialize a request.""",
- protocol: restJson1,
- code: 200,
- headers: {
- "Content-Type": "application/json",
- },
- body: "{}",
- bodyMediaType: "application/json",
+ Binds the http response code to the http trait's code if the
+ code isn't explicitly set. A client would be parsing the
+ http response code, so this would always be present, but
+ a server doesn't require it to be set to serialize a request."""
+ protocol: restJson1
+ code: 200
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
// A client would parse the http response code, and so for clients it
// will always be present, but a server doesn't require it to be set.
- params: {},
+ params: {}
appliesTo: "server"
- },
+ }
{
- id: "RestJsonHttpResponseCodeWithNoPayload",
+ id: "RestJsonHttpResponseCodeWithNoPayload"
documentation: """
- This test ensures that clients gracefully handle cases where
- the service responds with no payload rather than an empty JSON
- object.""",
- protocol: restJson1,
- code: 201,
- body: "",
- params: {
- Status: 201,
- },
+ This test ensures that clients gracefully handle cases where
+ the service responds with no payload rather than an empty JSON
+ object."""
+ protocol: restJson1
+ code: 201
+ body: ""
+ params: { Status: 201 }
appliesTo: "client"
- },
+ }
])
apply ResponseCodeRequired @httpResponseTests([
{
- id: "RestJsonHttpResponseCodeRequired",
+ id: "RestJsonHttpResponseCodeRequired"
documentation: """
- This test ensures that servers handle @httpResponseCode being @required.""",
- protocol: restJson1,
- code: 201,
- headers: {
- "Content-Type": "application/json"
- },
- body: "{}",
- bodyMediaType: "application/json",
- params: {
- responseCode: 201,
- },
+ This test ensures that servers handle @httpResponseCode being @required."""
+ protocol: restJson1
+ code: 201
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
+ params: { responseCode: 201 }
appliesTo: "server"
}
])
apply ResponseCodeHttpFallback @httpResponseTests([
{
- id: "RestJsonHttpResponseCodeNotSetFallsBackToHttpCode",
+ id: "RestJsonHttpResponseCodeNotSetFallsBackToHttpCode"
documentation: """
- This test ensures that servers fall back to the code set
- by @http if @httpResponseCode is not set.""",
- protocol: restJson1,
- code: 201,
- headers: {
- "Content-Type": "application/json"
- },
- body: "{}",
- bodyMediaType: "application/json",
+ This test ensures that servers fall back to the code set
+ by @http if @httpResponseCode is not set."""
+ protocol: restJson1
+ code: 201
+ headers: { "Content-Type": "application/json" }
+ body: "{}"
+ bodyMediaType: "application/json"
appliesTo: "server"
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy b/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy
index 8aa1f517b43..5bbcb774479 100644
--- a/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/http-string-payload.smithy
@@ -8,25 +8,25 @@ use smithy.test#httpResponseTests
@http(uri: "/EnumPayload", method: "POST")
@httpRequestTests([
{
- id: "RestJsonEnumPayloadRequest",
- uri: "/EnumPayload",
- body: "enumvalue",
- params: { payload: "enumvalue" },
- method: "POST",
+ id: "RestJsonEnumPayloadRequest"
+ uri: "/EnumPayload"
+ body: "enumvalue"
+ params: { payload: "enumvalue" }
+ method: "POST"
protocol: "aws.protocols#restJson1"
}
])
@httpResponseTests([
{
- id: "RestJsonEnumPayloadResponse",
- body: "enumvalue",
- params: { payload: "enumvalue" },
- protocol: "aws.protocols#restJson1",
+ id: "RestJsonEnumPayloadResponse"
+ body: "enumvalue"
+ params: { payload: "enumvalue" }
+ protocol: "aws.protocols#restJson1"
code: 200
}
])
operation HttpEnumPayload {
- input: EnumPayloadInput,
+ input: EnumPayloadInput
output: EnumPayloadInput
}
@@ -42,25 +42,25 @@ enum StringEnum {
@http(uri: "/StringPayload", method: "POST")
@httpRequestTests([
{
- id: "RestJsonStringPayloadRequest",
- uri: "/StringPayload",
- body: "rawstring",
- params: { payload: "rawstring" },
- method: "POST",
+ id: "RestJsonStringPayloadRequest"
+ uri: "/StringPayload"
+ body: "rawstring"
+ params: { payload: "rawstring" }
+ method: "POST"
protocol: "aws.protocols#restJson1"
}
])
@httpResponseTests([
{
- id: "RestJsonStringPayloadResponse",
- body: "rawstring",
- params: { payload: "rawstring" },
- protocol: "aws.protocols#restJson1",
+ id: "RestJsonStringPayloadResponse"
+ body: "rawstring"
+ params: { payload: "rawstring" }
+ protocol: "aws.protocols#restJson1"
code: 200
}
])
operation HttpStringPayload {
- input: StringPayloadInput,
+ input: StringPayloadInput
output: StringPayloadInput
}
@@ -68,4 +68,3 @@ structure StringPayloadInput {
@httpPayload
payload: String
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/json-lists.smithy b/smithy-aws-protocol-tests/model/restJson1/json-lists.smithy
index af76a3307ce..11614a757be 100644
--- a/smithy-aws-protocol-tests/model/restJson1/json-lists.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/json-lists.smithy
@@ -1,19 +1,16 @@
// This file defines test cases that serialize lists in JSON documents.
-
$version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
use aws.protocoltests.shared#BooleanList
-use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnumList
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#GreetingList
use aws.protocoltests.shared#IntegerList
use aws.protocoltests.shared#NestedStringList
-use aws.protocoltests.shared#StringList
use aws.protocoltests.shared#SparseStringList
+use aws.protocoltests.shared#StringList
use aws.protocoltests.shared#StringSet
use aws.protocoltests.shared#TimestampList
use smithy.test#httpRequestTests
@@ -29,133 +26,106 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/JsonLists", method: "PUT")
operation JsonLists {
- input: JsonListsInputOutput,
+ input: JsonListsInputOutput
output: JsonListsInputOutput
}
apply JsonLists @httpRequestTests([
{
- id: "RestJsonLists",
- documentation: "Serializes JSON lists",
- protocol: restJson1,
- method: "PUT",
- uri: "/JsonLists",
+ id: "RestJsonLists"
+ documentation: "Serializes JSON lists"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonLists"
body: """
- {
- "stringList": [
- "foo",
- "bar"
- ],
- "stringSet": [
- "foo",
- "bar"
- ],
- "integerList": [
- 1,
- 2
- ],
- "booleanList": [
- true,
- false
- ],
- "timestampList": [
- 1398796238,
- 1398796238
- ],
- "enumList": [
- "Foo",
- "0"
- ],
- "intEnumList": [
- 1,
- 2
- ],
- "nestedStringList": [
- [
- "foo",
- "bar"
- ],
- [
- "baz",
- "qux"
- ]
- ],
- "myStructureList": [
- {
- "value": "1",
- "other": "2"
- },
- {
- "value": "3",
- "other": "4"
- }
- ]
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- "stringList": [
- "foo",
- "bar"
- ],
- "stringSet": [
- "foo",
- "bar"
- ],
- "integerList": [
- 1,
- 2
- ],
- "booleanList": [
- true,
- false
- ],
- "timestampList": [
- 1398796238,
- 1398796238
- ],
- "enumList": [
- "Foo",
- "0"
- ],
- "intEnumList": [
- 1,
- 2
- ],
- "nestedStringList": [
- [
+ {
+ "stringList": [
"foo",
"bar"
],
- [
- "baz",
- "qux"
+ "stringSet": [
+ "foo",
+ "bar"
+ ],
+ "integerList": [
+ 1,
+ 2
+ ],
+ "booleanList": [
+ true,
+ false
+ ],
+ "timestampList": [
+ 1398796238,
+ 1398796238
+ ],
+ "enumList": [
+ "Foo",
+ "0"
+ ],
+ "intEnumList": [
+ 1,
+ 2
+ ],
+ "nestedStringList": [
+ [
+ "foo",
+ "bar"
+ ],
+ [
+ "baz",
+ "qux"
+ ]
+ ],
+ "myStructureList": [
+ {
+ "value": "1",
+ "other": "2"
+ },
+ {
+ "value": "3",
+ "other": "4"
+ }
]
- ],
- "structureList": [
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ structureList: [
{
- "a": "1",
- "b": "2"
- },
+ a: "1"
+ b: "2"
+ }
{
- "a": "3",
- "b": "4"
+ a: "3"
+ b: "4"
}
]
}
- },
+ }
{
- id: "RestJsonListsEmpty",
- documentation: "Serializes empty JSON lists",
- protocol: restJson1,
- method: "PUT",
- uri: "/JsonLists",
+ id: "RestJsonListsEmpty"
+ documentation: "Serializes empty JSON lists"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonLists"
body: """
- {
- "stringList": []
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ {
+ "stringList": []
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
stringList: []
}
@@ -164,125 +134,98 @@ apply JsonLists @httpRequestTests([
apply JsonLists @httpResponseTests([
{
- id: "RestJsonLists",
- documentation: "Serializes JSON lists",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonLists"
+ documentation: "Serializes JSON lists"
+ protocol: restJson1
+ code: 200
body: """
- {
- "stringList": [
- "foo",
- "bar"
- ],
- "stringSet": [
- "foo",
- "bar"
- ],
- "integerList": [
- 1,
- 2
- ],
- "booleanList": [
- true,
- false
- ],
- "timestampList": [
- 1398796238,
- 1398796238
- ],
- "enumList": [
- "Foo",
- "0"
- ],
- "intEnumList": [
- 1,
- 2
- ],
- "nestedStringList": [
- [
- "foo",
- "bar"
- ],
- [
- "baz",
- "qux"
- ]
- ],
- "myStructureList": [
- {
- "value": "1",
- "other": "2"
- },
- {
- "value": "3",
- "other": "4"
- }
- ]
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
- params: {
- "stringList": [
- "foo",
- "bar"
- ],
- "stringSet": [
- "foo",
- "bar"
- ],
- "integerList": [
- 1,
- 2
- ],
- "booleanList": [
- true,
- false
- ],
- "timestampList": [
- 1398796238,
- 1398796238
- ],
- "enumList": [
- "Foo",
- "0"
- ],
- "intEnumList": [
- 1,
- 2
- ],
- "nestedStringList": [
- [
+ {
+ "stringList": [
+ "foo",
+ "bar"
+ ],
+ "stringSet": [
"foo",
"bar"
],
- [
- "baz",
- "qux"
+ "integerList": [
+ 1,
+ 2
+ ],
+ "booleanList": [
+ true,
+ false
+ ],
+ "timestampList": [
+ 1398796238,
+ 1398796238
+ ],
+ "enumList": [
+ "Foo",
+ "0"
+ ],
+ "intEnumList": [
+ 1,
+ 2
+ ],
+ "nestedStringList": [
+ [
+ "foo",
+ "bar"
+ ],
+ [
+ "baz",
+ "qux"
+ ]
+ ],
+ "myStructureList": [
+ {
+ "value": "1",
+ "other": "2"
+ },
+ {
+ "value": "3",
+ "other": "4"
+ }
]
- ],
- "structureList": [
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ structureList: [
{
- "a": "1",
- "b": "2"
- },
+ a: "1"
+ b: "2"
+ }
{
- "a": "3",
- "b": "4"
+ a: "3"
+ b: "4"
}
]
}
- },
+ }
{
- id: "RestJsonListsEmpty",
- documentation: "Serializes empty JSON lists",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonListsEmpty"
+ documentation: "Serializes empty JSON lists"
+ protocol: restJson1
+ code: 200
body: """
- {
- "stringList": []
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ {
+ "stringList": []
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
stringList: []
}
@@ -290,36 +233,36 @@ apply JsonLists @httpResponseTests([
])
structure JsonListsInputOutput {
- stringList: StringList,
+ stringList: StringList
- stringSet: StringSet,
+ stringSet: StringSet
- integerList: IntegerList,
+ integerList: IntegerList
- booleanList: BooleanList,
+ booleanList: BooleanList
- timestampList: TimestampList,
+ timestampList: TimestampList
- enumList: FooEnumList,
+ enumList: FooEnumList
- intEnumList: IntegerEnumList,
+ intEnumList: IntegerEnumList
- nestedStringList: NestedStringList,
+ nestedStringList: NestedStringList
@jsonName("myStructureList")
structureList: StructureList
}
list StructureList {
- member: StructureListMember,
+ member: StructureListMember
}
structure StructureListMember {
@jsonName("value")
- a: String,
+ a: String
@jsonName("other")
- b: String,
+ b: String
}
@httpRequestTests([
@@ -330,14 +273,14 @@ structure StructureListMember {
method: "PUT"
uri: "/SparseJsonLists"
body: """
- {
- "sparseStringList": [
- null,
- "hi"
- ]
- }"""
+ {
+ "sparseStringList": [
+ null,
+ "hi"
+ ]
+ }"""
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/json"}
+ headers: { "Content-Type": "application/json" }
params: {
sparseStringList: [null, "hi"]
}
@@ -350,14 +293,14 @@ structure StructureListMember {
protocol: restJson1
code: 200
body: """
- {
- "sparseStringList": [
- null,
- "hi"
- ]
- }"""
+ {
+ "sparseStringList": [
+ null,
+ "hi"
+ ]
+ }"""
bodyMediaType: "application/json"
- headers: {"Content-Type": "application/json"}
+ headers: { "Content-Type": "application/json" }
params: {
sparseStringList: [null, "hi"]
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy b/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy
index 814c38a8f00..6a2ab562a2f 100644
--- a/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/json-maps.smithy
@@ -1,11 +1,9 @@
// This file defines test cases that serialize maps in JSON payloads.
-
$version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
-use aws.protocoltests.shared#FooEnumMap
use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#SparseStringMap
use aws.protocoltests.shared#StringSet
@@ -15,49 +13,43 @@ use smithy.test#httpResponseTests
/// The example tests basic map serialization.
@http(uri: "/JsonMaps", method: "POST")
operation JsonMaps {
- input: JsonMapsInputOutput,
+ input: JsonMapsInputOutput
output: JsonMapsInputOutput
}
apply JsonMaps @httpRequestTests([
{
- id: "RestJsonJsonMaps",
- documentation: "Serializes JSON maps",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonMaps",
+ id: "RestJsonJsonMaps"
+ documentation: "Serializes JSON maps"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonMaps"
body: """
- {
- "denseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- "denseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
+ {
+ "denseStructMap": {
+ "foo": {
+ "hi": "there"
+ },
+ "baz": {
+ "hi": "bye"
+ }
}
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ denseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RestJsonSerializesZeroValuesInMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonMaps",
+ id: "RestJsonSerializesZeroValuesInMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonMaps"
body: """
{
"denseNumberMap": {
@@ -66,41 +58,33 @@ apply JsonMaps @httpRequestTests([
"denseBooleanMap": {
"x": false
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "denseNumberMap": {
- "x": 0
- },
- "denseBooleanMap": {
- "x": false
- },
+ denseNumberMap: { x: 0 }
+ denseBooleanMap: { x: false }
}
- },
+ }
{
- id: "RestJsonSerializesDenseSetMap",
- documentation: "A request that contains a dense map of sets.",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonMaps",
+ id: "RestJsonSerializesDenseSetMap"
+ documentation: "A request that contains a dense map of sets."
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonMaps"
body: """
{
"denseSetMap": {
"x": [],
"y": ["a", "b"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "denseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ denseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
}
@@ -108,41 +92,35 @@ apply JsonMaps @httpRequestTests([
apply JsonMaps @httpResponseTests([
{
- id: "RestJsonJsonMaps",
- documentation: "Deserializes JSON maps",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonJsonMaps"
+ documentation: "Deserializes JSON maps"
+ protocol: restJson1
+ code: 200
body: """
- {
- "denseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- "denseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
+ {
+ "denseStructMap": {
+ "foo": {
+ "hi": "there"
+ },
+ "baz": {
+ "hi": "bye"
+ }
}
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ denseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RestJsonDeserializesZeroValuesInMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializesZeroValuesInMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: restJson1
+ code: 200
body: """
{
"denseNumberMap": {
@@ -151,51 +129,43 @@ apply JsonMaps @httpResponseTests([
"denseBooleanMap": {
"x": false
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "denseNumberMap": {
- "x": 0
- },
- "denseBooleanMap": {
- "x": false
- },
+ denseNumberMap: { x: 0 }
+ denseBooleanMap: { x: false }
}
- },
+ }
{
- id: "RestJsonDeserializesDenseSetMap",
- documentation: "A response that contains a dense map of sets.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializesDenseSetMap"
+ documentation: "A response that contains a dense map of sets."
+ protocol: restJson1
+ code: 200
body: """
{
"denseSetMap": {
"x": [],
"y": ["a", "b"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "denseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ denseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
{
- id: "RestJsonDeserializesDenseSetMapAndSkipsNull",
+ id: "RestJsonDeserializesDenseSetMapAndSkipsNull"
documentation: """
Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD
- drop the null key-value pair.""",
- protocol: restJson1,
- appliesTo: "client",
- code: 200,
+ drop the null key-value pair."""
+ protocol: restJson1
+ appliesTo: "client"
+ code: 200
body: """
{
"denseSetMap": {
@@ -203,15 +173,13 @@ apply JsonMaps @httpResponseTests([
"y": ["a", "b"],
"z": null
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "denseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ denseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
}
@@ -226,27 +194,27 @@ structure JsonMapsInputOutput {
}
map DenseStructMap {
- key: String,
+ key: String
value: GreetingStruct
}
map DenseBooleanMap {
- key: String,
+ key: String
value: Boolean
}
map DenseNumberMap {
- key: String,
+ key: String
value: Integer
}
map DenseStringMap {
- key: String,
+ key: String
value: String
}
map DenseSetMap {
- key: String,
+ key: String
value: StringSet
}
@@ -259,43 +227,37 @@ operation SparseJsonMaps {
apply SparseJsonMaps @httpRequestTests([
{
- id: "RestJsonSparseJsonMaps",
- documentation: "Serializes JSON maps",
- protocol: restJson1,
- method: "POST",
- uri: "/SparseJsonMaps",
+ id: "RestJsonSparseJsonMaps"
+ documentation: "Serializes JSON maps"
+ protocol: restJson1
+ method: "POST"
+ uri: "/SparseJsonMaps"
body: """
- {
- "sparseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- "sparseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
+ {
+ "sparseStructMap": {
+ "foo": {
+ "hi": "there"
+ },
+ "baz": {
+ "hi": "bye"
+ }
}
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ sparseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RestJsonSerializesSparseNullMapValues",
- documentation: "Serializes JSON map values in sparse maps",
- protocol: restJson1,
- method: "POST",
- uri: "/SparseJsonMaps",
+ id: "RestJsonSerializesSparseNullMapValues"
+ documentation: "Serializes JSON map values in sparse maps"
+ protocol: restJson1
+ method: "POST"
+ uri: "/SparseJsonMaps"
body: """
{
"sparseBooleanMap": {
@@ -310,32 +272,22 @@ apply SparseJsonMaps @httpRequestTests([
"sparseStructMap": {
"x": null
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseBooleanMap": {
- "x": null
- },
- "sparseNumberMap": {
- "x": null
- },
- "sparseStringMap": {
- "x": null
- },
- "sparseStructMap": {
- "x": null
- }
+ sparseBooleanMap: { x: null }
+ sparseNumberMap: { x: null }
+ sparseStringMap: { x: null }
+ sparseStructMap: { x: null }
}
- },
+ }
{
- id: "RestJsonSerializesZeroValuesInSparseMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: restJson1,
- method: "POST",
- uri: "/SparseJsonMaps",
+ id: "RestJsonSerializesZeroValuesInSparseMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: restJson1
+ method: "POST"
+ uri: "/SparseJsonMaps"
body: """
{
"sparseNumberMap": {
@@ -344,50 +296,42 @@ apply SparseJsonMaps @httpRequestTests([
"sparseBooleanMap": {
"x": false
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseNumberMap": {
- "x": 0
- },
- "sparseBooleanMap": {
- "x": false
- }
+ sparseNumberMap: { x: 0 }
+ sparseBooleanMap: { x: false }
}
- },
+ }
{
- id: "RestJsonSerializesSparseSetMap",
- documentation: "A request that contains a sparse map of sets",
- protocol: restJson1,
- method: "POST",
- uri: "/SparseJsonMaps",
+ id: "RestJsonSerializesSparseSetMap"
+ documentation: "A request that contains a sparse map of sets"
+ protocol: restJson1
+ method: "POST"
+ uri: "/SparseJsonMaps"
body: """
{
"sparseSetMap": {
"x": [],
"y": ["a", "b"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
{
- id: "RestJsonSerializesSparseSetMapAndRetainsNull",
- documentation: "A request that contains a sparse map of sets.",
- protocol: restJson1,
- method: "POST",
- uri: "/SparseJsonMaps",
+ id: "RestJsonSerializesSparseSetMapAndRetainsNull"
+ documentation: "A request that contains a sparse map of sets."
+ protocol: restJson1
+ method: "POST"
+ uri: "/SparseJsonMaps"
body: """
{
"sparseSetMap": {
@@ -395,16 +339,14 @@ apply SparseJsonMaps @httpRequestTests([
"y": ["a", "b"],
"z": null
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"],
- "z": null
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
+ z: null
}
}
}
@@ -412,41 +354,35 @@ apply SparseJsonMaps @httpRequestTests([
apply SparseJsonMaps @httpResponseTests([
{
- id: "RestJsonSparseJsonMaps",
- documentation: "Deserializes JSON maps",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonSparseJsonMaps"
+ documentation: "Deserializes JSON maps"
+ protocol: restJson1
+ code: 200
body: """
- {
- "sparseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ {
+ "sparseStructMap": {
+ "foo": {
+ "hi": "there"
+ },
+ "baz": {
+ "hi": "bye"
+ }
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
+ sparseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RestJsonDeserializesSparseNullMapValues",
- documentation: "Deserializes null JSON map values",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializesSparseNullMapValues"
+ documentation: "Deserializes null JSON map values"
+ protocol: restJson1
+ code: 200
body: """
{
"sparseBooleanMap": {
@@ -461,31 +397,21 @@ apply SparseJsonMaps @httpResponseTests([
"sparseStructMap": {
"x": null
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseBooleanMap": {
- "x": null
- },
- "sparseNumberMap": {
- "x": null
- },
- "sparseStringMap": {
- "x": null
- },
- "sparseStructMap": {
- "x": null
- }
+ sparseBooleanMap: { x: null }
+ sparseNumberMap: { x: null }
+ sparseStringMap: { x: null }
+ sparseStructMap: { x: null }
}
- },
+ }
{
- id: "RestJsonDeserializesZeroValuesInSparseMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializesZeroValuesInSparseMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: restJson1
+ code: 200
body: """
{
"sparseNumberMap": {
@@ -494,48 +420,40 @@ apply SparseJsonMaps @httpResponseTests([
"sparseBooleanMap": {
"x": false
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseNumberMap": {
- "x": 0
- },
- "sparseBooleanMap": {
- "x": false
- }
+ sparseNumberMap: { x: 0 }
+ sparseBooleanMap: { x: false }
}
- },
+ }
{
- id: "RestJsonDeserializesSparseSetMap",
- documentation: "A response that contains a sparse map of sets",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializesSparseSetMap"
+ documentation: "A response that contains a sparse map of sets"
+ protocol: restJson1
+ code: 200
body: """
{
"sparseSetMap": {
"x": [],
"y": ["a", "b"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
{
- id: "RestJsonDeserializesSparseSetMapAndRetainsNull",
- documentation: "A response that contains a sparse map of sets.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializesSparseSetMapAndRetainsNull"
+ documentation: "A response that contains a sparse map of sets."
+ protocol: restJson1
+ code: 200
body: """
{
"sparseSetMap": {
@@ -543,16 +461,14 @@ apply SparseJsonMaps @httpResponseTests([
"y": ["a", "b"],
"z": null
}
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"],
- "z": null
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
+ z: null
}
}
}
@@ -568,24 +484,24 @@ structure SparseJsonMapsInputOutput {
@sparse
map SparseStructMap {
- key: String,
+ key: String
value: GreetingStruct
}
@sparse
map SparseBooleanMap {
- key: String,
+ key: String
value: Boolean
}
@sparse
map SparseNumberMap {
- key: String,
+ key: String
value: Integer
}
@sparse
map SparseSetMap {
- key: String,
+ key: String
value: StringSet
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy b/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy
index 9cf525f2574..d9e8473acb8 100644
--- a/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/json-structs.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that serialize synthesized JSON documents
// in the payload of HTTP requests and responses.
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -10,13 +9,13 @@ use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
-use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#FooEnumSet
+use aws.protocoltests.shared#HttpDate
use aws.protocoltests.shared#IntegerEnum
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#IntegerEnumSet
use aws.protocoltests.shared#IntegerEnumMap
-use aws.protocoltests.shared#HttpDate
+use aws.protocoltests.shared#IntegerEnumSet
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
@@ -25,330 +24,259 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/SimpleScalarProperties", method: "PUT")
operation SimpleScalarProperties {
- input: SimpleScalarPropertiesInputOutput,
+ input: SimpleScalarPropertiesInputOutput
output: SimpleScalarPropertiesInputOutput
}
apply SimpleScalarProperties @httpRequestTests([
{
- id: "RestJsonSimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: restJson1,
- method: "PUT",
- uri: "/SimpleScalarProperties",
- body: """
- {
- "stringValue": "string",
- "trueBooleanValue": true,
- "falseBooleanValue": false,
- "byteValue": 1,
- "shortValue": 2,
- "integerValue": 3,
- "longValue": 4,
- "floatValue": 5.5,
- "DoubleDribble": 6.5
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "string",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- }
- },
- {
- id: "RestJsonDoesntSerializeNullStructureValues",
- documentation: "Rest Json should not serialize null structure values",
- protocol: restJson1,
- method: "PUT",
- uri: "/SimpleScalarProperties",
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- stringValue: null
- },
- appliesTo: "client",
- },
+ id: "RestJsonSimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
+ body: """
+ {
+ "stringValue": "string",
+ "trueBooleanValue": true,
+ "falseBooleanValue": false,
+ "byteValue": 1,
+ "shortValue": 2,
+ "integerValue": 3,
+ "longValue": 4,
+ "floatValue": 5.5,
+ "DoubleDribble": 6.5
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "string", trueBooleanValue: true, falseBooleanValue: false, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
+ {
+ id: "RestJsonDoesntSerializeNullStructureValues"
+ documentation: "Rest Json should not serialize null structure values"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: null }
+ appliesTo: "client"
+ }
{
- id: "RestJsonServersDontSerializeNullStructureValues",
- documentation: "Rest Json should not deserialize null structure values",
- protocol: restJson1,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "RestJsonServersDontSerializeNullStructureValues"
+ documentation: "Rest Json should not deserialize null structure values"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
{
"stringValue": null
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {},
- appliesTo: "server",
- },
- {
- id: "RestJsonSupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: restJson1,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {}
+ appliesTo: "server"
+ }
+ {
+ id: "RestJsonSupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
{
"floatValue": "NaN",
"DoubleDribble": "NaN"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "RestJsonSupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: restJson1,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "RestJsonSupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
{
"floatValue": "Infinity",
"DoubleDribble": "Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "RestJsonSupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: restJson1,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "RestJsonSupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
{
"floatValue": "-Infinity",
"DoubleDribble": "-Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
apply SimpleScalarProperties @httpResponseTests([
{
- id: "RestJsonSimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "stringValue": "string",
- "trueBooleanValue": true,
- "falseBooleanValue": false,
- "byteValue": 1,
- "shortValue": 2,
- "integerValue": 3,
- "longValue": 4,
- "floatValue": 5.5,
- "DoubleDribble": 6.5
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "string",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- }
- },
- {
- id: "RestJsonDoesntDeserializeNullStructureValues",
- documentation: "Rest Json should not deserialize null structure values",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "stringValue": null
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {},
- appliesTo: "client",
- },
- {
- id: "RestJsonServersDontSerializeNullStructureValues",
- documentation: "Rest Json should not serialize null structure values",
- protocol: restJson1,
- code: 200,
- body: "{}",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- stringValue: null
- },
- appliesTo: "server",
- },
+ id: "RestJsonSimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "stringValue": "string",
+ "trueBooleanValue": true,
+ "falseBooleanValue": false,
+ "byteValue": 1,
+ "shortValue": 2,
+ "integerValue": 3,
+ "longValue": 4,
+ "floatValue": 5.5,
+ "DoubleDribble": 6.5
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "string", trueBooleanValue: true, falseBooleanValue: false, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
+ {
+ id: "RestJsonDoesntDeserializeNullStructureValues"
+ documentation: "Rest Json should not deserialize null structure values"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "stringValue": null
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {}
+ appliesTo: "client"
+ }
+ {
+ id: "RestJsonServersDontSerializeNullStructureValues"
+ documentation: "Rest Json should not serialize null structure values"
+ protocol: restJson1
+ code: 200
+ body: "{}"
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { stringValue: null }
+ appliesTo: "server"
+ }
{
- id: "RestJsonSupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonSupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: restJson1
+ code: 200
body: """
{
"floatValue": "NaN",
"DoubleDribble": "NaN"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "RestJsonSupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonSupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: restJson1
+ code: 200
body: """
{
"floatValue": "Infinity",
"DoubleDribble": "Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "RestJsonSupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonSupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: restJson1
+ code: 200
body: """
{
"floatValue": "-Infinity",
"DoubleDribble": "-Infinity"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json",
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
structure SimpleScalarPropertiesInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
+
+ stringValue: String
+
+ trueBooleanValue: Boolean
+
+ falseBooleanValue: Boolean
+
+ byteValue: Byte
+
+ shortValue: Short
+
+ integerValue: Integer
+
+ longValue: Long
- stringValue: String,
- trueBooleanValue: Boolean,
- falseBooleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
+ floatValue: Float
@jsonName("DoubleDribble")
- doubleValue: Double,
+ doubleValue: Double
}
/// Blobs are base64 encoded
@http(uri: "/JsonBlobs", method: "POST")
operation JsonBlobs {
- input: JsonBlobsInputOutput,
+ input: JsonBlobsInputOutput
output: JsonBlobsInputOutput
}
apply JsonBlobs @httpRequestTests([
{
- id: "RestJsonJsonBlobs",
- documentation: "Blobs are base64 encoded",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonBlobs",
- body: """
- {
- "data": "dmFsdWU="
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- data: "value"
- }
+ id: "RestJsonJsonBlobs"
+ documentation: "Blobs are base64 encoded"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonBlobs"
+ body: """
+ {
+ "data": "dmFsdWU="
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { data: "value" }
}
])
apply JsonBlobs @httpResponseTests([
{
- id: "RestJsonJsonBlobs",
- documentation: "Blobs are base64 encoded",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "data": "dmFsdWU="
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- data: "value"
- }
+ id: "RestJsonJsonBlobs"
+ documentation: "Blobs are base64 encoded"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "data": "dmFsdWU="
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { data: "value" }
}
])
@@ -361,530 +289,450 @@ structure JsonBlobsInputOutput {
/// values.
@http(uri: "/JsonTimestamps", method: "POST")
operation JsonTimestamps {
- input: JsonTimestampsInputOutput,
+ input: JsonTimestampsInputOutput
output: JsonTimestampsInputOutput
}
apply JsonTimestamps @httpRequestTests([
{
- id: "RestJsonJsonTimestamps",
- documentation: "Tests how normal timestamps are serialized",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "normal": 1398796238
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- normal: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithDateTimeFormat",
- documentation: "Ensures that the timestampFormat of date-time works like normal timestamps",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "dateTime": "2014-04-29T18:30:38Z"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- dateTime: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithDateTimeOnTargetFormat",
- documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "dateTimeOnTarget": "2014-04-29T18:30:38Z"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- dateTimeOnTarget: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithEpochSecondsFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds works",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "epochSeconds": 1398796238
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- epochSeconds: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "epochSecondsOnTarget": 1398796238
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- epochSecondsOnTarget: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithHttpDateFormat",
- documentation: "Ensures that the timestampFormat of http-date works",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "httpDate": "Tue, 29 Apr 2014 18:30:38 GMT"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- httpDate: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithHttpDateOnTargetFormat",
- documentation: "Ensures that the timestampFormat of http-date on the target shape works",
- protocol: restJson1,
- method: "POST",
- uri: "/JsonTimestamps",
- body: """
- {
- "httpDateOnTarget": "Tue, 29 Apr 2014 18:30:38 GMT"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- httpDateOnTarget: 1398796238
- }
- },
+ id: "RestJsonJsonTimestamps"
+ documentation: "Tests how normal timestamps are serialized"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "normal": 1398796238
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { normal: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithDateTimeFormat"
+ documentation: "Ensures that the timestampFormat of date-time works like normal timestamps"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "dateTime": "2014-04-29T18:30:38Z"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { dateTime: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithDateTimeOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "dateTimeOnTarget": "2014-04-29T18:30:38Z"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { dateTimeOnTarget: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithEpochSecondsFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds works"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "epochSeconds": 1398796238
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { epochSeconds: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "epochSecondsOnTarget": 1398796238
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { epochSecondsOnTarget: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithHttpDateFormat"
+ documentation: "Ensures that the timestampFormat of http-date works"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "httpDate": "Tue, 29 Apr 2014 18:30:38 GMT"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { httpDate: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithHttpDateOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works"
+ protocol: restJson1
+ method: "POST"
+ uri: "/JsonTimestamps"
+ body: """
+ {
+ "httpDateOnTarget": "Tue, 29 Apr 2014 18:30:38 GMT"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { httpDateOnTarget: 1398796238 }
+ }
])
apply JsonTimestamps @httpResponseTests([
{
- id: "RestJsonJsonTimestamps",
- documentation: "Tests how normal timestamps are serialized",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "normal": 1398796238
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- normal: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithDateTimeFormat",
- documentation: "Ensures that the timestampFormat of date-time works like normal timestamps",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "dateTime": "2014-04-29T18:30:38Z"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- dateTime: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithDateTimeOnTargetFormat",
- documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "dateTimeOnTarget": "2014-04-29T18:30:38Z"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- dateTimeOnTarget: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithEpochSecondsFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds works",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "epochSeconds": 1398796238
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- epochSeconds: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "epochSecondsOnTarget": 1398796238
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- epochSecondsOnTarget: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithHttpDateFormat",
- documentation: "Ensures that the timestampFormat of http-date works",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "httpDate": "Tue, 29 Apr 2014 18:30:38 GMT"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- httpDate: 1398796238
- }
- },
- {
- id: "RestJsonJsonTimestampsWithHttpDateOnTargetFormat",
- documentation: "Ensures that the timestampFormat of http-date on the target shape works",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "httpDateOnTarget": "Tue, 29 Apr 2014 18:30:38 GMT"
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- httpDateOnTarget: 1398796238
- }
+ id: "RestJsonJsonTimestamps"
+ documentation: "Tests how normal timestamps are serialized"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "normal": 1398796238
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { normal: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithDateTimeFormat"
+ documentation: "Ensures that the timestampFormat of date-time works like normal timestamps"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "dateTime": "2014-04-29T18:30:38Z"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { dateTime: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithDateTimeOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "dateTimeOnTarget": "2014-04-29T18:30:38Z"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { dateTimeOnTarget: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithEpochSecondsFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds works"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "epochSeconds": 1398796238
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { epochSeconds: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "epochSecondsOnTarget": 1398796238
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { epochSecondsOnTarget: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithHttpDateFormat"
+ documentation: "Ensures that the timestampFormat of http-date works"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "httpDate": "Tue, 29 Apr 2014 18:30:38 GMT"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { httpDate: 1398796238 }
+ }
+ {
+ id: "RestJsonJsonTimestampsWithHttpDateOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "httpDateOnTarget": "Tue, 29 Apr 2014 18:30:38 GMT"
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: { httpDateOnTarget: 1398796238 }
}
])
structure JsonTimestampsInputOutput {
- normal: Timestamp,
+ normal: Timestamp
@timestampFormat("date-time")
- dateTime: Timestamp,
+ dateTime: Timestamp
- dateTimeOnTarget: DateTime,
+ dateTimeOnTarget: DateTime
@timestampFormat("epoch-seconds")
- epochSeconds: Timestamp,
+ epochSeconds: Timestamp
- epochSecondsOnTarget: EpochSeconds,
+ epochSecondsOnTarget: EpochSeconds
@timestampFormat("http-date")
- httpDate: Timestamp,
+ httpDate: Timestamp
- httpDateOnTarget: HttpDate,
+ httpDateOnTarget: HttpDate
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
@idempotent
@http(uri: "/JsonEnums", method: "PUT")
operation JsonEnums {
- input: JsonEnumsInputOutput,
+ input: JsonEnumsInputOutput
output: JsonEnumsInputOutput
}
apply JsonEnums @httpRequestTests([
{
- id: "RestJsonJsonEnums",
- documentation: "Serializes simple scalar properties",
- protocol: restJson1,
- method: "PUT",
- uri: "/JsonEnums",
- body: """
- {
- "fooEnum1": "Foo",
- "fooEnum2": "0",
- "fooEnum3": "1",
- "fooEnumList": [
- "Foo",
- "0"
- ],
- "fooEnumSet": [
- "Foo",
- "0"
- ],
- "fooEnumMap": {
- "hi": "Foo",
- "zero": "0"
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ id: "RestJsonJsonEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonEnums"
+ body: """
+ {
+ "fooEnum1": "Foo",
+ "fooEnum2": "0",
+ "fooEnum3": "1",
+ "fooEnumList": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumSet": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumMap": {
+ "hi": "Foo",
+ "zero": "0"
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
apply JsonEnums @httpResponseTests([
{
- id: "RestJsonJsonEnums",
- documentation: "Serializes simple scalar properties",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "fooEnum1": "Foo",
- "fooEnum2": "0",
- "fooEnum3": "1",
- "fooEnumList": [
- "Foo",
- "0"
- ],
- "fooEnumSet": [
- "Foo",
- "0"
- ],
- "fooEnumMap": {
- "hi": "Foo",
- "zero": "0"
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ id: "RestJsonJsonEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "fooEnum1": "Foo",
+ "fooEnum2": "0",
+ "fooEnum3": "1",
+ "fooEnumList": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumSet": [
+ "Foo",
+ "0"
+ ],
+ "fooEnumMap": {
+ "hi": "Foo",
+ "zero": "0"
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
structure JsonEnumsInputOutput {
- fooEnum1: FooEnum,
- fooEnum2: FooEnum,
- fooEnum3: FooEnum,
- fooEnumList: FooEnumList,
- fooEnumSet: FooEnumSet,
- fooEnumMap: FooEnumMap,
+ fooEnum1: FooEnum
+ fooEnum2: FooEnum
+ fooEnum3: FooEnum
+ fooEnumList: FooEnumList
+ fooEnumSet: FooEnumSet
+ fooEnumMap: FooEnumMap
}
/// This example serializes intEnums as top level properties, in lists, sets, and maps.
@idempotent
@http(uri: "/JsonIntEnums", method: "PUT")
operation JsonIntEnums {
- input: JsonIntEnumsInputOutput,
+ input: JsonIntEnumsInputOutput
output: JsonIntEnumsInputOutput
}
apply JsonIntEnums @httpRequestTests([
{
- id: "RestJsonJsonIntEnums",
- documentation: "Serializes intEnums as integers",
- protocol: restJson1,
- method: "PUT",
- uri: "/JsonIntEnums",
- body: """
- {
- "integerEnum1": 1,
- "integerEnum2": 2,
- "integerEnum3": 3,
- "integerEnumList": [
- 1,
- 2,
- 3
- ],
- "integerEnumSet": [
- 1,
- 2
- ],
- "integerEnumMap": {
- "abc": 1,
- "def": 2
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- integerEnum1: 1,
- integerEnum2: 2,
- integerEnum3: 3,
- integerEnumList: [1, 2, 3],
- integerEnumSet: [1, 2],
- integerEnumMap: {
- "abc": 1,
- "def": 2
- }
+ id: "RestJsonJsonIntEnums"
+ documentation: "Serializes intEnums as integers"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonIntEnums"
+ body: """
+ {
+ "integerEnum1": 1,
+ "integerEnum2": 2,
+ "integerEnum3": 3,
+ "integerEnumList": [
+ 1,
+ 2,
+ 3
+ ],
+ "integerEnumSet": [
+ 1,
+ 2
+ ],
+ "integerEnumMap": {
+ "abc": 1,
+ "def": 2
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ integerEnum1: 1
+ integerEnum2: 2
+ integerEnum3: 3
+ integerEnumList: [1, 2, 3]
+ integerEnumSet: [1, 2]
+ integerEnumMap: { abc: 1, def: 2 }
}
}
])
apply JsonIntEnums @httpResponseTests([
{
- id: "RestJsonJsonIntEnums",
- documentation: "Serializes intEnums as integers",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "integerEnum1": 1,
- "integerEnum2": 2,
- "integerEnum3": 3,
- "integerEnumList": [
- 1,
- 2,
- 3
- ],
- "integerEnumSet": [
- 1,
- 2
- ],
- "integerEnumMap": {
- "abc": 1,
- "def": 2
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
- params: {
- integerEnum1: 1,
- integerEnum2: 2,
- integerEnum3: 3,
- integerEnumList: [1, 2, 3],
- integerEnumSet: [1, 2],
- integerEnumMap: {
- "abc": 1,
- "def": 2
- }
+ id: "RestJsonJsonIntEnums"
+ documentation: "Serializes intEnums as integers"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "integerEnum1": 1,
+ "integerEnum2": 2,
+ "integerEnum3": 3,
+ "integerEnumList": [
+ 1,
+ 2,
+ 3
+ ],
+ "integerEnumSet": [
+ 1,
+ 2
+ ],
+ "integerEnumMap": {
+ "abc": 1,
+ "def": 2
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
+ params: {
+ integerEnum1: 1
+ integerEnum2: 2
+ integerEnum3: 3
+ integerEnumList: [1, 2, 3]
+ integerEnumSet: [1, 2]
+ integerEnumMap: { abc: 1, def: 2 }
}
}
])
structure JsonIntEnumsInputOutput {
- integerEnum1: IntegerEnum,
- integerEnum2: IntegerEnum,
- integerEnum3: IntegerEnum,
- integerEnumList: IntegerEnumList,
- integerEnumSet: IntegerEnumSet,
- integerEnumMap: IntegerEnumMap,
+ integerEnum1: IntegerEnum
+ integerEnum2: IntegerEnum
+ integerEnum3: IntegerEnum
+ integerEnumList: IntegerEnumList
+ integerEnumSet: IntegerEnumSet
+ integerEnumMap: IntegerEnumMap
}
/// Recursive shapes
@idempotent
@http(uri: "/RecursiveShapes", method: "PUT")
operation RecursiveShapes {
- input: RecursiveShapesInputOutput,
+ input: RecursiveShapesInputOutput
output: RecursiveShapesInputOutput
}
apply RecursiveShapes @httpRequestTests([
{
- id: "RestJsonRecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: restJson1,
- method: "PUT",
- uri: "/RecursiveShapes",
- body: """
- {
- "nested": {
- "foo": "Foo1",
- "nested": {
- "bar": "Bar1",
- "recursiveMember": {
- "foo": "Foo2",
- "nested": {
- "bar": "Bar2"
- }
- }
- }
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ id: "RestJsonRecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/RecursiveShapes"
+ body: """
+ {
+ "nested": {
+ "foo": "Foo1",
+ "nested": {
+ "bar": "Bar1",
+ "recursiveMember": {
+ "foo": "Foo2",
+ "nested": {
+ "bar": "Bar2"
+ }
+ }
+ }
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -894,39 +742,35 @@ apply RecursiveShapes @httpRequestTests([
apply RecursiveShapes @httpResponseTests([
{
- id: "RestJsonRecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: restJson1,
- code: 200,
- body: """
- {
- "nested": {
- "foo": "Foo1",
- "nested": {
- "bar": "Bar1",
- "recursiveMember": {
- "foo": "Foo2",
- "nested": {
- "bar": "Bar2"
- }
- }
- }
- }
- }""",
- bodyMediaType: "application/json",
- headers: {
- "Content-Type": "application/json"
- },
+ id: "RestJsonRecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: restJson1
+ code: 200
+ body: """
+ {
+ "nested": {
+ "foo": "Foo1",
+ "nested": {
+ "bar": "Bar1",
+ "recursiveMember": {
+ "foo": "Foo2",
+ "nested": {
+ "bar": "Bar2"
+ }
+ }
+ }
+ }
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -939,11 +783,11 @@ structure RecursiveShapesInputOutput {
}
structure RecursiveShapesInputOutputNested1 {
- foo: String,
+ foo: String
nested: RecursiveShapesInputOutputNested2
}
structure RecursiveShapesInputOutputNested2 {
- bar: String,
- recursiveMember: RecursiveShapesInputOutputNested1,
+ bar: String
+ recursiveMember: RecursiveShapesInputOutputNested1
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/main.smithy b/smithy-aws-protocol-tests/model/restJson1/main.smithy
index e5ae6f979ae..1892baa65b2 100644
--- a/smithy-aws-protocol-tests/model/restJson1/main.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/main.smithy
@@ -5,151 +5,130 @@ namespace aws.protocoltests.restjson
use aws.api#service
use aws.auth#sigv4
use aws.protocols#restJson1
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// A REST JSON service that sends JSON requests and responses.
@service(sdkId: "Rest Json Protocol")
@sigv4(name: "restjson")
@restJson1
@title("Sample Rest Json Protocol Service")
service RestJson {
- version: "2019-12-16",
+ version: "2019-12-16"
// Ensure that generators are able to handle renames.
rename: {
- "aws.protocoltests.restjson.nested#GreetingStruct": "RenamedGreeting",
- },
+ "aws.protocoltests.restjson.nested#GreetingStruct": "RenamedGreeting"
+ }
operations: [
// Basic input and output tests
- NoInputAndNoOutput,
- NoInputAndOutput,
- EmptyInputAndEmptyOutput,
- UnitInputAndOutput,
-
+ NoInputAndNoOutput
+ NoInputAndOutput
+ EmptyInputAndEmptyOutput
+ UnitInputAndOutput
// @httpHeader tests
- InputAndOutputWithHeaders,
- NullAndEmptyHeadersClient,
- NullAndEmptyHeadersServer,
- TimestampFormatHeaders,
- MediaTypeHeader,
-
+ InputAndOutputWithHeaders
+ NullAndEmptyHeadersClient
+ NullAndEmptyHeadersServer
+ TimestampFormatHeaders
+ MediaTypeHeader
// @httpLabel tests
- HttpRequestWithLabels,
- HttpRequestWithLabelsAndTimestampFormat,
- HttpRequestWithGreedyLabelInPath,
- HttpRequestWithFloatLabels,
- HttpRequestWithRegexLiteral,
-
+ HttpRequestWithLabels
+ HttpRequestWithLabelsAndTimestampFormat
+ HttpRequestWithGreedyLabelInPath
+ HttpRequestWithFloatLabels
+ HttpRequestWithRegexLiteral
// @httpQuery and @httpQueryParams tests
- AllQueryStringTypes,
- ConstantQueryString,
- ConstantAndVariableQueryString,
- IgnoreQueryParamsInResponse,
- OmitsNullSerializesEmptyString,
- OmitsSerializingEmptyLists,
- QueryIdempotencyTokenAutoFill,
- QueryPrecedence,
- QueryParamsAsStringListMap,
-
+ AllQueryStringTypes
+ ConstantQueryString
+ ConstantAndVariableQueryString
+ IgnoreQueryParamsInResponse
+ OmitsNullSerializesEmptyString
+ OmitsSerializingEmptyLists
+ QueryIdempotencyTokenAutoFill
+ QueryPrecedence
+ QueryParamsAsStringListMap
// @httpPrefixHeaders tests
- HttpPrefixHeaders,
- HttpPrefixHeadersInResponse,
-
+ HttpPrefixHeaders
+ HttpPrefixHeadersInResponse
// @httpPayload tests
- HttpPayloadTraits,
- HttpPayloadTraitsWithMediaType,
- HttpPayloadWithStructure,
- HttpEnumPayload,
- HttpStringPayload,
- HttpPayloadWithUnion,
-
+ HttpPayloadTraits
+ HttpPayloadTraitsWithMediaType
+ HttpPayloadWithStructure
+ HttpEnumPayload
+ HttpStringPayload
+ HttpPayloadWithUnion
// @httpResponseCode tests
- HttpResponseCode,
-
+ HttpResponseCode
// @streaming tests
- StreamingTraits,
- StreamingTraitsRequireLength,
- StreamingTraitsWithMediaType,
-
+ StreamingTraits
+ StreamingTraitsRequireLength
+ StreamingTraitsWithMediaType
// Errors
- GreetingWithErrors,
-
+ GreetingWithErrors
// Synthesized JSON document body tests
- SimpleScalarProperties,
- JsonTimestamps,
- JsonEnums,
- JsonIntEnums,
- RecursiveShapes,
- JsonLists,
- SparseJsonLists,
- JsonMaps,
- SparseJsonMaps,
- JsonBlobs,
-
+ SimpleScalarProperties
+ JsonTimestamps
+ JsonEnums
+ JsonIntEnums
+ RecursiveShapes
+ JsonLists
+ SparseJsonLists
+ JsonMaps
+ SparseJsonMaps
+ JsonBlobs
// Documents
- DocumentType,
- DocumentTypeAsPayload,
- DocumentTypeAsMapValue,
-
+ DocumentType
+ DocumentTypeAsPayload
+ DocumentTypeAsMapValue
// Unions
- JsonUnions,
- PostPlayerAction,
- PostUnionWithJsonName,
-
+ JsonUnions
+ PostPlayerAction
+ PostUnionWithJsonName
// @endpoint and @hostLabel trait tests
- EndpointOperation,
- EndpointWithHostLabelOperation,
-
+ EndpointOperation
+ EndpointWithHostLabelOperation
// custom endpoints with paths
- HostWithPathOperation,
-
+ HostWithPathOperation
// checksum(s)
- HttpChecksumRequired,
-
+ HttpChecksumRequired
// malformed request tests
- MalformedRequestBody,
- MalformedInteger,
- MalformedUnion,
- MalformedBoolean,
- MalformedList,
- MalformedMap,
- MalformedBlob,
- MalformedByte,
- MalformedShort,
- MalformedLong,
- MalformedFloat,
- MalformedDouble,
- MalformedString,
- MalformedTimestampPathDefault,
- MalformedTimestampPathHttpDate,
- MalformedTimestampPathEpoch,
- MalformedTimestampQueryDefault,
- MalformedTimestampQueryHttpDate,
- MalformedTimestampQueryEpoch,
- MalformedTimestampHeaderDefault,
- MalformedTimestampHeaderDateTime,
- MalformedTimestampHeaderEpoch,
- MalformedTimestampBodyDefault,
- MalformedTimestampBodyDateTime,
- MalformedTimestampBodyHttpDate,
- MalformedContentTypeWithoutBody,
- MalformedContentTypeWithBody,
- MalformedContentTypeWithPayload,
- MalformedContentTypeWithGenericString,
- MalformedAcceptWithBody,
- MalformedAcceptWithPayload,
- MalformedAcceptWithGenericString,
-
+ MalformedRequestBody
+ MalformedInteger
+ MalformedUnion
+ MalformedBoolean
+ MalformedList
+ MalformedMap
+ MalformedBlob
+ MalformedByte
+ MalformedShort
+ MalformedLong
+ MalformedFloat
+ MalformedDouble
+ MalformedString
+ MalformedTimestampPathDefault
+ MalformedTimestampPathHttpDate
+ MalformedTimestampPathEpoch
+ MalformedTimestampQueryDefault
+ MalformedTimestampQueryHttpDate
+ MalformedTimestampQueryEpoch
+ MalformedTimestampHeaderDefault
+ MalformedTimestampHeaderDateTime
+ MalformedTimestampHeaderEpoch
+ MalformedTimestampBodyDefault
+ MalformedTimestampBodyDateTime
+ MalformedTimestampBodyHttpDate
+ MalformedContentTypeWithoutBody
+ MalformedContentTypeWithBody
+ MalformedContentTypeWithPayload
+ MalformedContentTypeWithGenericString
+ MalformedAcceptWithBody
+ MalformedAcceptWithPayload
+ MalformedAcceptWithGenericString
// request body and content-type handling
- TestBodyStructure,
- TestPayloadStructure,
- TestPayloadBlob,
- TestNoPayload,
-
+ TestBodyStructure
+ TestPayloadStructure
+ TestPayloadBlob
+ TestNoPayload
// client-only timestamp parsing tests
- DatetimeOffsets,
- FractionalSeconds,
-
+ DatetimeOffsets
+ FractionalSeconds
// requestCompression trait tests
PutWithContentEncoding
]
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-accept.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-accept.smithy
index e0af6b341b9..fa32de40b0e 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-accept.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-accept.smithy
@@ -3,80 +3,74 @@ $version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#JpegBlob
+use smithy.test#httpMalformedRequestTests
apply MalformedAcceptWithBody @httpMalformedRequestTests([
{
- id: "RestJsonWithBodyExpectsApplicationJsonAccept",
+ id: "RestJsonWithBodyExpectsApplicationJsonAccept"
documentation: """
- When there is modeled output, the accept must be application/json""",
- protocol: restJson1,
+ When there is modeled output, the accept must be application/json"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedAcceptWithBody",
+ method: "POST"
+ uri: "/MalformedAcceptWithBody"
headers: {
// this should be application/json
- "accept": "application/hal+json"
+ accept: "application/hal+json"
}
- },
+ }
response: {
- code: 406,
- headers: {
- "x-amzn-errortype": "NotAcceptableException"
- }
- },
- tags: [ "accept" ]
+ code: 406
+ headers: { "x-amzn-errortype": "NotAcceptableException" }
+ }
+ tags: ["accept"]
}
])
apply MalformedAcceptWithPayload @httpMalformedRequestTests([
{
- id: "RestJsonWithPayloadExpectsModeledAccept",
+ id: "RestJsonWithPayloadExpectsModeledAccept"
documentation: """
- When there is a payload with a mediaType trait, the accept must match.""",
- protocol: restJson1,
+ When there is a payload with a mediaType trait, the accept must match."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedAcceptWithPayload",
+ method: "POST"
+ uri: "/MalformedAcceptWithPayload"
headers: {
// this should be image/jpeg
- "accept": "application/json"
+ accept: "application/json"
}
- },
+ }
response: {
- code: 406,
- headers: {
- "x-amzn-errortype": "NotAcceptableException"
- }
- },
- tags: [ "accept" ]
+ code: 406
+ headers: { "x-amzn-errortype": "NotAcceptableException" }
+ }
+ tags: ["accept"]
}
])
apply MalformedAcceptWithGenericString @httpMalformedRequestTests([
{
- id: "RestJsonWithPayloadExpectsImpliedAccept",
+ id: "RestJsonWithPayloadExpectsImpliedAccept"
documentation: """
- When there is a payload without a mediaType trait, the accept must match the
- implied content type of the shape.""",
- protocol: restJson1,
+ When there is a payload without a mediaType trait, the accept must match the
+ implied content type of the shape."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedAcceptWithGenericString",
+ method: "POST"
+ uri: "/MalformedAcceptWithGenericString"
headers: {
// this should be text/plain
- "accept": "application/json"
+ accept: "application/json"
}
- },
+ }
response: {
- code: 406,
- headers: {
- "x-amzn-errortype": "NotAcceptableException"
- }
- },
- tags: [ "accept" ]
+ code: 406
+ headers: { "x-amzn-errortype": "NotAcceptableException" }
+ }
+ tags: ["accept"]
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-blob.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-blob.smithy
index 4a7684a5ef3..f4a940d2b49 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-blob.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-blob.smithy
@@ -13,35 +13,28 @@ operation MalformedBlob {
apply MalformedBlob @httpMalformedRequestTests([
{
- id: "RestJsonBodyMalformedBlobInvalidBase64",
+ id: "RestJsonBodyMalformedBlobInvalidBase64"
documentation: """
- When a blob member is not properly base64 encoded, or not encoded at
- all, the response should be a 400 SerializationException.""",
- protocol: restJson1,
+ When a blob member is not properly base64 encoded, or not encoded at
+ all, the response should be a 400 SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedBlob",
+ method: "POST"
+ uri: "/MalformedBlob"
body: """
- { "blob" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "blob" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- value: ["blob", "\"xyz\"", "\"YmxvYg=\"", "[98, 108, 11, 98]",
- "[\"b\", \"l\",\"o\",\"b\"]", "981081198", "true", "[][]", "-_=="]
+ value: ["blob", "\"xyz\"", "\"YmxvYg=\"", "[98, 108, 11, 98]", "[\"b\", \"l\",\"o\",\"b\"]", "981081198", "true", "[][]", "-_=="]
}
- },
+ }
])
structure MalformedBlobInput {
- blob: Blob,
+ blob: Blob
}
-
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-boolean.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-boolean.smithy
index d327dee4bdd..3758fffc0f1 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-boolean.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-boolean.smithy
@@ -13,134 +13,107 @@ operation MalformedBoolean {
apply MalformedBoolean @httpMalformedRequestTests([
{
- id: "RestJsonBodyBooleanStringCoercion",
+ id: "RestJsonBodyBooleanStringCoercion"
documentation: """
- Attempted string coercion should result in SerializationException""",
- protocol: restJson1,
+ Attempted string coercion should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedBoolean/true",
+ method: "POST"
+ uri: "/MalformedBoolean/true"
body: """
- { "booleanInBody" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "booleanInBody" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["true", "True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON",
- "false", "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
+ value: ["true", "True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON", "false", "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
}
- },
+ }
{
- id: "RestJsonBodyBooleanBadLiteral",
+ id: "RestJsonBodyBooleanBadLiteral"
documentation: """
- YAML-style alternate boolean literals should result in SerializationException""",
- protocol: restJson1,
+ YAML-style alternate boolean literals should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedBoolean/true",
+ method: "POST"
+ uri: "/MalformedBoolean/true"
body: """
- { "booleanInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "booleanInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON",
- "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
+ value: ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON", "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
}
- },
+ }
{
- id: "RestJsonPathBooleanStringCoercion",
+ id: "RestJsonPathBooleanStringCoercion"
documentation: """
- Attempted string coercion should result in SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedBoolean/$value:L"
- },
+ Attempted string coercion should result in SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedBoolean/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON",
- "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
+ value: ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON", "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
}
- },
+ }
{
- id: "RestJsonQueryBooleanStringCoercion",
+ id: "RestJsonQueryBooleanStringCoercion"
documentation: """
- Attempted string coercion should result in SerializationException""",
- protocol: restJson1,
+ Attempted string coercion should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedBoolean/true",
- queryParams: [
- "booleanInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedBoolean/true"
+ queryParams: ["booleanInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON",
- "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
+ value: ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON", "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
}
- },
+ }
{
- id: "RestJsonHeaderBooleanStringCoercion",
+ id: "RestJsonHeaderBooleanStringCoercion"
documentation: """
- Attempted string coercion should result in SerializationException""",
- protocol: restJson1,
+ Attempted string coercion should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedBoolean/true",
- headers: {
- "booleanInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedBoolean/true"
+ headers: { booleanInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON",
- "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
+ value: ["True", "TRUE", "y", "Y", "yes", "Yes", "YES", "1", "on", "On", "ON", "False", "FALSE", "n", "N", "no", "No", "NO", "0", "off", "Off", "OFF"]
}
}
])
structure MalformedBooleanInput {
- booleanInBody: Boolean,
+ booleanInBody: Boolean
@httpLabel
@required
- booleanInPath: Boolean,
+ booleanInPath: Boolean
@httpQuery("booleanInQuery")
- booleanInQuery: Boolean,
+ booleanInQuery: Boolean
@httpHeader("booleanInHeader")
booleanInHeader: Boolean
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-byte.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-byte.smithy
index 52739d32bbb..b4fdd99d755 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-byte.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-byte.smithy
@@ -13,206 +13,169 @@ operation MalformedByte {
apply MalformedByte @httpMalformedRequestTests([
{
- id: "RestJsonBodyByteUnderflowOverflow",
+ id: "RestJsonBodyByteUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedByte/1",
+ method: "POST"
+ uri: "/MalformedByte/1"
body: """
- { "byteInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "byteInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonPathByteUnderflowOverflow",
+ id: "RestJsonPathByteUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedByte/$value:L"
- },
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedByte/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonQueryByteUnderflowOverflow",
+ id: "RestJsonQueryByteUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedByte/1",
- queryParams: [
- "byteInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedByte/1"
+ queryParams: ["byteInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonHeaderByteUnderflowOverflow",
+ id: "RestJsonHeaderByteUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedByte/1",
- headers: {
- "byteInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedByte/1"
+ headers: { byteInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["256", "-256", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonBodyByteMalformedValueRejected",
+ id: "RestJsonBodyByteMalformedValueRejected"
documentation: """
- Malformed values in the body should be rejected""",
- protocol: restJson1,
+ Malformed values in the body should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedByte/1",
+ method: "POST"
+ uri: "/MalformedByte/1"
body: """
- { "byteInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "byteInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["\"123\"", "true", "1.001", "2ABC", "0x42",
- "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""],
- "tag" : ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex",
- "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["\"123\"", "true", "1.001", "2ABC", "0x42", "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""]
+ tag: ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonPathByteMalformedValueRejected",
+ id: "RestJsonPathByteMalformedValueRejected"
documentation: """
- Malformed values in the path should be rejected""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedByte/$value:L"
- },
+ Malformed values in the path should be rejected"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedByte/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonQueryByteMalformedValueRejected",
+ id: "RestJsonQueryByteMalformedValueRejected"
documentation: """
- Malformed values in query parameters should be rejected""",
- protocol: restJson1,
+ Malformed values in query parameters should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedByte/1",
- queryParams: [
- "byteInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedByte/1"
+ queryParams: ["byteInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonHeaderByteMalformedValueRejected",
+ id: "RestJsonHeaderByteMalformedValueRejected"
documentation: """
- Malformed values in headers should be rejected""",
- protocol: restJson1,
+ Malformed values in headers should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedByte/1",
- headers: {
- "byteInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedByte/1"
+ headers: { byteInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
])
structure MalformedByteInput {
- byteInBody: Byte,
+ byteInBody: Byte
@httpLabel
@required
- byteInPath: Byte,
+ byteInPath: Byte
@httpQuery("byteInQuery")
- byteInQuery: Byte,
+ byteInQuery: Byte
@httpHeader("byteInHeader")
byteInHeader: Byte
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-content-type.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-content-type.smithy
index 062e4e018c4..d7c91ff9a84 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-content-type.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-content-type.smithy
@@ -3,133 +3,123 @@ $version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#JpegBlob
+use smithy.test#httpMalformedRequestTests
apply MalformedContentTypeWithoutBody @httpMalformedRequestTests([
{
- id: "RestJsonWithoutBodyExpectsEmptyContentType",
+ id: "RestJsonWithoutBodyExpectsEmptyContentType"
documentation: """
- When there is no modeled input, content type must not be set and the body must be empty.""",
- protocol: restJson1,
+ When there is no modeled input, content type must not be set and the body must be empty."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedContentTypeWithoutBody",
- body: "{}",
+ method: "POST"
+ uri: "/MalformedContentTypeWithoutBody"
+ body: "{}"
headers: {
// this should be omitted
"content-type": "application/json"
}
- },
+ }
response: {
- code: 415,
- headers: {
- "x-amzn-errortype": "UnsupportedMediaTypeException"
- }
- },
- tags: [ "content-type" ]
+ code: 415
+ headers: { "x-amzn-errortype": "UnsupportedMediaTypeException" }
+ }
+ tags: ["content-type"]
}
])
apply MalformedContentTypeWithBody @httpMalformedRequestTests([
{
- id: "RestJsonWithBodyExpectsApplicationJsonContentType",
+ id: "RestJsonWithBodyExpectsApplicationJsonContentType"
documentation: """
- When there is modeled input, they content type must be application/json""",
- protocol: restJson1,
+ When there is modeled input, they content type must be application/json"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedContentTypeWithBody",
- body: "{}",
+ method: "POST"
+ uri: "/MalformedContentTypeWithBody"
+ body: "{}"
headers: {
// this should be application/json
"content-type": "application/hal+json"
}
- },
+ }
response: {
- code: 415,
- headers: {
- "x-amzn-errortype": "UnsupportedMediaTypeException"
- }
- },
- tags: [ "content-type" ]
+ code: 415
+ headers: { "x-amzn-errortype": "UnsupportedMediaTypeException" }
+ }
+ tags: ["content-type"]
}
])
apply MalformedContentTypeWithPayload @httpMalformedRequestTests([
{
- id: "RestJsonWithPayloadExpectsModeledContentType",
+ id: "RestJsonWithPayloadExpectsModeledContentType"
documentation: """
- When there is a payload with a mediaType trait, the content type must match.""",
- protocol: restJson1,
+ When there is a payload with a mediaType trait, the content type must match."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedContentTypeWithPayload",
- body: "{}",
+ method: "POST"
+ uri: "/MalformedContentTypeWithPayload"
+ body: "{}"
headers: {
// this should be image/jpeg
"content-type": "application/json"
}
- },
+ }
response: {
- code: 415,
- headers: {
- "x-amzn-errortype": "UnsupportedMediaTypeException"
- }
- },
- tags: [ "content-type" ]
+ code: 415
+ headers: { "x-amzn-errortype": "UnsupportedMediaTypeException" }
+ }
+ tags: ["content-type"]
}
])
apply MalformedContentTypeWithPayload @httpMalformedRequestTests([
{
- id: "RestJsonWithPayloadExpectsImpliedContentType",
+ id: "RestJsonWithPayloadExpectsImpliedContentType"
documentation: """
- When there is a payload without a mediaType trait, the content type must match the
- implied content type of the shape.""",
- protocol: restJson1,
+ When there is a payload without a mediaType trait, the content type must match the
+ implied content type of the shape."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedContentTypeWithPayload",
- body: "{}",
+ method: "POST"
+ uri: "/MalformedContentTypeWithPayload"
+ body: "{}"
headers: {
// this should be text/plain
"content-type": "application/json"
}
- },
+ }
response: {
- code: 415,
- headers: {
- "x-amzn-errortype": "UnsupportedMediaTypeException"
- }
- },
- tags: [ "content-type" ]
+ code: 415
+ headers: { "x-amzn-errortype": "UnsupportedMediaTypeException" }
+ }
+ tags: ["content-type"]
}
])
apply MalformedContentTypeWithoutBodyEmptyInput @httpMalformedRequestTests([
{
- id: "RestJsonWithoutBodyEmptyInputExpectsEmptyContentType",
+ id: "RestJsonWithoutBodyEmptyInputExpectsEmptyContentType"
documentation: """
- When there is no modeled body input, content type must not be set and the body must be empty.""",
- protocol: restJson1,
+ When there is no modeled body input, content type must not be set and the body must be empty."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedContentTypeWithoutBodyEmptyInput",
- body: "{}",
+ method: "POST"
+ uri: "/MalformedContentTypeWithoutBodyEmptyInput"
+ body: "{}"
headers: {
// this should be omitted
"content-type": "application/json"
}
- },
+ }
response: {
- code: 415,
- headers: {
- "x-amzn-errortype": "UnsupportedMediaTypeException"
- }
- },
- tags: [ "content-type" ]
+ code: 415
+ headers: { "x-amzn-errortype": "UnsupportedMediaTypeException" }
+ }
+ tags: ["content-type"]
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-double.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-double.smithy
index 85bc118a3af..94c3735bd23 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-double.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-double.smithy
@@ -13,113 +13,95 @@ operation MalformedDouble {
apply MalformedDouble @httpMalformedRequestTests([
{
- id: "RestJsonBodyDoubleMalformedValueRejected",
+ id: "RestJsonBodyDoubleMalformedValueRejected"
documentation: """
- Malformed values in the body should be rejected""",
- protocol: restJson1,
+ Malformed values in the body should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedDouble/1",
+ method: "POST"
+ uri: "/MalformedDouble/1"
body: """
- { "doubleInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "doubleInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["\"123\"", "true", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["string_coercion", "boolean_coercion", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["\"123\"", "true", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["string_coercion", "boolean_coercion", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonPathDoubleMalformedValueRejected",
+ id: "RestJsonPathDoubleMalformedValueRejected"
documentation: """
- Malformed values in the path should be rejected""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedDouble/$value:L"
- },
+ Malformed values in the path should be rejected"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedDouble/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "2ABC", "0x42"],
- "tag" : ["boolean_coercion", "trailing_chars", "hex"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "2ABC", "0x42"]
+ tag: ["boolean_coercion", "trailing_chars", "hex"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonQueryDoubleMalformedValueRejected",
+ id: "RestJsonQueryDoubleMalformedValueRejected"
documentation: """
- Malformed values in query parameters should be rejected""",
- protocol: restJson1,
+ Malformed values in query parameters should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedDouble/1",
- queryParams: [
- "doubleInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedDouble/1"
+ queryParams: ["doubleInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "2ABC", "0x42"],
- "tag" : ["boolean_coercion", "trailing_chars", "hex"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "2ABC", "0x42"]
+ tag: ["boolean_coercion", "trailing_chars", "hex"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonHeaderDoubleMalformedValueRejected",
+ id: "RestJsonHeaderDoubleMalformedValueRejected"
documentation: """
- Malformed values in headers should be rejected""",
- protocol: restJson1,
+ Malformed values in headers should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedDouble/1",
- headers: {
- "doubleInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedDouble/1"
+ headers: { doubleInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "2ABC", "0x42"],
- "tag" : ["boolean_coercion", "trailing_chars", "hex"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "2ABC", "0x42"]
+ tag: ["boolean_coercion", "trailing_chars", "hex"]
+ }
+ tags: ["$tag:L"]
+ }
])
structure MalformedDoubleInput {
- doubleInBody: Double,
+ doubleInBody: Double
@httpLabel
@required
- doubleInPath: Double,
+ doubleInPath: Double
@httpQuery("doubleInQuery")
- doubleInQuery: Double,
+ doubleInQuery: Double
@httpHeader("doubleInHeader")
doubleInHeader: Double
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-float.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-float.smithy
index 19109f7780a..b57012dffc5 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-float.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-float.smithy
@@ -13,113 +13,95 @@ operation MalformedFloat {
apply MalformedFloat @httpMalformedRequestTests([
{
- id: "RestJsonBodyFloatMalformedValueRejected",
+ id: "RestJsonBodyFloatMalformedValueRejected"
documentation: """
- Malformed values in the body should be rejected""",
- protocol: restJson1,
+ Malformed values in the body should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedFloat/1",
+ method: "POST"
+ uri: "/MalformedFloat/1"
body: """
- { "floatInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "floatInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["\"123\"", "true", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["string_coercion", "boolean_coercion", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["\"123\"", "true", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["string_coercion", "boolean_coercion", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonPathFloatMalformedValueRejected",
+ id: "RestJsonPathFloatMalformedValueRejected"
documentation: """
- Malformed values in the path should be rejected""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedFloat/$value:L"
- },
+ Malformed values in the path should be rejected"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedFloat/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "2ABC", "0x42"],
- "tag" : ["boolean_coercion", "trailing_chars", "hex"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "2ABC", "0x42"]
+ tag: ["boolean_coercion", "trailing_chars", "hex"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonQueryFloatMalformedValueRejected",
+ id: "RestJsonQueryFloatMalformedValueRejected"
documentation: """
- Malformed values in query parameters should be rejected""",
- protocol: restJson1,
+ Malformed values in query parameters should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedFloat/1",
- queryParams: [
- "floatInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedFloat/1"
+ queryParams: ["floatInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "2ABC", "0x42"],
- "tag" : ["boolean_coercion", "trailing_chars", "hex"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "2ABC", "0x42"]
+ tag: ["boolean_coercion", "trailing_chars", "hex"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonHeaderFloatMalformedValueRejected",
+ id: "RestJsonHeaderFloatMalformedValueRejected"
documentation: """
- Malformed values in headers should be rejected""",
- protocol: restJson1,
+ Malformed values in headers should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedFloat/1",
- headers: {
- "floatInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedFloat/1"
+ headers: { floatInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "2ABC", "0x42"],
- "tag" : ["boolean_coercion", "trailing_chars", "hex"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "2ABC", "0x42"]
+ tag: ["boolean_coercion", "trailing_chars", "hex"]
+ }
+ tags: ["$tag:L"]
+ }
])
structure MalformedFloatInput {
- floatInBody: Float,
+ floatInBody: Float
@httpLabel
@required
- floatInPath: Float,
+ floatInPath: Float
@httpQuery("floatInQuery")
- floatInQuery: Float,
+ floatInQuery: Float
@httpHeader("floatInHeader")
floatInHeader: Float
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-integer.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-integer.smithy
index 9b309676603..d6a1c474b91 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-integer.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-integer.smithy
@@ -13,206 +13,169 @@ operation MalformedInteger {
apply MalformedInteger @httpMalformedRequestTests([
{
- id: "RestJsonBodyIntegerUnderflowOverflow",
+ id: "RestJsonBodyIntegerUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedInteger/1",
+ method: "POST"
+ uri: "/MalformedInteger/1"
body: """
- { "integerInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "integerInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : [ "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonPathIntegerUnderflowOverflow",
+ id: "RestJsonPathIntegerUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedInteger/$value:L"
- },
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedInteger/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : [ "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonQueryIntegerUnderflowOverflow",
+ id: "RestJsonQueryIntegerUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedInteger/1",
- queryParams: [
- "integerInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedInteger/1"
+ queryParams: ["integerInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : [ "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonHeaderIntegerUnderflowOverflow",
+ id: "RestJsonHeaderIntegerUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedInteger/1",
- headers: {
- "integerInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedInteger/1"
+ headers: { integerInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : [ "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonBodyIntegerMalformedValueRejected",
+ id: "RestJsonBodyIntegerMalformedValueRejected"
documentation: """
- Malformed values in the body should be rejected""",
- protocol: restJson1,
+ Malformed values in the body should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedInteger/1",
+ method: "POST"
+ uri: "/MalformedInteger/1"
body: """
- { "integerInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "integerInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["\"123\"", "true", "1.001", "2ABC", "0x42",
- "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""],
- "tag" : ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex",
- "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["\"123\"", "true", "1.001", "2ABC", "0x42", "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""]
+ tag: ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonPathIntegerMalformedValueRejected",
+ id: "RestJsonPathIntegerMalformedValueRejected"
documentation: """
- Malformed values in the path should be rejected""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedInteger/$value:L"
- },
+ Malformed values in the path should be rejected"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedInteger/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonQueryIntegerMalformedValueRejected",
+ id: "RestJsonQueryIntegerMalformedValueRejected"
documentation: """
- Malformed values in query parameters should be rejected""",
- protocol: restJson1,
+ Malformed values in query parameters should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedInteger/1",
- queryParams: [
- "integerInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedInteger/1"
+ queryParams: ["integerInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonHeaderIntegerMalformedValueRejected",
+ id: "RestJsonHeaderIntegerMalformedValueRejected"
documentation: """
- Malformed values in headers should be rejected""",
- protocol: restJson1,
+ Malformed values in headers should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedInteger/1",
- headers: {
- "integerInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedInteger/1"
+ headers: { integerInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
])
structure MalformedIntegerInput {
- integerInBody: Integer,
+ integerInBody: Integer
@httpLabel
@required
- integerInPath: Integer,
+ integerInPath: Integer
@httpQuery("integerInQuery")
- integerInQuery: Integer,
+ integerInQuery: Integer
@httpHeader("integerInHeader")
integerInHeader: Integer
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-list.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-list.smithy
index 2a3338c6e74..3c158cd32aa 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-list.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-list.smithy
@@ -13,57 +13,47 @@ operation MalformedList {
apply MalformedList @httpMalformedRequestTests([
{
- id: "RestJsonBodyMalformedListNullItem",
+ id: "RestJsonBodyMalformedListNullItem"
documentation: """
- When a dense list contains null, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ When a dense list contains null, the response should be a 400
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedList",
+ method: "POST"
+ uri: "/MalformedList"
body: """
- { "bodyList" : ["a", null, "b", "c"] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "bodyList" : ["a", null, "b", "c"] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
{
- id: "RestJsonBodyMalformedListUnclosed",
+ id: "RestJsonBodyMalformedListUnclosed"
documentation: """
- When a list does not have a closing bracket, the response should be
- a 400 SerializationException.""",
- protocol: restJson1,
+ When a list does not have a closing bracket, the response should be
+ a 400 SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedList",
+ method: "POST"
+ uri: "/MalformedList"
body: """
- { "bodyList" : ["a", "b", "c" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "bodyList" : ["a", "b", "c" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
])
structure MalformedListInput {
- bodyList: SimpleList,
+ bodyList: SimpleList
}
-
list SimpleList {
member: String
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-long.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-long.smithy
index 47c22763c66..21a898682d3 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-long.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-long.smithy
@@ -13,206 +13,169 @@ operation MalformedLong {
apply MalformedLong @httpMalformedRequestTests([
{
- id: "RestJsonBodyLongUnderflowOverflow",
+ id: "RestJsonBodyLongUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLong/1",
+ method: "POST"
+ uri: "/MalformedLong/1"
body: """
- { "longInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "longInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["-184467440737095500000", "184467440737095500000", "123000000000000000000000" ]
- },
+ value: ["-184467440737095500000", "184467440737095500000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonPathLongUnderflowOverflow",
+ id: "RestJsonPathLongUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedLong/$value:L"
- },
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedLong/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["-184467440737095500000", "184467440737095500000", "123000000000000000000000" ]
- },
+ value: ["-184467440737095500000", "184467440737095500000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonQueryLongUnderflowOverflow",
+ id: "RestJsonQueryLongUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLong/1",
- queryParams: [
- "longInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedLong/1"
+ queryParams: ["longInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["-184467440737095500000", "184467440737095500000", "123000000000000000000000" ]
- },
+ value: ["-184467440737095500000", "184467440737095500000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonHeaderLongUnderflowOverflow",
+ id: "RestJsonHeaderLongUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLong/1",
- headers: {
- "longInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedLong/1"
+ headers: { longInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["-184467440737095500000", "184467440737095500000", "123000000000000000000000" ]
- },
+ value: ["-184467440737095500000", "184467440737095500000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonBodyLongMalformedValueRejected",
+ id: "RestJsonBodyLongMalformedValueRejected"
documentation: """
- Malformed values in the body should be rejected""",
- protocol: restJson1,
+ Malformed values in the body should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLong/1",
+ method: "POST"
+ uri: "/MalformedLong/1"
body: """
- { "longInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "longInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["\"123\"", "true", "1.001", "2ABC", "0x42",
- "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""],
- "tag" : ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex",
- "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["\"123\"", "true", "1.001", "2ABC", "0x42", "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""]
+ tag: ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonPathLongMalformedValueRejected",
+ id: "RestJsonPathLongMalformedValueRejected"
documentation: """
- Malformed values in the path should be rejected""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedLong/$value:L"
- },
+ Malformed values in the path should be rejected"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedLong/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonQueryLongMalformedValueRejected",
+ id: "RestJsonQueryLongMalformedValueRejected"
documentation: """
- Malformed values in query parameters should be rejected""",
- protocol: restJson1,
+ Malformed values in query parameters should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLong/1",
- queryParams: [
- "longInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedLong/1"
+ queryParams: ["longInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonHeaderLongMalformedValueRejected",
+ id: "RestJsonHeaderLongMalformedValueRejected"
documentation: """
- Malformed values in headers should be rejected""",
- protocol: restJson1,
+ Malformed values in headers should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLong/1",
- headers: {
- "longInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedLong/1"
+ headers: { longInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
])
structure MalformedLongInput {
- longInBody: Long,
+ longInBody: Long
@httpLabel
@required
- longInPath: Long,
+ longInPath: Long
@httpQuery("longInQuery")
- longInQuery: Long,
+ longInQuery: Long
@httpHeader("longInHeader")
longInHeader: Long
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-map.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-map.smithy
index 1275a547e09..29a39282d09 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-map.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-map.smithy
@@ -13,58 +13,48 @@ operation MalformedMap {
apply MalformedMap @httpMalformedRequestTests([
{
- id: "RestJsonBodyMalformedMapNullKey",
+ id: "RestJsonBodyMalformedMapNullKey"
documentation: """
- When a map contains a null key, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ When a map contains a null key, the response should be a 400
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedMap",
+ method: "POST"
+ uri: "/MalformedMap"
body: """
- { "bodyMap" : { null: "abc" } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "bodyMap" : { null: "abc" } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
{
- id: "RestJsonBodyMalformedMapNullValue",
+ id: "RestJsonBodyMalformedMapNullValue"
documentation: """
- When a dense map contains a null value, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ When a dense map contains a null value, the response should be a 400
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedMap",
+ method: "POST"
+ uri: "/MalformedMap"
body: """
- { "bodyMap" : { "abc": null } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "bodyMap" : { "abc": null } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
])
structure MalformedMapInput {
bodyMap: SimpleMap
}
-
map SimpleMap {
- key: String,
+ key: String
value: String
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-request-body.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-request-body.smithy
index 59100d08358..601e3484b14 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-request-body.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-request-body.smithy
@@ -13,72 +13,64 @@ operation MalformedRequestBody {
apply MalformedRequestBody @httpMalformedRequestTests([
{
- id: "RestJsonInvalidJsonBody",
+ id: "RestJsonInvalidJsonBody"
documentation: """
- When the request body is not valid JSON, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ When the request body is not valid JSON, the response should be a 400
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRequestBody",
- body: "$value:L",
- headers: {
- "content-type": "application/json"
- }
- },
+ method: "POST"
+ uri: "/MalformedRequestBody"
+ body: "$value:L"
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value": ["{[",
- "{ \"int\": 10 }abc",
- "abc{ \"int\": 10 }",
- """
- {
- "int": 10 // the integer should be 10
- }""",
- """
- {
- "int": 10 /* the integer should be 10 */
- }""",
- "{\"int\" :\u000c10}",
- "{'int': 10}",
- "{\"int\": 10,}",
- ]
+ value: [
+ "{["
+ "{ \"int\": 10 }abc"
+ "abc{ \"int\": 10 }"
+ """
+ {
+ "int": 10 // the integer should be 10
+ }"""
+ """
+ {
+ "int": 10 /* the integer should be 10 */
+ }"""
+ "{\"int\" :\u000c10}"
+ "{'int': 10}"
+ "{\"int\": 10,}"
+ ]
}
- },
+ }
{
- id: "RestJsonTechnicallyValidJsonBody",
+ id: "RestJsonTechnicallyValidJsonBody"
documentation: """
- When the request body is technically valid, but cannot map to a Smithy structure,
- the response should be a 400 SerializationException.""",
- protocol: restJson1,
+ When the request body is technically valid, but cannot map to a Smithy structure,
+ the response should be a 400 SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRequestBody",
- body: "$value:L",
- headers: {
- "content-type": "application/json"
- }
- },
+ method: "POST"
+ uri: "/MalformedRequestBody"
+ body: "$value:L"
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
value: ["[{ \"int\": 10}]", "10", "null"]
- },
+ }
tags: ["technically_valid_json_body"]
- },
+ }
])
structure MalformedRequestBodyInput {
- int: Integer,
+ int: Integer
float: Float
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-short.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-short.smithy
index 986615ffc08..e9a38a7a57c 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-short.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-short.smithy
@@ -13,206 +13,169 @@ operation MalformedShort {
apply MalformedShort @httpMalformedRequestTests([
{
- id: "RestJsonBodyShortUnderflowOverflow",
+ id: "RestJsonBodyShortUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedShort/1",
+ method: "POST"
+ uri: "/MalformedShort/1"
body: """
- { "shortInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "shortInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonPathShortUnderflowOverflow",
+ id: "RestJsonPathShortUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedShort/$value:L"
- },
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedShort/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonQueryShortUnderflowOverflow",
+ id: "RestJsonQueryShortUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedShort/1",
- queryParams: [
- "shortInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedShort/1"
+ queryParams: ["shortInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonHeaderShortUnderflowOverflow",
+ id: "RestJsonHeaderShortUnderflowOverflow"
documentation: """
- Underflow or overflow should result in SerializationException""",
- protocol: restJson1,
+ Underflow or overflow should result in SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedShort/1",
- headers: {
- "shortInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedShort/1"
+ headers: { shortInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000" ]
- },
+ value: ["40000", "-40000", "-9223372000000000000", "9223372000000000000", "123000000000000000000000"]
+ }
tags: ["underflow/overflow"]
- },
+ }
{
- id: "RestJsonBodyShortMalformedValueRejected",
+ id: "RestJsonBodyShortMalformedValueRejected"
documentation: """
- Malformed values in the body should be rejected""",
- protocol: restJson1,
+ Malformed values in the body should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedShort/1",
+ method: "POST"
+ uri: "/MalformedShort/1"
body: """
- { "shortInBody" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "shortInBody" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["\"123\"", "true", "1.001", "2ABC", "0x42",
- "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""],
- "tag" : ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex",
- "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["\"123\"", "true", "1.001", "2ABC", "0x42", "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""]
+ tag: ["string_coercion", "boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "string_inf", "negative_inf", "string_negative_inf", "nan", "string_nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonPathShortMalformedValueRejected",
+ id: "RestJsonPathShortMalformedValueRejected"
documentation: """
- Malformed values in the path should be rejected""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedShort/$value:L"
- },
+ Malformed values in the path should be rejected"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedShort/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonQueryShortMalformedValueRejected",
+ id: "RestJsonQueryShortMalformedValueRejected"
documentation: """
- Malformed values in query parameters should be rejected""",
- protocol: restJson1,
+ Malformed values in query parameters should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedShort/1",
- queryParams: [
- "shortInQuery=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedShort/1"
+ queryParams: ["shortInQuery=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
{
- id: "RestJsonHeaderShortMalformedValueRejected",
+ id: "RestJsonHeaderShortMalformedValueRejected"
documentation: """
- Malformed values in headers should be rejected""",
- protocol: restJson1,
+ Malformed values in headers should be rejected"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedShort/1",
- headers: {
- "shortInHeader" : "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedShort/1"
+ headers: { shortInHeader: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- testParameters : {
- "value" : ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"],
- "tag" : ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
- },
- tags: [ "$tag:L" ]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ testParameters: {
+ value: ["true", "1.001", "2ABC", "0x42", "Infinity", "-Infinity", "NaN"]
+ tag: ["boolean_coercion", "float_truncation", "trailing_chars", "hex", "inf", "negative_inf", "nan"]
+ }
+ tags: ["$tag:L"]
+ }
])
structure MalformedShortInput {
- shortInBody: Short,
+ shortInBody: Short
@httpLabel
@required
- shortInPath: Short,
+ shortInPath: Short
@httpQuery("shortInQuery")
- shortInQuery: Short,
+ shortInQuery: Short
@httpHeader("shortInHeader")
shortInHeader: Short
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-string.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-string.smithy
index 2d18dbff334..6091eb89e27 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-string.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-string.smithy
@@ -13,45 +13,40 @@ operation MalformedString {
apply MalformedString @httpMalformedRequestTests([
{
- id: "RestJsonHeaderMalformedStringInvalidBase64MediaType",
+ id: "RestJsonHeaderMalformedStringInvalidBase64MediaType"
documentation: """
- When string with the mediaType trait is bound to a header, its value
- must be base64 encoded. The server should reject values that aren't
- valid base64 out of hand.""",
- protocol: restJson1,
+ When string with the mediaType trait is bound to a header, its value
+ must be base64 encoded. The server should reject values that aren't
+ valid base64 out of hand."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedString",
- headers: {
- "content-type": "application/json",
- "amz-media-typed-header": "$value:L",
- }
- },
+ method: "POST"
+ uri: "/MalformedString"
+ headers: { "content-type": "application/json", "amz-media-typed-header": "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
value: [
// Insufficient padding
- "xyz",
+ "xyz"
// Extant, but also insufficient padding
- "YmxvYg=",
+ "YmxvYg="
// Invalid characters
- "[][]",
+ "[][]"
// Invalid characters which are commonly used as filename-safe
// alternatives to + and /
"-_=="
]
}
- },
+ }
])
structure MalformedStringInput {
@httpHeader("amz-media-typed-header")
- blob: JsonHeaderString,
+ blob: JsonHeaderString
}
@mediaType("application/json")
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-body.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-body.smithy
index ecdd1419106..7510dcae812 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-body.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-body.smithy
@@ -25,304 +25,245 @@ operation MalformedTimestampBodyHttpDate {
apply MalformedTimestampBodyDefault @httpMalformedRequestTests([
{
- id: "RestJsonBodyTimestampDefaultRejectsDateTime",
+ id: "RestJsonBodyTimestampDefaultRejectsDateTime"
documentation: """
- By default, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDefault",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDefault"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23:20:50.52Z",
- "1985-04-12T23:20:50Z",
- "1996-12-19T16:39:57-08:00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23:20:50.52Z", "1985-04-12T23:20:50Z", "1996-12-19T16:39:57-08:00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampDefaultRejectsStringifiedEpochSeconds",
+ id: "RestJsonBodyTimestampDefaultRejectsStringifiedEpochSeconds"
documentation: """
- By default, epoch second timestamps as strings are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, epoch second timestamps as strings are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDefault",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDefault"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampDefaultRejectsMalformedEpochSeconds",
+ id: "RestJsonBodyTimestampDefaultRejectsMalformedEpochSeconds"
documentation: """
- Invalid values for epoch seconds are rejected with a 400 SerializationException""",
- protocol: restJson1,
+ Invalid values for epoch seconds are rejected with a 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDefault",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDefault"
body: """
- { "timestamp": $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["true", "1515531081ABC", "0x42", "1515531081.123.456",
- "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""]
- },
- tags : ["timestamp"]
- },
+ value: ["true", "1515531081ABC", "0x42", "1515531081.123.456", "Infinity", "\"Infinity\"", "-Infinity", "\"-Infinity\"", "NaN", "\"NaN\""]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampDefaultRejectsHttpDate",
+ id: "RestJsonBodyTimestampDefaultRejectsHttpDate"
documentation: """
- By default, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDefault",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDefault"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue, 29 Apr 2014 18:30:38 GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue, 29 Apr 2014 18:30:38 GMT"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampBodyDateTime @httpMalformedRequestTests([
{
- id: "RestJsonBodyTimestampDateTimeRejectsHttpDate",
+ id: "RestJsonBodyTimestampDateTimeRejectsHttpDate"
documentation: """
- When the format is date-time, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDateTime",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDateTime"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue, 29 Apr 2014 18:30:38 GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue, 29 Apr 2014 18:30:38 GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampDateTimeRejectsEpochSeconds",
+ id: "RestJsonBodyTimestampDateTimeRejectsEpochSeconds"
documentation: """
- When the format is date-time, epoch-seconds timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, epoch-seconds timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDateTime",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDateTime"
body: """
- { "timestamp": $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampDateTimeRejectsUTCOffsets",
+ id: "RestJsonBodyTimestampDateTimeRejectsUTCOffsets"
documentation: """
- When the format is date-time, RFC 3339 timestamps with a UTC offset are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, RFC 3339 timestamps with a UTC offset are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDateTime",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDateTime"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1996-12-19T16:39:57-08:00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1996-12-19T16:39:57-08:00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampDateTimeRejectsDifferent8601Formats",
+ id: "RestJsonBodyTimestampDateTimeRejectsDifferent8601Formats"
documentation: """
- When the format is date-time, maybe-valid ISO-8601 date-times not conforming to RFC 3339
- are rejected with a 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, maybe-valid ISO-8601 date-times not conforming to RFC 3339
+ are rejected with a 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyDateTime",
+ method: "POST"
+ uri: "/MalformedTimestampBodyDateTime"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1996-12-19T16:39:57+00",
- "1996-12-19T16:39:57+00Z",
- "1996-12-19T16:39:57",
- "1996-12-19T163957",
- "19961219T163957Z",
- "19961219T163957",
- "19961219T16:39:57Z",
- "19961219T16:39:57",
- "1996-12-19T16:39Z",
- "1996-12-19T16:39",
- "1996-12-19T1639",
- "1996-12-19T16Z",
- "1996-12-19T16",
- "1996-12-19 16:39:57Z",
- "2011-12-03T10:15:30+01:00[Europe/Paris]"]
- },
- tags : ["timestamp"]
- },
+ value: ["1996-12-19T16:39:57+00", "1996-12-19T16:39:57+00Z", "1996-12-19T16:39:57", "1996-12-19T163957", "19961219T163957Z", "19961219T163957", "19961219T16:39:57Z", "19961219T16:39:57", "1996-12-19T16:39Z", "1996-12-19T16:39", "1996-12-19T1639", "1996-12-19T16Z", "1996-12-19T16", "1996-12-19 16:39:57Z", "2011-12-03T10:15:30+01:00[Europe/Paris]"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampBodyHttpDate @httpMalformedRequestTests([
{
- id: "RestJsonBodyTimestampHttpDateRejectsDateTime",
+ id: "RestJsonBodyTimestampHttpDateRejectsDateTime"
documentation: """
- When the format is http-date, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is http-date, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyHttpDate",
+ method: "POST"
+ uri: "/MalformedTimestampBodyHttpDate"
body: """
- { "timestamp": $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23:20:50.52Z",
- "1985-04-12T23:20:50Z",
- "1996-12-19T16:39:57-08:00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23:20:50.52Z", "1985-04-12T23:20:50Z", "1996-12-19T16:39:57-08:00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonBodyTimestampHttpDateRejectsEpoch",
+ id: "RestJsonBodyTimestampHttpDateRejectsEpoch"
documentation: """
- When the format is http-date, epoch-seconds timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is http-date, epoch-seconds timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampBodyHttpDate",
+ method: "POST"
+ uri: "/MalformedTimestampBodyHttpDate"
body: """
- { "timestamp": $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestamp": $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
])
structure MalformedTimestampBodyDefaultInput {
@required
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampBodyDateTimeInput {
@required
@timestampFormat("date-time")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampBodyHttpDateInput {
@required
@timestampFormat("http-date")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-header.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-header.smithy
index fa33a1d397a..224e272fa82 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-header.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-header.smithy
@@ -25,239 +25,188 @@ operation MalformedTimestampHeaderEpoch {
apply MalformedTimestampHeaderDefault @httpMalformedRequestTests([
{
- id: "RestJsonHeaderTimestampDefaultRejectsDateTime",
+ id: "RestJsonHeaderTimestampDefaultRejectsDateTime"
documentation: """
- By default, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderDefault",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderDefault"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23:20:50.52Z",
- "1985-04-12T23:20:50Z",
- "1996-12-19T16:39:57-08:00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23:20:50.52Z", "1985-04-12T23:20:50Z", "1996-12-19T16:39:57-08:00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonHeaderTimestampDefaultRejectsEpochSeconds",
+ id: "RestJsonHeaderTimestampDefaultRejectsEpochSeconds"
documentation: """
- By default, epoch second timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, epoch second timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderDefault",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderDefault"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampHeaderDateTime @httpMalformedRequestTests([
{
- id: "RestJsonHeaderTimestampDateTimeRejectsHttpDate",
+ id: "RestJsonHeaderTimestampDateTimeRejectsHttpDate"
documentation: """
- When the format is date-time, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderDateTime",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderDateTime"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue, 29 Apr 2014 18:30:38 GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue, 29 Apr 2014 18:30:38 GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonHeaderTimestampDateTimeRejectsEpochSeconds",
+ id: "RestJsonHeaderTimestampDateTimeRejectsEpochSeconds"
documentation: """
- When the format is date-time, epoch-seconds timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, epoch-seconds timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderDateTime",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderDateTime"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonHeaderTimestampDateTimeRejectsDifferent8601Formats",
+ id: "RestJsonHeaderTimestampDateTimeRejectsDifferent8601Formats"
documentation: """
- When the format is date-time, maybe-valid ISO-8601 date-times not conforming to RFC 3339
- are rejected with a 400 SerializationException""",
- protocol: restJson1,
+ When the format is date-time, maybe-valid ISO-8601 date-times not conforming to RFC 3339
+ are rejected with a 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderDateTime",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderDateTime"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1996-12-19T16:39:57+00",
- "1996-12-19T16:39:57+00Z",
- "1996-12-19T16:39:57",
- "1996-12-19T163957",
- "19961219T163957Z",
- "19961219T163957",
- "19961219T16:39:57Z",
- "19961219T16:39:57",
- "1996-12-19T16:39Z",
- "1996-12-19T16:39",
- "1996-12-19T1639",
- "1996-12-19T16Z",
- "1996-12-19T16",
- "1996-12-19 16:39:57Z",
- "2011-12-03T10:15:30+01:00[Europe/Paris]"]
- },
- tags : ["timestamp"]
- },
+ value: ["1996-12-19T16:39:57+00", "1996-12-19T16:39:57+00Z", "1996-12-19T16:39:57", "1996-12-19T163957", "19961219T163957Z", "19961219T163957", "19961219T16:39:57Z", "19961219T16:39:57", "1996-12-19T16:39Z", "1996-12-19T16:39", "1996-12-19T1639", "1996-12-19T16Z", "1996-12-19T16", "1996-12-19 16:39:57Z", "2011-12-03T10:15:30+01:00[Europe/Paris]"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampHeaderEpoch @httpMalformedRequestTests([
{
- id: "RestJsonHeaderTimestampEpochRejectsDateTime",
+ id: "RestJsonHeaderTimestampEpochRejectsDateTime"
documentation: """
- When the format is epoch-seconds, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is epoch-seconds, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderEpoch",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderEpoch"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23:20:50.52Z",
- "1985-04-12T23:20:50Z",
- "1996-12-19T16:39:57-08:00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23:20:50.52Z", "1985-04-12T23:20:50Z", "1996-12-19T16:39:57-08:00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonHeaderTimestampEpochRejectsHttpDate",
+ id: "RestJsonHeaderTimestampEpochRejectsHttpDate"
documentation: """
- When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderEpoch",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderEpoch"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue, 29 Apr 2014 18:30:38 GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue, 29 Apr 2014 18:30:38 GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonHeaderTimestampEpochRejectsMalformedValues",
+ id: "RestJsonHeaderTimestampEpochRejectsMalformedValues"
documentation: """
- Invalid values for epoch seconds are rejected with a 400 SerializationException""",
- protocol: restJson1,
+ Invalid values for epoch seconds are rejected with a 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampHeaderEpoch",
- headers: {
- "timestamp": "$value:L"
- }
- },
+ method: "POST"
+ uri: "/MalformedTimestampHeaderEpoch"
+ headers: { timestamp: "$value:L" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["true", "1515531081ABC", "0x42", "1515531081.123.456",
- "Infinity", "-Infinity", "NaN"]
- },
- tags : ["timestamp"]
- },
+ value: ["true", "1515531081ABC", "0x42", "1515531081.123.456", "Infinity", "-Infinity", "NaN"]
+ }
+ tags: ["timestamp"]
+ }
])
structure MalformedTimestampHeaderDefaultInput {
@httpHeader("timestamp")
@required
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampHeaderDateTimeInput {
@httpHeader("timestamp")
@required
@timestampFormat("date-time")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampHeaderEpochInput {
@httpHeader("timestamp")
@required
@timestampFormat("epoch-seconds")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-path.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-path.smithy
index 2f938ab7159..dad56491ee6 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-path.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-path.smithy
@@ -25,236 +25,169 @@ operation MalformedTimestampPathEpoch {
apply MalformedTimestampPathDefault @httpMalformedRequestTests([
{
- id: "RestJsonPathTimestampDefaultRejectsHttpDate",
+ id: "RestJsonPathTimestampDefaultRejectsHttpDate"
documentation: """
- By default, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathDefault/$value:L"
- },
+ By default, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathDefault/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT",
- "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonPathTimestampDefaultRejectsEpochSeconds",
+ id: "RestJsonPathTimestampDefaultRejectsEpochSeconds"
documentation: """
- By default, epoch second timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathDefault/$value:L"
- },
+ By default, epoch second timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathDefault/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonPathTimestampDefaultRejectsUTCOffsets",
+ id: "RestJsonPathTimestampDefaultRejectsUTCOffsets"
documentation: """
- UTC offsets must be rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathDefault/1996-12-19T16%3A39%3A57-08%3A00"
- },
+ UTC offsets must be rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathDefault/1996-12-19T16%3A39%3A57-08%3A00" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- tags : ["timestamp"]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonPathTimestampDefaultRejectsDifferent8601Formats",
+ id: "RestJsonPathTimestampDefaultRejectsDifferent8601Formats"
documentation: """
- By default, maybe-valid ISO-8601 date-times not conforming to RFC 3339
- are rejected with a 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathDefault/$value:L"
- },
+ By default, maybe-valid ISO-8601 date-times not conforming to RFC 3339
+ are rejected with a 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathDefault/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1996-12-19T16%3A39%3A57%2B00",
- "1996-12-19T16%3A39%3A57%2B00Z",
- "1996-12-19T16%3A39%3A57",
- "1996-12-19T163957",
- "19961219T163957Z",
- "19961219T163957",
- "19961219T16%3A39%3A57Z",
- "19961219T16%3A39%3A57",
- "1996-12-19T16%3A39Z",
- "1996-12-19T16%3A39",
- "1996-12-19T1639",
- "1996-12-19T16Z",
- "1996-12-19T16",
- "1996-12-19%2016%3A39%3A57Z",
- "2011-12-03T10%3A15%3A30%2B01%3A00%5BEurope%2FParis%5D"]
- },
- tags : ["timestamp"]
- },
+ value: ["1996-12-19T16%3A39%3A57%2B00", "1996-12-19T16%3A39%3A57%2B00Z", "1996-12-19T16%3A39%3A57", "1996-12-19T163957", "19961219T163957Z", "19961219T163957", "19961219T16%3A39%3A57Z", "19961219T16%3A39%3A57", "1996-12-19T16%3A39Z", "1996-12-19T16%3A39", "1996-12-19T1639", "1996-12-19T16Z", "1996-12-19T16", "1996-12-19%2016%3A39%3A57Z", "2011-12-03T10%3A15%3A30%2B01%3A00%5BEurope%2FParis%5D"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampPathHttpDate @httpMalformedRequestTests([
{
- id: "RestJsonPathTimestampHttpDateRejectsDateTime",
+ id: "RestJsonPathTimestampHttpDateRejectsDateTime"
documentation: """
- When the format is http-date, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathHttpDate/$value:L"
- },
+ When the format is http-date, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathHttpDate/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23%3A20%3A50.52Z",
- "1985-04-12T23%3A20%3A50Z",
- "1996-12-19T16%3A39%3A57-08%3A00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23%3A20%3A50.52Z", "1985-04-12T23%3A20%3A50Z", "1996-12-19T16%3A39%3A57-08%3A00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonPathTimestampHttpDateRejectsEpochSeconds",
+ id: "RestJsonPathTimestampHttpDateRejectsEpochSeconds"
documentation: """
- When the format is http-date, epoch second timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathHttpDate/$value:L"
- },
+ When the format is http-date, epoch second timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathHttpDate/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampPathEpoch @httpMalformedRequestTests([
{
- id: "RestJsonPathTimestampEpochRejectsDateTime",
+ id: "RestJsonPathTimestampEpochRejectsDateTime"
documentation: """
- When the format is epoch-seconds, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathEpoch/$value:L"
- },
+ When the format is epoch-seconds, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathEpoch/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23%3A20%3A50.52Z",
- "1985-04-12T23%3A20%3A50Z",
- "1996-12-19T16%3A39%3A57-08%3A00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23%3A20%3A50.52Z", "1985-04-12T23%3A20%3A50Z", "1996-12-19T16%3A39%3A57-08%3A00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonPathTimestampEpochRejectsHttpDate",
+ id: "RestJsonPathTimestampEpochRejectsHttpDate"
documentation: """
- When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathEpoch/$value:L"
- },
+ When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathEpoch/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT",
- "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonPathTimestampEpochRejectsMalformedValues",
+ id: "RestJsonPathTimestampEpochRejectsMalformedValues"
documentation: """
- Invalid values for epoch seconds are rejected with a 400 SerializationException""",
- protocol: restJson1,
- request: {
- method: "POST",
- uri: "/MalformedTimestampPathEpoch/$value:L"
- },
+ Invalid values for epoch seconds are rejected with a 400 SerializationException"""
+ protocol: restJson1
+ request: { method: "POST", uri: "/MalformedTimestampPathEpoch/$value:L" }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["true", "1515531081ABC", "0x42", "1515531081.123.456",
- "Infinity", "-Infinity", "NaN"]
- },
- tags : ["timestamp"]
- },
+ value: ["true", "1515531081ABC", "0x42", "1515531081.123.456", "Infinity", "-Infinity", "NaN"]
+ }
+ tags: ["timestamp"]
+ }
])
structure MalformedTimestampPathDefaultInput {
@httpLabel
@required
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampPathHttpDateInput {
@httpLabel
@required
@timestampFormat("http-date")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampPathEpochInput {
@httpLabel
@required
@timestampFormat("epoch-seconds")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-query.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-query.smithy
index 9fda07b8967..9cb37845dd1 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-query.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-timestamp-query.smithy
@@ -25,263 +25,205 @@ operation MalformedTimestampQueryEpoch {
apply MalformedTimestampQueryDefault @httpMalformedRequestTests([
{
- id: "RestJsonQueryTimestampDefaultRejectsHttpDate",
+ id: "RestJsonQueryTimestampDefaultRejectsHttpDate"
documentation: """
- By default, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryDefault",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryDefault"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT",
- "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonQueryTimestampDefaultRejectsEpochSeconds",
+ id: "RestJsonQueryTimestampDefaultRejectsEpochSeconds"
documentation: """
- By default, epoch second timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ By default, epoch second timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryDefault",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryDefault"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonQueryTimestampDefaultRejectsUTCOffsets",
+ id: "RestJsonQueryTimestampDefaultRejectsUTCOffsets"
documentation: """
- UTC offsets must be rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ UTC offsets must be rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryDefault",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryDefault"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
- tags : ["timestamp"]
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonQueryTimestampDefaultRejectsDifferent8601Formats",
+ id: "RestJsonQueryTimestampDefaultRejectsDifferent8601Formats"
documentation: """
- By default, maybe-valid ISO-8601 date-times not conforming to RFC 3339
- are rejected with a 400 SerializationException""",
- protocol: restJson1,
+ By default, maybe-valid ISO-8601 date-times not conforming to RFC 3339
+ are rejected with a 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryDefault",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryDefault"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1996-12-19T16:39:57+00",
- "1996-12-19T16:39:57+00Z",
- "1996-12-19T16:39:57",
- "1996-12-19T163957",
- "19961219T163957Z",
- "19961219T163957",
- "19961219T16:39:57Z",
- "19961219T16:39:57",
- "1996-12-19T16:39Z",
- "1996-12-19T16:39",
- "1996-12-19T1639",
- "1996-12-19T16Z",
- "1996-12-19T16",
- "1996-12-19%2016:39:57Z",
- "2011-12-03T10:15:30+01:00[Europe/Paris]"]
- },
- tags : ["timestamp"]
- },
+ value: ["1996-12-19T16:39:57+00", "1996-12-19T16:39:57+00Z", "1996-12-19T16:39:57", "1996-12-19T163957", "19961219T163957Z", "19961219T163957", "19961219T16:39:57Z", "19961219T16:39:57", "1996-12-19T16:39Z", "1996-12-19T16:39", "1996-12-19T1639", "1996-12-19T16Z", "1996-12-19T16", "1996-12-19%2016:39:57Z", "2011-12-03T10:15:30+01:00[Europe/Paris]"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampQueryHttpDate @httpMalformedRequestTests([
{
- id: "RestJsonQueryTimestampHttpDateRejectsDateTime",
+ id: "RestJsonQueryTimestampHttpDateRejectsDateTime"
documentation: """
- When the format is http-date, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is http-date, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryHttpDate",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryHttpDate"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23%3A20%3A50.52Z",
- "1985-04-12T23%3A20%3A50Z",
- "1996-12-19T16%3A39%3A57-08%3A00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23%3A20%3A50.52Z", "1985-04-12T23%3A20%3A50Z", "1996-12-19T16%3A39%3A57-08%3A00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonQueryTimestampHttpDateRejectsEpochSeconds",
+ id: "RestJsonQueryTimestampHttpDateRejectsEpochSeconds"
documentation: """
- When the format is http-date, epoch second timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is http-date, epoch second timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryHttpDate",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryHttpDate"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1515531081.1234", "1515531081"]
- },
- tags : ["timestamp"]
- },
+ value: ["1515531081.1234", "1515531081"]
+ }
+ tags: ["timestamp"]
+ }
])
apply MalformedTimestampQueryEpoch @httpMalformedRequestTests([
{
- id: "RestJsonQueryTimestampEpochRejectsDateTime",
+ id: "RestJsonQueryTimestampEpochRejectsDateTime"
documentation: """
- When the format is epoch-seconds, RFC3339 timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is epoch-seconds, RFC3339 timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryEpoch",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryEpoch"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["1985-04-12T23%3A20%3A50.52Z",
- "1985-04-12T23%3A20%3A50Z",
- "1996-12-19T16%3A39%3A57-08%3A00"]
- },
- tags : ["timestamp"]
- },
+ value: ["1985-04-12T23%3A20%3A50.52Z", "1985-04-12T23%3A20%3A50Z", "1996-12-19T16%3A39%3A57-08%3A00"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonQueryTimestampEpochRejectsHttpDate",
+ id: "RestJsonQueryTimestampEpochRejectsHttpDate"
documentation: """
- When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a
- 400 SerializationException""",
- protocol: restJson1,
+ When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a
+ 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryEpoch",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryEpoch"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT",
- "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
- },
- tags : ["timestamp"]
- },
+ value: ["Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT"]
+ }
+ tags: ["timestamp"]
+ }
{
- id: "RestJsonQueryTimestampEpochRejectsMalformedValues",
+ id: "RestJsonQueryTimestampEpochRejectsMalformedValues"
documentation: """
- Invalid values for epoch seconds are rejected with a 400 SerializationException""",
- protocol: restJson1,
+ Invalid values for epoch seconds are rejected with a 400 SerializationException"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedTimestampQueryEpoch",
- queryParams: [
- "timestamp=$value:L"
- ]
- },
+ method: "POST"
+ uri: "/MalformedTimestampQueryEpoch"
+ queryParams: ["timestamp=$value:L"]
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
- },
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
+ }
testParameters: {
- "value" : ["true", "1515531081ABC", "0x42", "1515531081.123.456",
- "Infinity", "-Infinity", "NaN"]
- },
- tags : ["timestamp"]
- },
+ value: ["true", "1515531081ABC", "0x42", "1515531081.123.456", "Infinity", "-Infinity", "NaN"]
+ }
+ tags: ["timestamp"]
+ }
])
structure MalformedTimestampQueryDefaultInput {
@httpQuery("timestamp")
@required
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampQueryHttpDateInput {
@httpQuery("timestamp")
@required
@timestampFormat("http-date")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
structure MalformedTimestampQueryEpochInput {
@httpQuery("timestamp")
@required
@timestampFormat("epoch-seconds")
- timestamp: Timestamp,
+ timestamp: Timestamp
}
-
diff --git a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-union.smithy b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-union.smithy
index cd0ca8cd477..56e2e0dfa33 100644
--- a/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-union.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-union.smithy
@@ -13,95 +13,79 @@ operation MalformedUnion {
apply MalformedUnion @httpMalformedRequestTests([
{
- id: "RestJsonMalformedUnionMultipleFieldsSet",
+ id: "RestJsonMalformedUnionMultipleFieldsSet"
documentation: """
When the union has multiple fields set, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUnion",
+ method: "POST"
+ uri: "/MalformedUnion"
body: """
- { "union" : { "int": 2, "string": "three" } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : { "int": 2, "string": "three" } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
{
- id: "RestJsonMalformedUnionKnownAndUnknownFieldsSet",
+ id: "RestJsonMalformedUnionKnownAndUnknownFieldsSet"
documentation: """
When the union has multiple fields set, even when only one is modeled,
- the response should be a 400 SerializationException.""",
- protocol: restJson1,
+ the response should be a 400 SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUnion",
+ method: "POST"
+ uri: "/MalformedUnion"
body: """
- { "union" : { "int": 2, "unknownField": "three" } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : { "int": 2, "unknownField": "three" } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
{
- id: "RestJsonMalformedUnionNoFieldsSet",
+ id: "RestJsonMalformedUnionNoFieldsSet"
documentation: """
When the union has no fields set, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUnion",
+ method: "POST"
+ uri: "/MalformedUnion"
body: """
- { "union" : { "int": null } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : { "int": null } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
- },
+ }
{
- id: "RestJsonMalformedUnionValueIsArray",
+ id: "RestJsonMalformedUnionValueIsArray"
documentation: """
When the union value is actually an array, the response should be a 400
- SerializationException.""",
- protocol: restJson1,
+ SerializationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUnion",
+ method: "POST"
+ uri: "/MalformedUnion"
body: """
- { "union" : ["int"] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : ["int"] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ code: 400
+ headers: { "x-amzn-errortype": "SerializationException" }
}
}
{
- id: "RestJsonMalformedUnionUnknownMember",
+ id: "RestJsonMalformedUnionUnknownMember"
documentation: """
When an unknown union member is received, the response should be a 400
SerializationException."""
@@ -114,16 +98,12 @@ apply MalformedUnion @httpMalformedRequestTests([
"union": {
"unknown": "hello"
}
- }""",
- headers: {
- "content-type": "application/json"
- }
+ }"""
+ headers: { "content-type": "application/json" }
}
response: {
code: 400
- headers: {
- "x-amzn-errortype": "SerializationException"
- }
+ headers: { "x-amzn-errortype": "SerializationException" }
}
}
])
@@ -133,7 +113,6 @@ structure MalformedUnionInput {
}
union SimpleUnion {
- int: Integer,
-
+ int: Integer
string: String
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/other-namespace.smithy b/smithy-aws-protocol-tests/model/restJson1/other-namespace.smithy
index df8ec047d12..0f850f1bcee 100644
--- a/smithy-aws-protocol-tests/model/restJson1/other-namespace.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/other-namespace.smithy
@@ -5,5 +5,5 @@ namespace aws.protocoltests.restjson.nested
// Note that this conflicts with the shared-types GreetingStruct
// and needs to be renamed if used as part of a service closure.
structure GreetingStruct {
- salutation: String,
+ salutation: String
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/requestCompression.smithy b/smithy-aws-protocol-tests/model/restJson1/requestCompression.smithy
index d4e73da62d6..3ac554dbaf2 100644
--- a/smithy-aws-protocol-tests/model/restJson1/requestCompression.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/requestCompression.smithy
@@ -4,7 +4,6 @@ namespace aws.protocoltests.restjson
use aws.protocols#restJson1
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
@@ -12,296 +11,289 @@ apply PutWithContentEncoding @httpRequestTests([
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: restJson1
params: {
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXm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9uo98HhjQAI1Dt91cgjJOwygNmLoZE
+ X5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/requestcompression/putcontentwithencoding"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_restJson1"
documentation: """
- Compression algorithm encoding is appended to the Content-Encoding header, and the
- user-provided content-encoding is in the Content-Encoding header before the
- request compression encoding from the HTTP binding.
- """
+ Compression algorithm encoding is appended to the Content-Encoding header, and the
+ user-provided content-encoding is in the Content-Encoding header before the
+ request compression encoding from the HTTP binding.
+ """
protocol: restJson1
params: {
- "encoding": "custom"
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiV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163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn
+ OdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/requestcompression/putcontentwithencoding"
- headers: {
- "Content-Encoding": "custom, gzip"
- }
+ headers: { "Content-Encoding": "custom, gzip" }
}
])
-@http(
- method: "POST"
- uri: "/requestcompression/putcontentwithencoding"
-)
+@http(method: "POST", uri: "/requestcompression/putcontentwithencoding")
@requestCompression(
encodings: ["gzip"]
)
diff --git a/smithy-aws-protocol-tests/model/restJson1/services/apigateway.smithy b/smithy-aws-protocol-tests/model/restJson1/services/apigateway.smithy
index c8bb75ddf6e..c63fd236599 100644
--- a/smithy-aws-protocol-tests/model/restJson1/services/apigateway.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/services/apigateway.smithy
@@ -8,132 +8,119 @@ use aws.protocols#restJson1
use smithy.test#httpRequestTests
@service(
- sdkId: "API Gateway",
- arnNamespace: "apigateway",
- cloudFormationName: "ApiGateway",
- cloudTrailEventSource: "apigateway.amazonaws.com",
+ sdkId: "API Gateway"
+ arnNamespace: "apigateway"
+ cloudFormationName: "ApiGateway"
+ cloudTrailEventSource: "apigateway.amazonaws.com"
endpointPrefix: "apigateway"
)
-@sigv4(
- name: "apigateway",
-)
+@sigv4(name: "apigateway")
@restJson1
@title("Amazon API Gateway")
service BackplaneControlService {
- version: "2015-07-09",
+ version: "2015-07-09"
operations: [
- GetRestApis,
- ],
+ GetRestApis
+ ]
}
-
@httpRequestTests([
{
- id: "ApiGatewayAccept",
- documentation: "API Gateway requires that this Accept header is set on all requests.",
- protocol: restJson1,
- method: "GET",
- uri: "/restapis",
- headers: {
- "Accept": "application/json",
- },
- body: "",
- params: {},
+ id: "ApiGatewayAccept"
+ documentation: "API Gateway requires that this Accept header is set on all requests."
+ protocol: restJson1
+ method: "GET"
+ uri: "/restapis"
+ headers: { Accept: "application/json" }
+ body: ""
+ params: {}
}
])
-@http(
- method: "GET",
- uri: "/restapis",
- code: 200,
-)
-@paginated(
- inputToken: "position",
- outputToken: "position",
- items: "items",
- pageSize: "limit",
-)
+@http(method: "GET", uri: "/restapis", code: 200)
+@paginated(inputToken: "position", outputToken: "position", items: "items", pageSize: "limit")
@readonly
operation GetRestApis {
- input: GetRestApisRequest,
- output: RestApis,
+ input: GetRestApisRequest
+ output: RestApis
errors: [
- BadRequestException,
- TooManyRequestsException,
- UnauthorizedException,
- ],
+ BadRequestException
+ TooManyRequestsException
+ UnauthorizedException
+ ]
}
@error("client")
@httpError(400)
structure BadRequestException {
- message: String,
+ message: String
}
structure EndpointConfiguration {
- types: ListOfEndpointType,
- vpcEndpointIds: ListOfString,
+ types: ListOfEndpointType
+ vpcEndpointIds: ListOfString
}
structure GetRestApisRequest {
@httpQuery("position")
- position: String,
+ position: String
@httpQuery("limit")
- limit: NullableInteger,
+ limit: NullableInteger
}
structure RestApi {
- id: String,
- name: String,
- description: String,
- createdDate: Timestamp,
- version: String,
- warnings: ListOfString,
- binaryMediaTypes: ListOfString,
- minimumCompressionSize: NullableInteger,
- apiKeySource: ApiKeySourceType,
- endpointConfiguration: EndpointConfiguration,
- policy: String,
- tags: MapOfStringToString,
- disableExecuteApiEndpoint: Boolean,
+ id: String
+ name: String
+ description: String
+ createdDate: Timestamp
+ version: String
+ warnings: ListOfString
+ binaryMediaTypes: ListOfString
+ minimumCompressionSize: NullableInteger
+ apiKeySource: ApiKeySourceType
+ endpointConfiguration: EndpointConfiguration
+ policy: String
+ tags: MapOfStringToString
+ disableExecuteApiEndpoint: Boolean
}
structure RestApis {
@jsonName("item")
- items: ListOfRestApi,
+ items: ListOfRestApi
- position: String,
+ position: String
}
@error("client")
@httpError(429)
structure TooManyRequestsException {
@httpHeader("Retry-After")
- retryAfterSeconds: String,
- message: String,
+ retryAfterSeconds: String
+
+ message: String
}
@error("client")
@httpError(401)
structure UnauthorizedException {
- message: String,
+ message: String
}
list ListOfEndpointType {
- member: EndpointType,
+ member: EndpointType
}
list ListOfString {
- member: String,
+ member: String
}
list ListOfRestApi {
- member: RestApi,
+ member: RestApi
}
map MapOfStringToString {
- key: String,
- value: String,
+ key: String
+ value: String
}
enum ApiKeySourceType {
diff --git a/smithy-aws-protocol-tests/model/restJson1/services/glacier.smithy b/smithy-aws-protocol-tests/model/restJson1/services/glacier.smithy
index 67659bdfeae..3dc4e9144f6 100644
--- a/smithy-aws-protocol-tests/model/restJson1/services/glacier.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/services/glacier.smithy
@@ -1,9 +1,11 @@
$version: "2.0"
-metadata suppressions = [{
- id: "HttpMethodSemantics",
- namespace: "com.amazonaws.glacier",
-}]
+metadata suppressions = [
+ {
+ id: "HttpMethodSemantics"
+ namespace: "com.amazonaws.glacier"
+ }
+]
namespace com.amazonaws.glacier
@@ -13,224 +15,196 @@ use aws.protocols#restJson1
use smithy.test#httpRequestTests
@service(
- sdkId: "Glacier",
- arnNamespace: "glacier",
- cloudFormationName: "Glacier",
- cloudTrailEventSource: "glacier.amazonaws.com",
- endpointPrefix: "glacier",
-)
-@sigv4(
- name: "glacier",
+ sdkId: "Glacier"
+ arnNamespace: "glacier"
+ cloudFormationName: "Glacier"
+ cloudTrailEventSource: "glacier.amazonaws.com"
+ endpointPrefix: "glacier"
)
+@sigv4(name: "glacier")
@restJson1
@title("Amazon Glacier")
-@xmlNamespace(
- uri: "http://glacier.amazonaws.com/doc/2012-06-01/",
-)
+@xmlNamespace(uri: "http://glacier.amazonaws.com/doc/2012-06-01/")
service Glacier {
- version: "2012-06-01",
+ version: "2012-06-01"
operations: [
- UploadArchive,
- UploadMultipartPart,
- ],
+ UploadArchive
+ UploadMultipartPart
+ ]
}
@httpRequestTests([
{
- id: "GlacierVersionHeader",
- documentation: "Glacier requires that a version header be set on all requests.",
- protocol: restJson1,
- method: "POST",
- uri: "/foo/vaults/bar/archives",
- headers: {
- "X-Amz-Glacier-Version": "2012-06-01",
- },
- body: "",
- params: {
- accountId: "foo",
- vaultName: "bar",
- },
- },
+ id: "GlacierVersionHeader"
+ documentation: "Glacier requires that a version header be set on all requests."
+ protocol: restJson1
+ method: "POST"
+ uri: "/foo/vaults/bar/archives"
+ headers: { "X-Amz-Glacier-Version": "2012-06-01" }
+ body: ""
+ params: { accountId: "foo", vaultName: "bar" }
+ }
{
- id: "GlacierChecksums",
- documentation: "Glacier requires checksum headers that are cumbersome to provide.",
- protocol: restJson1,
- method: "POST",
- uri: "/foo/vaults/bar/archives",
- headers: {
- "X-Amz-Glacier-Version": "2012-06-01",
- "X-Amz-Content-Sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "X-Amz-Sha256-Tree-Hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- },
- body: "hello world",
- params: {
- accountId: "foo",
- vaultName: "bar",
- body: "hello world"
- },
- appliesTo: "client",
- },
+ id: "GlacierChecksums"
+ documentation: "Glacier requires checksum headers that are cumbersome to provide."
+ protocol: restJson1
+ method: "POST"
+ uri: "/foo/vaults/bar/archives"
+ headers: { "X-Amz-Glacier-Version": "2012-06-01", "X-Amz-Content-Sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", "X-Amz-Sha256-Tree-Hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" }
+ body: "hello world"
+ params: { accountId: "foo", vaultName: "bar", body: "hello world" }
+ appliesTo: "client"
+ }
{
- id: "GlacierAccountId",
+ id: "GlacierAccountId"
documentation: """
Glacier requires that the account id be set, but you can just use a
hyphen (-) to indicate the current account. This should be default
- behavior if the customer provides a null or empty string.""",
- protocol: restJson1,
- method: "POST",
- uri: "/-/vaults/bar/archives",
- headers: {
- "X-Amz-Glacier-Version": "2012-06-01",
- },
- body: "",
- params: {
- accountId: "",
- vaultName: "bar",
- },
- appliesTo: "client",
+ behavior if the customer provides a null or empty string."""
+ protocol: restJson1
+ method: "POST"
+ uri: "/-/vaults/bar/archives"
+ headers: { "X-Amz-Glacier-Version": "2012-06-01" }
+ body: ""
+ params: { accountId: "", vaultName: "bar" }
+ appliesTo: "client"
}
])
-@http(
- method: "POST",
- uri: "/{accountId}/vaults/{vaultName}/archives",
- code: 201,
-)
+@http(method: "POST", uri: "/{accountId}/vaults/{vaultName}/archives", code: 201)
operation UploadArchive {
- input: UploadArchiveInput,
- output: ArchiveCreationOutput,
+ input: UploadArchiveInput
+ output: ArchiveCreationOutput
errors: [
- InvalidParameterValueException,
- MissingParameterValueException,
- RequestTimeoutException,
- ResourceNotFoundException,
- ServiceUnavailableException,
- ],
+ InvalidParameterValueException
+ MissingParameterValueException
+ RequestTimeoutException
+ ResourceNotFoundException
+ ServiceUnavailableException
+ ]
}
@httpRequestTests([
{
- id: "GlacierMultipartChecksums",
- documentation: "Glacier requires checksum headers that are cumbersome to provide.",
- protocol: restJson1,
- method: "PUT",
- uri: "/foo/vaults/bar/multipart-uploads/baz",
- headers: {
- "X-Amz-Glacier-Version": "2012-06-01",
- "X-Amz-Content-Sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "X-Amz-Sha256-Tree-Hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- },
- body: "hello world",
- params: {
- accountId: "foo",
- vaultName: "bar",
- uploadId: "baz",
- body: "hello world"
- },
- appliesTo: "client",
+ id: "GlacierMultipartChecksums"
+ documentation: "Glacier requires checksum headers that are cumbersome to provide."
+ protocol: restJson1
+ method: "PUT"
+ uri: "/foo/vaults/bar/multipart-uploads/baz"
+ headers: { "X-Amz-Glacier-Version": "2012-06-01", "X-Amz-Content-Sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", "X-Amz-Sha256-Tree-Hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" }
+ body: "hello world"
+ params: { accountId: "foo", vaultName: "bar", uploadId: "baz", body: "hello world" }
+ appliesTo: "client"
}
])
-@http(
- method: "PUT",
- uri: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
- code: 204,
-)
+@http(method: "PUT", uri: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}", code: 204)
operation UploadMultipartPart {
- input: UploadMultipartPartInput,
- output: UploadMultipartPartOutput,
+ input: UploadMultipartPartInput
+ output: UploadMultipartPartOutput
errors: [
- InvalidParameterValueException,
- MissingParameterValueException,
- RequestTimeoutException,
- ResourceNotFoundException,
- ServiceUnavailableException,
- ],
+ InvalidParameterValueException
+ MissingParameterValueException
+ RequestTimeoutException
+ ResourceNotFoundException
+ ServiceUnavailableException
+ ]
}
structure ArchiveCreationOutput {
@httpHeader("Location")
- location: string,
+ location: string
+
@httpHeader("x-amz-sha256-tree-hash")
- checksum: string,
+ checksum: string
+
@httpHeader("x-amz-archive-id")
- archiveId: string,
+ archiveId: string
}
@error("client")
@httpError(400)
structure InvalidParameterValueException {
- type: string,
- code: string,
- message: string,
+ type: string
+ code: string
+ message: string
}
@error("client")
@httpError(400)
structure MissingParameterValueException {
- type: string,
- code: string,
- message: string,
+ type: string
+ code: string
+ message: string
}
@error("client")
@httpError(408)
structure RequestTimeoutException {
- type: string,
- code: string,
- message: string,
+ type: string
+ code: string
+ message: string
}
@error("client")
@httpError(404)
structure ResourceNotFoundException {
- type: string,
- code: string,
- message: string,
+ type: string
+ code: string
+ message: string
}
@error("server")
@httpError(500)
structure ServiceUnavailableException {
- type: string,
- code: string,
- message: string,
+ type: string
+ code: string
+ message: string
}
structure UploadArchiveInput {
@httpLabel
@required
- vaultName: string,
+ vaultName: string
+
@httpLabel
@required
- accountId: string,
+ accountId: string
+
@httpHeader("x-amz-archive-description")
- archiveDescription: string,
+ archiveDescription: string
+
@httpHeader("x-amz-sha256-tree-hash")
- checksum: string,
+ checksum: string
+
@httpPayload
- body: Stream = "",
+ body: Stream = ""
}
structure UploadMultipartPartInput {
@httpLabel
@required
- accountId: string,
+ accountId: string
+
@httpLabel
@required
- vaultName: string,
+ vaultName: string
+
@httpLabel
@required
- uploadId: string,
+ uploadId: string
+
@httpHeader("x-amz-sha256-tree-hash")
- checksum: string,
+ checksum: string
+
@httpHeader("Content-Range")
- range: string,
+ range: string
+
@httpPayload
- body: Stream = "",
+ body: Stream = ""
}
structure UploadMultipartPartOutput {
@httpHeader("x-amz-sha256-tree-hash")
- checksum: string,
+ checksum: string
}
@streaming
diff --git a/smithy-aws-protocol-tests/model/restJson1/streaming.smithy b/smithy-aws-protocol-tests/model/restJson1/streaming.smithy
index d2d9c8bbeac..7493e0c2ebf 100644
--- a/smithy-aws-protocol-tests/model/restJson1/streaming.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/streaming.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP streaming bindings.
// See: https://smithy.io/2.0/spec/streaming.html
-
$version: "2.0"
namespace aws.protocoltests.restjson
@@ -15,84 +14,64 @@ use smithy.test#httpResponseTests
/// not a structure or a union type.
@http(uri: "/StreamingTraits", method: "POST")
operation StreamingTraits {
- input: StreamingTraitsInputOutput,
+ input: StreamingTraitsInputOutput
output: StreamingTraitsInputOutput
}
apply StreamingTraits @httpRequestTests([
{
- id: "RestJsonStreamingTraitsWithBlob",
- documentation: "Serializes a blob in the HTTP payload",
- protocol: restJson1,
- method: "POST",
- uri: "/StreamingTraits",
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "application/octet-stream"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "RestJsonStreamingTraitsWithBlob"
+ documentation: "Serializes a blob in the HTTP payload"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StreamingTraits"
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "application/octet-stream" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "RestJsonStreamingTraitsWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restJson1,
- method: "POST",
- uri: "/StreamingTraits",
- body: "",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
- },
+ id: "RestJsonStreamingTraitsWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StreamingTraits"
+ body: ""
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
+ }
])
apply StreamingTraits @httpResponseTests([
{
- id: "RestJsonStreamingTraitsWithBlob",
- documentation: "Serializes a blob in the HTTP payload",
- protocol: restJson1,
- code: 200,
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "application/octet-stream"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "RestJsonStreamingTraitsWithBlob"
+ documentation: "Serializes a blob in the HTTP payload"
+ protocol: restJson1
+ code: 200
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "application/octet-stream" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "RestJsonStreamingTraitsWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restJson1,
- code: 200,
- body: "",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
+ id: "RestJsonStreamingTraitsWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restJson1
+ code: 200
+ body: ""
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
}
])
structure StreamingTraitsInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
- blob: StreamingBlob = "",
+ blob: StreamingBlob = ""
}
@streaming
@@ -110,49 +89,37 @@ operation StreamingTraitsRequireLength {
apply StreamingTraitsRequireLength @httpRequestTests([
{
- id: "RestJsonStreamingTraitsRequireLengthWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a required length",
- protocol: restJson1,
- method: "POST",
- uri: "/StreamingTraitsRequireLength",
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "application/octet-stream"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "RestJsonStreamingTraitsRequireLengthWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a required length"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StreamingTraitsRequireLength"
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "application/octet-stream" }
+ requireHeaders: ["Content-Length"]
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "RestJsonStreamingTraitsRequireLengthWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restJson1,
- method: "POST",
- uri: "/StreamingTraitsRequireLength",
- body: "",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
- },
+ id: "RestJsonStreamingTraitsRequireLengthWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StreamingTraitsRequireLength"
+ body: ""
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
+ }
])
@input
structure StreamingTraitsRequireLengthInput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
- blob: FiniteStreamingBlob = "",
+ blob: FiniteStreamingBlob = ""
}
@streaming
@@ -165,52 +132,40 @@ blob FiniteStreamingBlob
/// content-type to be serialized.
@http(uri: "/StreamingTraitsWithMediaType", method: "POST")
operation StreamingTraitsWithMediaType {
- input: StreamingTraitsWithMediaTypeInputOutput,
+ input: StreamingTraitsWithMediaTypeInputOutput
output: StreamingTraitsWithMediaTypeInputOutput
}
apply StreamingTraitsWithMediaType @httpRequestTests([
{
- id: "RestJsonStreamingTraitsWithMediaTypeWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a content-type",
- protocol: restJson1,
- method: "POST",
- uri: "/StreamingTraitsWithMediaType",
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "text/plain"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
+ id: "RestJsonStreamingTraitsWithMediaTypeWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a content-type"
+ protocol: restJson1
+ method: "POST"
+ uri: "/StreamingTraitsWithMediaType"
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "text/plain" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
}
])
apply StreamingTraitsWithMediaType @httpResponseTests([
{
- id: "RestJsonStreamingTraitsWithMediaTypeWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a content-type",
- protocol: restJson1,
- code: 200,
- body: "blobby blob blob",
- bodyMediaType: "application/octet-stream",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "text/plain"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
+ id: "RestJsonStreamingTraitsWithMediaTypeWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a content-type"
+ protocol: restJson1
+ code: 200
+ body: "blobby blob blob"
+ bodyMediaType: "application/octet-stream"
+ headers: { "X-Foo": "Foo", "Content-Type": "text/plain" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
}
])
structure StreamingTraitsWithMediaTypeInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
blob: StreamingTextPlainBlob = ""
diff --git a/smithy-aws-protocol-tests/model/restJson1/unions.smithy b/smithy-aws-protocol-tests/model/restJson1/unions.smithy
index cfbaba466f5..0af60ebd141 100644
--- a/smithy-aws-protocol-tests/model/restJson1/unions.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/unions.smithy
@@ -1,24 +1,22 @@
// This file defines test cases that serialize unions.
-
$version: "2.0"
namespace aws.protocoltests.restjson
use aws.protocols#restJson1
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
+use aws.protocoltests.shared#FooEnum
+use aws.protocoltests.shared#GreetingStruct
use aws.protocoltests.shared#StringList
use aws.protocoltests.shared#StringMap
-use aws.protocoltests.shared#GreetingStruct
-use aws.protocoltests.shared#FooEnum
-
+use smithy.test#httpRequestTests
+use smithy.test#httpResponseTests
/// This operation uses unions for inputs and outputs.
@idempotent
@http(uri: "/JsonUnions", method: "PUT")
operation JsonUnions {
- input: UnionInputOutput,
- output: UnionInputOutput,
+ input: UnionInputOutput
+ output: UnionInputOutput
}
/// A shared structure that contains a single union member.
@@ -28,168 +26,164 @@ structure UnionInputOutput {
/// A union with a representative set of types for members.
union MyUnion {
- stringValue: String,
- booleanValue: Boolean,
- numberValue: Integer,
- blobValue: Blob,
- timestampValue: Timestamp,
- enumValue: FooEnum,
- listValue: StringList,
- mapValue: StringMap,
- structureValue: GreetingStruct,
+ stringValue: String
+
+ booleanValue: Boolean
+
+ numberValue: Integer
+
+ blobValue: Blob
+
+ timestampValue: Timestamp
+
+ enumValue: FooEnum
+
+ listValue: StringList
+
+ mapValue: StringMap
+
+ structureValue: GreetingStruct
// Note that this uses a conflicting structure name with
// GreetingStruct, so it must be renamed in the service.
- renamedStructureValue: aws.protocoltests.restjson.nested#GreetingStruct,
+ renamedStructureValue: aws.protocoltests.restjson.nested#GreetingStruct
}
apply JsonUnions @httpRequestTests([
{
- id: "RestJsonSerializeStringUnionValue",
- documentation: "Serializes a string union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeStringUnionValue"
+ documentation: "Serializes a string union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"stringValue": "foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- stringValue: "foo"
- }
+ contents: { stringValue: "foo" }
}
- },
+ }
{
- id: "RestJsonSerializeBooleanUnionValue",
- documentation: "Serializes a boolean union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeBooleanUnionValue"
+ documentation: "Serializes a boolean union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"booleanValue": true
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- booleanValue: true
- }
+ contents: { booleanValue: true }
}
- },
+ }
{
- id: "RestJsonSerializeNumberUnionValue",
- documentation: "Serializes a number union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeNumberUnionValue"
+ documentation: "Serializes a number union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"numberValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- numberValue: 1
- }
+ contents: { numberValue: 1 }
}
- },
+ }
{
- id: "RestJsonSerializeBlobUnionValue",
- documentation: "Serializes a blob union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeBlobUnionValue"
+ documentation: "Serializes a blob union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"blobValue": "Zm9v"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- blobValue: "foo"
- }
+ contents: { blobValue: "foo" }
}
- },
+ }
{
- id: "RestJsonSerializeTimestampUnionValue",
- documentation: "Serializes a timestamp union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeTimestampUnionValue"
+ documentation: "Serializes a timestamp union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"timestampValue": 1398796238
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- timestampValue: 1398796238
- }
+ contents: { timestampValue: 1398796238 }
}
- },
+ }
{
- id: "RestJsonSerializeEnumUnionValue",
- documentation: "Serializes an enum union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeEnumUnionValue"
+ documentation: "Serializes an enum union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"enumValue": "Foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- enumValue: "Foo"
- }
+ contents: { enumValue: "Foo" }
}
- },
+ }
{
- id: "RestJsonSerializeListUnionValue",
- documentation: "Serializes a list union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeListUnionValue"
+ documentation: "Serializes a list union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
"listValue": ["foo", "bar"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
listValue: ["foo", "bar"]
}
}
- },
+ }
{
- id: "RestJsonSerializeMapUnionValue",
- documentation: "Serializes a map union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeMapUnionValue"
+ documentation: "Serializes a map union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
@@ -198,24 +192,21 @@ apply JsonUnions @httpRequestTests([
"spam": "eggs"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
- mapValue: {
- foo: "bar",
- spam: "eggs",
- }
+ mapValue: { foo: "bar", spam: "eggs" }
}
}
- },
+ }
{
- id: "RestJsonSerializeStructureUnionValue",
- documentation: "Serializes a structure union value",
- protocol: restJson1,
- method: "PUT",
- "uri": "/JsonUnions",
+ id: "RestJsonSerializeStructureUnionValue"
+ documentation: "Serializes a structure union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
@@ -223,23 +214,21 @@ apply JsonUnions @httpRequestTests([
"hi": "hello"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
- structureValue: {
- hi: "hello",
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
{
- id: "RestJsonSerializeRenamedStructureUnionValue",
- documentation: "Serializes a renamed structure union value",
- protocol: restJson1,
- method: "PUT",
- uri: "/JsonUnions",
+ id: "RestJsonSerializeRenamedStructureUnionValue"
+ documentation: "Serializes a renamed structure union value"
+ protocol: restJson1
+ method: "PUT"
+ uri: "/JsonUnions"
body: """
{
"contents": {
@@ -247,158 +236,144 @@ apply JsonUnions @httpRequestTests([
"salutation": "hello!"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
- renamedStructureValue: {
- salutation: "hello!",
- }
+ renamedStructureValue: { salutation: "hello!" }
}
}
- },
+ }
])
apply JsonUnions @httpResponseTests([
{
- id: "RestJsonDeserializeStringUnionValue",
- documentation: "Deserializes a string union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeStringUnionValue"
+ documentation: "Deserializes a string union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"stringValue": "foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- stringValue: "foo"
- }
+ contents: { stringValue: "foo" }
}
- },
+ }
{
- id: "RestJsonDeserializeBooleanUnionValue",
- documentation: "Deserializes a boolean union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeBooleanUnionValue"
+ documentation: "Deserializes a boolean union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"booleanValue": true
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- booleanValue: true
- }
+ contents: { booleanValue: true }
}
- },
+ }
{
- id: "RestJsonDeserializeNumberUnionValue",
- documentation: "Deserializes a number union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeNumberUnionValue"
+ documentation: "Deserializes a number union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"numberValue": 1
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- numberValue: 1
- }
+ contents: { numberValue: 1 }
}
- },
+ }
{
- id: "RestJsonDeserializeBlobUnionValue",
- documentation: "Deserializes a blob union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeBlobUnionValue"
+ documentation: "Deserializes a blob union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"blobValue": "Zm9v"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- blobValue: "foo"
- }
+ contents: { blobValue: "foo" }
}
- },
+ }
{
- id: "RestJsonDeserializeTimestampUnionValue",
- documentation: "Deserializes a timestamp union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeTimestampUnionValue"
+ documentation: "Deserializes a timestamp union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"timestampValue": 1398796238
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- timestampValue: 1398796238
- }
+ contents: { timestampValue: 1398796238 }
}
- },
+ }
{
- id: "RestJsonDeserializeEnumUnionValue",
- documentation: "Deserializes an enum union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeEnumUnionValue"
+ documentation: "Deserializes an enum union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"enumValue": "Foo"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- contents: {
- enumValue: "Foo"
- }
+ contents: { enumValue: "Foo" }
}
- },
+ }
{
- id: "RestJsonDeserializeListUnionValue",
- documentation: "Deserializes a list union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeListUnionValue"
+ documentation: "Deserializes a list union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
"listValue": ["foo", "bar"]
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
listValue: ["foo", "bar"]
}
}
- },
+ }
{
- id: "RestJsonDeserializeMapUnionValue",
- documentation: "Deserializes a map union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeMapUnionValue"
+ documentation: "Deserializes a map union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
@@ -407,23 +382,20 @@ apply JsonUnions @httpResponseTests([
"spam": "eggs"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
- mapValue: {
- foo: "bar",
- spam: "eggs",
- }
+ mapValue: { foo: "bar", spam: "eggs" }
}
}
- },
+ }
{
- id: "RestJsonDeserializeStructureUnionValue",
- documentation: "Deserializes a structure union value",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonDeserializeStructureUnionValue"
+ documentation: "Deserializes a structure union value"
+ protocol: restJson1
+ code: 200
body: """
{
"contents": {
@@ -431,17 +403,15 @@ apply JsonUnions @httpResponseTests([
"hi": "hello"
}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
- structureValue: {
- hi: "hello",
- }
+ structureValue: { hi: "hello" }
}
}
- },
+ }
{
id: "RestJsonDeserializeIgnoreType"
appliesTo: "client"
@@ -458,24 +428,19 @@ apply JsonUnions @httpResponseTests([
}
}"""
bodyMediaType: "application/json"
- headers: {
- "Content-Type": "application/json"
- }
+ headers: { "Content-Type": "application/json" }
params: {
contents: {
- structureValue: {
- hi: "hello"
- }
+ structureValue: { hi: "hello" }
}
}
}
])
-
/// This operation defines a union with a Unit member.
@http(uri: "/PostPlayerAction", method: "POST")
operation PostPlayerAction {
- input: PostPlayerActionInput,
+ input: PostPlayerActionInput
output: PostPlayerActionOutput
}
@@ -497,19 +462,19 @@ union PlayerAction {
apply PostPlayerAction @httpRequestTests([
{
- id: "RestJsonInputUnionWithUnitMember",
- documentation: "Unit types in unions are serialized like normal structures in requests.",
- protocol: restJson1,
- method: "POST",
- uri: "/PostPlayerAction",
+ id: "RestJsonInputUnionWithUnitMember"
+ documentation: "Unit types in unions are serialized like normal structures in requests."
+ protocol: restJson1
+ method: "POST"
+ uri: "/PostPlayerAction"
body: """
{
"action": {
"quit": {}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
action: {
quit: {}
@@ -520,18 +485,18 @@ apply PostPlayerAction @httpRequestTests([
apply PostPlayerAction @httpResponseTests([
{
- id: "RestJsonOutputUnionWithUnitMember",
- documentation: "Unit types in unions are serialized like normal structures in responses.",
- protocol: restJson1,
- code: 200,
+ id: "RestJsonOutputUnionWithUnitMember"
+ documentation: "Unit types in unions are serialized like normal structures in responses."
+ protocol: restJson1
+ code: 200
body: """
{
"action": {
"quit": {}
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
action: {
quit: {}
@@ -540,11 +505,10 @@ apply PostPlayerAction @httpResponseTests([
}
])
-
/// This operation defines a union that uses jsonName on some members.
@http(uri: "/PostUnionWithJsonName", method: "POST")
operation PostUnionWithJsonName {
- input: PostUnionWithJsonNameInput,
+ input: PostUnionWithJsonNameInput
output: PostUnionWithJsonNameOutput
}
@@ -561,9 +525,9 @@ structure PostUnionWithJsonNameOutput {
union UnionWithJsonName {
@jsonName("FOO")
- foo: String,
+ foo: String
- bar: String,
+ bar: String
@jsonName("_baz")
baz: String
@@ -571,123 +535,111 @@ union UnionWithJsonName {
apply PostUnionWithJsonName @httpRequestTests([
{
- id: "PostUnionWithJsonNameRequest1",
- documentation: "Tests that jsonName works with union members.",
- protocol: restJson1,
- method: "POST",
- uri: "/PostUnionWithJsonName",
+ id: "PostUnionWithJsonNameRequest1"
+ documentation: "Tests that jsonName works with union members."
+ protocol: restJson1
+ method: "POST"
+ uri: "/PostUnionWithJsonName"
body: """
{
"value": {
"FOO": "hi"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- value: {
- foo: "hi"
- }
+ value: { foo: "hi" }
}
- },
+ }
{
- id: "PostUnionWithJsonNameRequest2",
- documentation: "Tests that jsonName works with union members.",
- protocol: restJson1,
- method: "POST",
- uri: "/PostUnionWithJsonName",
+ id: "PostUnionWithJsonNameRequest2"
+ documentation: "Tests that jsonName works with union members."
+ protocol: restJson1
+ method: "POST"
+ uri: "/PostUnionWithJsonName"
body: """
{
"value": {
"_baz": "hi"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- value: {
- baz: "hi"
- }
+ value: { baz: "hi" }
}
- },
+ }
{
- id: "PostUnionWithJsonNameRequest3",
- documentation: "Tests that jsonName works with union members.",
- protocol: restJson1,
- method: "POST",
- uri: "/PostUnionWithJsonName",
+ id: "PostUnionWithJsonNameRequest3"
+ documentation: "Tests that jsonName works with union members."
+ protocol: restJson1
+ method: "POST"
+ uri: "/PostUnionWithJsonName"
body: """
{
"value": {
"bar": "hi"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- value: {
- bar: "hi"
- }
+ value: { bar: "hi" }
}
}
])
apply PostUnionWithJsonName @httpResponseTests([
{
- id: "PostUnionWithJsonNameResponse1",
- documentation: "Tests that jsonName works with union members.",
- protocol: restJson1,
- code: 200,
+ id: "PostUnionWithJsonNameResponse1"
+ documentation: "Tests that jsonName works with union members."
+ protocol: restJson1
+ code: 200
body: """
{
"value": {
"FOO": "hi"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- value: {
- foo: "hi"
- }
+ value: { foo: "hi" }
}
- },
+ }
{
- id: "PostUnionWithJsonNameResponse2",
- documentation: "Tests that jsonName works with union members.",
- protocol: restJson1,
- code: 200,
+ id: "PostUnionWithJsonNameResponse2"
+ documentation: "Tests that jsonName works with union members."
+ protocol: restJson1
+ code: 200
body: """
{
"value": {
"_baz": "hi"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- value: {
- baz: "hi"
- }
+ value: { baz: "hi" }
}
- },
+ }
{
- id: "PostUnionWithJsonNameResponse3",
- documentation: "Tests that jsonName works with union members.",
- protocol: restJson1,
- code: 200,
+ id: "PostUnionWithJsonNameResponse3"
+ documentation: "Tests that jsonName works with union members."
+ protocol: restJson1
+ code: 200
body: """
{
"value": {
"bar": "hi"
}
- }""",
- bodyMediaType: "application/json",
- headers: {"Content-Type": "application/json"},
+ }"""
+ bodyMediaType: "application/json"
+ headers: { "Content-Type": "application/json" }
params: {
- value: {
- bar: "hi"
- }
+ value: { bar: "hi" }
}
}
])
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/main.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/main.smithy
index fc961315c95..3647120a80d 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/main.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/main.smithy
@@ -9,19 +9,19 @@ use aws.protocols#restJson1
@service(sdkId: "Rest Json Validation Protocol")
@restJson1
service RestJsonValidation {
- version: "2021-08-19",
+ version: "2021-08-19"
operations: [
- MalformedEnum,
- MalformedLength,
- MalformedLengthOverride,
- MalformedLengthQueryString,
- MalformedPattern,
- MalformedPatternOverride,
- MalformedRange,
- MalformedRangeOverride,
- MalformedRequired,
- MalformedUniqueItems,
- RecursiveStructures,
+ MalformedEnum
+ MalformedLength
+ MalformedLengthOverride
+ MalformedLengthQueryString
+ MalformedPattern
+ MalformedPatternOverride
+ MalformedRange
+ MalformedRangeOverride
+ MalformedRequired
+ MalformedUniqueItems
+ RecursiveStructures
SensitiveValidation
]
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-enum.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-enum.smithy
index 9a6485ed89a..898c6736822 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-enum.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-enum.smithy
@@ -3,237 +3,212 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/MalformedEnum", method: "POST")
operation MalformedEnum {
- input: MalformedEnumInput,
- errors: [ValidationException]
+ input: MalformedEnumInput
+ errors: [
+ ValidationException
+ ]
}
apply MalformedEnum @httpMalformedRequestTests([
{
- id: "RestJsonMalformedEnumString",
+ id: "RestJsonMalformedEnumString"
documentation: """
- When a string member does not contain a valid enum value,
- the response should be a 400 ValidationException. Internal-only
- enum values are excluded from the response message.""",
- protocol: restJson1,
+ When a string member does not contain a valid enum value,
+ the response should be a 400 ValidationException. Internal-only
+ enum values are excluded from the response message."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedEnum",
+ method: "POST"
+ uri: "/MalformedEnum"
body: """
- { "string" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "string" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
- "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
+ "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/string"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "XYZ"]
}
- },
+ }
{
- id: "RestJsonMalformedEnumTraitString",
+ id: "RestJsonMalformedEnumTraitString"
documentation: """
- When a string member does not contain a valid enum value,
- the response should be a 400 ValidationException. Internal-only
- enum values are excluded from the response message.""",
- protocol: restJson1,
+ When a string member does not contain a valid enum value,
+ the response should be a 400 ValidationException. Internal-only
+ enum values are excluded from the response message."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedEnum",
+ method: "POST"
+ uri: "/MalformedEnum"
body: """
- { "stringWithEnumTrait" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "stringWithEnumTrait" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/stringWithEnumTrait' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
- "fieldList" : [{"message": "Value at '/stringWithEnumTrait' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/stringWithEnumTrait"}]}"""
+ { "message" : "1 validation error detected. Value at '/stringWithEnumTrait' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
+ "fieldList" : [{"message": "Value at '/stringWithEnumTrait' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/stringWithEnumTrait"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "XYZ"]
}
- },
+ }
{
- id: "RestJsonMalformedEnumList",
+ id: "RestJsonMalformedEnumList"
documentation: """
- When a list member value does not contain a valid enum value,
- the response should be a 400 ValidationException. Internal-only
- enum values are excluded from the response message.""",
- protocol: restJson1,
+ When a list member value does not contain a valid enum value,
+ the response should be a 400 ValidationException. Internal-only
+ enum values are excluded from the response message."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedEnum",
+ method: "POST"
+ uri: "/MalformedEnum"
body: """
- { "list" : [$value:S] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "list" : [$value:S] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
- "fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/list/0"}]}"""
+ { "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
+ "fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/list/0"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "XYZ"]
}
- },
+ }
{
- id: "RestJsonMalformedEnumMapKey",
+ id: "RestJsonMalformedEnumMapKey"
documentation: """
- When a map member's key does not contain a valid enum value,
- the response should be a 400 ValidationException. Internal-only
- enum values are excluded from the response message.""",
- protocol: restJson1,
+ When a map member's key does not contain a valid enum value,
+ the response should be a 400 ValidationException. Internal-only
+ enum values are excluded from the response message."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedEnum",
+ method: "POST"
+ uri: "/MalformedEnum"
body: """
- { "map" : { $value:S : "abc" } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : { $value:S : "abc" } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
- "fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/map"}]}"""
+ { "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
+ "fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/map"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "XYZ"]
}
- },
+ }
{
- id: "RestJsonMalformedEnumMapValue",
+ id: "RestJsonMalformedEnumMapValue"
documentation: """
- When a map member's value does not contain a valid enum value,
- the response should be a 400 ValidationException. Internal-only
- enum values are excluded from the response message.""",
- protocol: restJson1,
+ When a map member's value does not contain a valid enum value,
+ the response should be a 400 ValidationException. Internal-only
+ enum values are excluded from the response message."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedEnum",
+ method: "POST"
+ uri: "/MalformedEnum"
body: """
- { "map" : { "abc": $value:S } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : { "abc": $value:S } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
- "fieldList" : [{"message": "Value at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/map/abc"}]}"""
+ { "message" : "1 validation error detected. Value at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
+ "fieldList" : [{"message": "Value at '/map/abc' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/map/abc"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "XYZ"]
}
- },
+ }
{
- id: "RestJsonMalformedEnumUnion",
+ id: "RestJsonMalformedEnumUnion"
documentation: """
- When a union member's value does not contain a valid enum value,
- the response should be a 400 ValidationException. Internal-only
- enum values are excluded from the response message.""",
- protocol: restJson1,
+ When a union member's value does not contain a valid enum value,
+ the response should be a 400 ValidationException. Internal-only
+ enum values are excluded from the response message."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedEnum",
+ method: "POST"
+ uri: "/MalformedEnum"
body: """
- { "union" : { "first": $value:S } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : { "first": $value:S } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
- "fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/union/first"}]}"""
+ { "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]",
+ "fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy enum value set: [abc, def, jkl]", "path": "/union/first"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "XYZ"]
}
- },
+ }
])
structure MalformedEnumInput {
- string: EnumString,
-
- stringWithEnumTrait: EnumTraitString,
-
- list: EnumList,
-
- map: EnumMap,
-
+ string: EnumString
+ stringWithEnumTrait: EnumTraitString
+ list: EnumList
+ map: EnumMap
union: EnumUnion
}
enum EnumString {
ABC = "abc"
+
DEF = "def"
@internal
@@ -245,9 +220,20 @@ enum EnumString {
@suppress(["ModelDeprecation"])
@enum([
- {value: "abc", name: "ABC", tags: ["external"]},
- {value: "def", name: "DEF"},
- {value: "ghi", name: "GHI", tags: ["internal"]},
+ {
+ value: "abc"
+ name: "ABC"
+ tags: ["external"]
+ }
+ {
+ value: "def"
+ name: "DEF"
+ }
+ {
+ value: "ghi"
+ name: "GHI"
+ tags: ["internal"]
+ }
])
string EnumTraitString
@@ -256,11 +242,11 @@ list EnumList {
}
map EnumMap {
- key: EnumString,
+ key: EnumString
value: EnumString
}
union EnumUnion {
- first: EnumString,
+ first: EnumString
second: EnumString
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-length.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-length.smithy
index b9a609dfd23..f818eee5a67 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-length.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-length.smithy
@@ -3,549 +3,495 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/MalformedLength", method: "POST")
operation MalformedLength {
- input: MalformedLengthInput,
- errors: [ValidationException]
+ input: MalformedLengthInput
+ errors: [
+ ValidationException
+ ]
}
@suppress(["UnstableTrait"])
@http(uri: "/MalformedLengthOverride", method: "POST")
operation MalformedLengthOverride {
- input: MalformedLengthOverrideInput,
- errors: [ValidationException]
+ input: MalformedLengthOverrideInput
+ errors: [
+ ValidationException
+ ]
}
@suppress(["UnstableTrait"])
@http(uri: "/MalformedLengthQueryString", method: "POST")
operation MalformedLengthQueryString {
- input: MalformedLengthQueryStringInput,
- errors: [ValidationException]
+ input: MalformedLengthQueryStringInput
+ errors: [
+ ValidationException
+ ]
}
apply MalformedLength @httpMalformedRequestTests([
{
- id: "RestJsonMalformedLengthBlob",
+ id: "RestJsonMalformedLengthBlob"
documentation: """
- When a blob member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a blob member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "blob" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "blob" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/blob"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/blob"}]}"""
}
}
- },
+ }
testParameters: {
- value: ["YQ==", "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo="],
+ value: ["YQ==", "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo="]
inputLength: ["1", "26"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthString",
+ id: "RestJsonMalformedLengthString"
documentation: """
- When a string member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "string" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "string" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
}
}
- },
+ }
testParameters: {
- value: ["a", "abcdefghijklmnopqrstuvwxyz", "👍"],
+ value: ["a", "abcdefghijklmnopqrstuvwxyz", "👍"]
inputLength: ["1", "26", "1"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthMinString",
+ id: "RestJsonMalformedLengthMinString"
documentation: """
- When a string member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "minString" : "a" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minString" : "a" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length 1 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2",
- "fieldList" : [{"message": "Value with length 1 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2", "path": "/minString"}]}"""
+ { "message" : "1 validation error detected. Value with length 1 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2",
+ "fieldList" : [{"message": "Value with length 1 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 2", "path": "/minString"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedLengthMaxString",
+ id: "RestJsonMalformedLengthMaxString"
documentation: """
- When a string member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "maxString" : "abcdefghijklmnopqrstuvwxyz" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxString" : "abcdefghijklmnopqrstuvwxyz" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length 26 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8",
- "fieldList" : [{"message": "Value with length 26 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8", "path": "/maxString"}]}"""
+ { "message" : "1 validation error detected. Value with length 26 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8",
+ "fieldList" : [{"message": "Value with length 26 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 8", "path": "/maxString"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedLengthList",
+ id: "RestJsonMalformedLengthList"
documentation: """
- When a list member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a list member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "list" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "list" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "[\"abc\"]",
- "[\"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\"]"],
+ value: ["[\"abc\"]", "[\"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\"]"]
inputLength: ["1", "10"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthListValue",
+ id: "RestJsonMalformedLengthListValue"
documentation: """
- When a list member's value does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a list member's value does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "list" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "list" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list/0"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/list/0' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/list/0"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "[\"a\", \"abc\"]",
- "[\"abcdefghijklmnopqrstuvwxyz\", \"abc\"]" ],
+ value: ["[\"a\", \"abc\"]", "[\"abcdefghijklmnopqrstuvwxyz\", \"abc\"]"]
inputLength: ["1", "26"]
}
- },
-
+ }
// A valid map has 2-8 keys of length 2-8 that point to lists of length 2-8 with string values of length 2-8
{
- id: "RestJsonMalformedLengthMap",
+ id: "RestJsonMalformedLengthMap"
documentation: """
- When a map member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "map" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "{\"abc\": [\"def\", \"efg\", \"fgh\"]}",
- """
- {"abc": ["abc", "def", "efg"], "bcd": ["abc", "def", "efg"],
- "cde": ["abc", "def", "efg"], "def": ["abc", "def", "efg"],
- "efg": ["abc", "def", "efg"], "fgh": ["abc", "def", "efg"],
- "ghi": ["abc", "def", "efg"], "jkl": ["abc", "def", "efg"],
- "klm": ["abc", "def", "efg"], "lmn": ["abc", "def", "efg"] }"""],
+ value: [
+ "{\"abc\": [\"def\", \"efg\", \"fgh\"]}"
+ """
+ {"abc": ["abc", "def", "efg"], "bcd": ["abc", "def", "efg"],
+ "cde": ["abc", "def", "efg"], "def": ["abc", "def", "efg"],
+ "efg": ["abc", "def", "efg"], "fgh": ["abc", "def", "efg"],
+ "ghi": ["abc", "def", "efg"], "jkl": ["abc", "def", "efg"],
+ "klm": ["abc", "def", "efg"], "lmn": ["abc", "def", "efg"] }"""
+ ]
inputLength: ["1", "10"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthMapKey",
+ id: "RestJsonMalformedLengthMapKey"
documentation: """
- When a map member's key does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member's key does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "map" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "{\"a\": [\"abc\", \"def\", \"efg\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"cde\": [\"abc\", \"def\", \"efg\"]}",
- "{\"abcdefghijklmnopqrstuvwxyz\": [\"abc\", \"def\", \"efg\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"cde\": [\"abc\", \"def\", \"efg\"]}" ],
+ value: ["{\"a\": [\"abc\", \"def\", \"efg\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"cde\": [\"abc\", \"def\", \"efg\"]}", "{\"abcdefghijklmnopqrstuvwxyz\": [\"abc\", \"def\", \"efg\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"cde\": [\"abc\", \"def\", \"efg\"]}"]
inputLength: ["1", "26"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthMapValue",
+ id: "RestJsonMalformedLengthMapValue"
documentation: """
- When a map member's value does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member's value does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLength",
+ method: "POST"
+ uri: "/MalformedLength"
body: """
- { "map" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map/abc"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/map/abc' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/map/abc"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "{\"abc\": [\"def\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"cde\": [\"abc\", \"def\", \"efg\"]}",
- """
- {"abc": ["def", "efg", "fgh", "def", "efg", "fgh", "def", "efg", "fgh", "def"],
- "bcd": ["abc", "def", "efg"],
- "cde": ["abc", "def", "efg"]}""" ],
+ value: [
+ "{\"abc\": [\"def\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"cde\": [\"abc\", \"def\", \"efg\"]}"
+ """
+ {"abc": ["def", "efg", "fgh", "def", "efg", "fgh", "def", "efg", "fgh", "def"],
+ "bcd": ["abc", "def", "efg"],
+ "cde": ["abc", "def", "efg"]}"""
+ ]
inputLength: ["1", "10"]
}
- },
+ }
])
// now repeat the above tests, but for the more specific constraints applied to the input member
apply MalformedLengthOverride @httpMalformedRequestTests([
{
- id: "RestJsonMalformedLengthBlobOverride",
+ id: "RestJsonMalformedLengthBlobOverride"
documentation: """
- When a blob member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a blob member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthOverride",
+ method: "POST"
+ uri: "/MalformedLengthOverride"
body: """
- { "blob" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "blob" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/blob"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/blob' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/blob"}]}"""
}
}
- },
+ }
testParameters: {
- value: ["YWJj", "YWJjZGVmZw=="],
+ value: ["YWJj", "YWJjZGVmZw=="]
inputLength: ["3", "7"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthStringOverride",
+ id: "RestJsonMalformedLengthStringOverride"
documentation: """
- When a string member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthOverride",
+ method: "POST"
+ uri: "/MalformedLengthOverride"
body: """
- { "string" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "string" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/string' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/string"}]}"""
}
}
- },
+ }
testParameters: {
- value: ["abc", "abcdefg", "👍👍👍"],
+ value: ["abc", "abcdefg", "👍👍👍"]
inputLength: ["3", "7", "3"]
}
- },
+ }
{
- id: "RestJsonMalformedLengthMinStringOverride",
+ id: "RestJsonMalformedLengthMinStringOverride"
documentation: """
- When a string member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthOverride",
+ method: "POST"
+ uri: "/MalformedLengthOverride"
body: """
- { "minString" : "abc" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minString" : "abc" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length 3 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4",
- "fieldList" : [{"message": "Value with length 3 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4", "path": "/minString"}]}"""
+ { "message" : "1 validation error detected. Value with length 3 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4",
+ "fieldList" : [{"message": "Value with length 3 at '/minString' failed to satisfy constraint: Member must have length greater than or equal to 4", "path": "/minString"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedLengthMaxStringOverride",
+ id: "RestJsonMalformedLengthMaxStringOverride"
documentation: """
- When a string member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthOverride",
+ method: "POST"
+ uri: "/MalformedLengthOverride"
body: """
- { "maxString" : "abcdefg" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxString" : "abcdefg" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length 7 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6",
- "fieldList" : [{"message": "Value with length 7 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6", "path": "/maxString"}]}"""
+ { "message" : "1 validation error detected. Value with length 7 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6",
+ "fieldList" : [{"message": "Value with length 7 at '/maxString' failed to satisfy constraint: Member must have length less than or equal to 6", "path": "/maxString"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedLengthListOverride",
+ id: "RestJsonMalformedLengthListOverride"
documentation: """
- When a list member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a list member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthOverride",
+ method: "POST"
+ uri: "/MalformedLengthOverride"
body: """
- { "list" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "list" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/list"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/list' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/list"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "[\"abc\", \"def\", \"ghi\"]",
- "[\"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\"]"],
+ value: ["[\"abc\", \"def\", \"ghi\"]", "[\"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\", \"abc\"]"]
inputLength: ["3", "7"]
}
- },
-
+ }
// A valid map has 4-6 keys of length 2-8 that point to lists of length 2-8 with string values of length 2-8
{
- id: "RestJsonMalformedLengthMapOverride",
+ id: "RestJsonMalformedLengthMapOverride"
documentation: """
- When a map member does not fit within length bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member does not fit within length bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthOverride",
+ method: "POST"
+ uri: "/MalformedLengthOverride"
body: """
- { "map" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/map"}]}"""
+ { "message" : "1 validation error detected. Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value with length $inputLength:L at '/map' failed to satisfy constraint: Member must have length between 4 and 6, inclusive", "path": "/map"}]}"""
}
}
- },
+ }
testParameters: {
- value: [ "{\"abc\": [\"def\", \"efg\", \"fgh\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"def\": [\"abc\", \"def\", \"efg\"]}",
- """
- {"abc\": ["abc", "def", "efg"], "bcd": ["abc", "def", "efg"],
- "cde\": ["abc", "def", "efg"], "def": ["abc", "def", "efg"],
- "efg\": ["abc", "def", "efg"], "fgh": ["abc", "def", "efg"],
- "ghi\": ["abc", "def", "efg"] }"""],
+ value: [
+ "{\"abc\": [\"def\", \"efg\", \"fgh\"], \"bcd\": [\"abc\", \"def\", \"efg\"], \"def\": [\"abc\", \"def\", \"efg\"]}"
+ """
+ {"abc": ["abc", "def", "efg"], "bcd": ["abc", "def", "efg"],
+ "cde": ["abc", "def", "efg"], "def": ["abc", "def", "efg"],
+ "efg": ["abc", "def", "efg"], "fgh": ["abc", "def", "efg"],
+ "ghi": ["abc", "def", "efg"] }"""
+ ]
inputLength: ["3", "7"]
}
}
@@ -555,65 +501,59 @@ apply MalformedLengthOverride @httpMalformedRequestTests([
// which means length validation is as important as required validation for ensuring a specified value
apply MalformedLengthQueryString @httpMalformedRequestTests([
{
- id: "RestJsonMalformedLengthQueryStringNoValue",
+ id: "RestJsonMalformedLengthQueryStringNoValue"
documentation: """
- When a required member has no value in the query string,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a required member has no value in the query string,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedLengthQueryString",
- body: "{}",
- queryParams: [
- "string"
- ],
- headers: {
- "content-type": "application/json"
- },
- },
+ method: "POST"
+ uri: "/MalformedLengthQueryString"
+ body: "{}"
+ queryParams: ["string"]
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value with length 0 at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value with length 0 at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value with length 0 at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value with length 0 at '/string' failed to satisfy constraint: Member must have length between 2 and 8, inclusive", "path": "/string"}]}"""
}
}
}
- },
+ }
])
structure MalformedLengthInput {
- blob: LengthBlob,
- string: LengthString,
- minString: MinLengthString,
- maxString: MaxLengthString,
- list: LengthList,
+ blob: LengthBlob
+ string: LengthString
+ minString: MinLengthString
+ maxString: MaxLengthString
+ list: LengthList
map: LengthMap
}
structure MalformedLengthOverrideInput {
- @length(min:4, max:6)
- blob: LengthBlob,
+ @length(min: 4, max: 6)
+ blob: LengthBlob
- @length(min:4, max:6)
- string: LengthString,
+ @length(min: 4, max: 6)
+ string: LengthString
- @length(min:4)
- minString: MinLengthString,
+ @length(min: 4)
+ minString: MinLengthString
- @length(max:6)
- maxString: MaxLengthString,
+ @length(max: 6)
+ maxString: MaxLengthString
- @length(min:4, max:6)
- list: LengthList,
+ @length(min: 4, max: 6)
+ list: LengthList
- @length(min:4, max:6)
+ @length(min: 4, max: 6)
map: LengthMap
}
@@ -622,25 +562,25 @@ structure MalformedLengthQueryStringInput {
string: LengthString
}
-@length(min:2, max:8)
+@length(min: 2, max: 8)
blob LengthBlob
-@length(min:2, max:8)
+@length(min: 2, max: 8)
string LengthString
-@length(min:2)
+@length(min: 2)
string MinLengthString
-@length(max:8)
+@length(max: 8)
string MaxLengthString
-@length(min:2, max:8)
+@length(min: 2, max: 8)
list LengthList {
member: LengthString
}
-@length(min:2, max:8)
+@length(min: 2, max: 8)
map LengthMap {
- key: LengthString,
+ key: LengthString
value: LengthList
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-pattern.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-pattern.smithy
index b6a0882cee4..e67e602828a 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-pattern.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-pattern.smithy
@@ -3,410 +3,364 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/MalformedPattern", method: "POST")
operation MalformedPattern {
- input: MalformedPatternInput,
- errors: [ValidationException]
+ input: MalformedPatternInput
+ errors: [
+ ValidationException
+ ]
}
@suppress(["UnstableTrait"])
@http(uri: "/MalformedPatternOverride", method: "POST")
operation MalformedPatternOverride {
- input: MalformedPatternOverrideInput,
- errors: [ValidationException]
+ input: MalformedPatternOverrideInput
+ errors: [
+ ValidationException
+ ]
}
apply MalformedPattern @httpMalformedRequestTests([
{
- id: "RestJsonMalformedPatternString",
+ id: "RestJsonMalformedPatternString"
documentation: """
- When a string member does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPattern",
+ method: "POST"
+ uri: "/MalformedPattern"
body: """
- { "string" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "string" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
- "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
+ "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/string"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternReDOSString",
+ id: "RestJsonMalformedPatternReDOSString"
documentation: """
- When the specified pattern is susceptible to ReDOS, the service will not
- hang indefinitely while evaluating the pattern""",
- protocol: restJson1,
+ When the specified pattern is susceptible to ReDOS, the service will not
+ hang indefinitely while evaluating the pattern"""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPattern",
+ method: "POST"
+ uri: "/MalformedPattern"
body: """
- { "evilString" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000!" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "evilString" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000!" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value 000000000000000000000000000000000000000000000000000000000000000000000000000000000000! at '/evilString' failed to satisfy constraint: Member must satisfy regular expression pattern: ^([0-9]+)+$$",
- "fieldList" : [{"message": "Value 000000000000000000000000000000000000000000000000000000000000000000000000000000000000! at '/evilString' failed to satisfy constraint: Member must satisfy regular expression pattern: ^([0-9]+)+$$", "path": "/evilString"}]}"""
+ { "message" : "1 validation error detected. Value 000000000000000000000000000000000000000000000000000000000000000000000000000000000000! at '/evilString' failed to satisfy constraint: Member must satisfy regular expression pattern: ^([0-9]+)+$$",
+ "fieldList" : [{"message": "Value 000000000000000000000000000000000000000000000000000000000000000000000000000000000000! at '/evilString' failed to satisfy constraint: Member must satisfy regular expression pattern: ^([0-9]+)+$$", "path": "/evilString"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedPatternList",
+ id: "RestJsonMalformedPatternList"
documentation: """
- When a list member value does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a list member value does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPattern",
+ method: "POST"
+ uri: "/MalformedPattern"
body: """
- { "list" : [$value:S] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "list" : [$value:S] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
- "fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/list/0"}]}"""
+ { "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
+ "fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/list/0"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternMapKey",
+ id: "RestJsonMalformedPatternMapKey"
documentation: """
- When a map member's key does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member's key does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPattern",
+ method: "POST"
+ uri: "/MalformedPattern"
body: """
- { "map" : { $value:S : "abc" } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : { $value:S : "abc" } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
- "fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/map"}]}"""
+ { "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
+ "fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/map"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternMapValue",
+ id: "RestJsonMalformedPatternMapValue"
documentation: """
- When a map member's value does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member's value does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPattern",
+ method: "POST"
+ uri: "/MalformedPattern"
body: """
- { "map" : { "abc": $value:S } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : { "abc": $value:S } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/map/abc' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
- "fieldList" : [{"message": "Value at '/map/abc' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/map/abc"}]}"""
+ { "message" : "1 validation error detected. Value at '/map/abc' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
+ "fieldList" : [{"message": "Value at '/map/abc' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/map/abc"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternUnion",
+ id: "RestJsonMalformedPatternUnion"
documentation: """
- When a union member's value does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a union member's value does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPattern",
+ method: "POST"
+ uri: "/MalformedPattern"
body: """
- { "union" : { "first": $value:S } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : { "first": $value:S } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
- "fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/union/first"}]}"""
+ { "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$",
+ "fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$$", "path": "/union/first"}]}"""
}
}
- },
+ }
testParameters: {
value: ["ABC", "xyz"]
}
- },
+ }
])
-
-
apply MalformedPatternOverride @httpMalformedRequestTests([
{
- id: "RestJsonMalformedPatternStringOverride",
+ id: "RestJsonMalformedPatternStringOverride"
documentation: """
- When a string member does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string member does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPatternOverride",
+ method: "POST"
+ uri: "/MalformedPatternOverride"
body: """
- { "string" : $value:S }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "string" : $value:S }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
- "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
+ "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/string"}]}"""
}
}
- },
+ }
testParameters: {
value: ["abc", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternListOverride",
+ id: "RestJsonMalformedPatternListOverride"
documentation: """
- When a list member value does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a list member value does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPatternOverride",
+ method: "POST"
+ uri: "/MalformedPatternOverride"
body: """
- { "list" : [$value:S] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "list" : [$value:S] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
- "fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/list/0"}]}"""
+ { "message" : "1 validation error detected. Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
+ "fieldList" : [{"message": "Value at '/list/0' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/list/0"}]}"""
}
}
- },
+ }
testParameters: {
value: ["abc", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternMapKeyOverride",
+ id: "RestJsonMalformedPatternMapKeyOverride"
documentation: """
- When a map member's key does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member's key does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPatternOverride",
+ method: "POST"
+ uri: "/MalformedPatternOverride"
body: """
- { "map" : { $value:S : "ghi" } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : { $value:S : "ghi" } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
- "fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/map"}]}"""
+ { "message" : "1 validation error detected. Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
+ "fieldList" : [{"message": "Value at '/map' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/map"}]}"""
}
}
- },
+ }
testParameters: {
value: ["abc", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternMapValueOverride",
+ id: "RestJsonMalformedPatternMapValueOverride"
documentation: """
- When a map member's value does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a map member's value does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPatternOverride",
+ method: "POST"
+ uri: "/MalformedPatternOverride"
body: """
- { "map" : { "ghi": $value:S } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "map" : { "ghi": $value:S } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/map/ghi' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
- "fieldList" : [{"message": "Value at '/map/ghi' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/map/ghi"}]}"""
+ { "message" : "1 validation error detected. Value at '/map/ghi' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
+ "fieldList" : [{"message": "Value at '/map/ghi' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/map/ghi"}]}"""
}
}
- },
+ }
testParameters: {
value: ["abc", "xyz"]
}
- },
+ }
{
- id: "RestJsonMalformedPatternUnionOverride",
+ id: "RestJsonMalformedPatternUnionOverride"
documentation: """
- When a union member's value does not match the specified pattern,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a union member's value does not match the specified pattern,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedPatternOverride",
+ method: "POST"
+ uri: "/MalformedPatternOverride"
body: """
- { "union" : { "first": $value:S } }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : { "first": $value:S } }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
- "fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/union/first"}]}"""
+ { "message" : "1 validation error detected. Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$",
+ "fieldList" : [{"message": "Value at '/union/first' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[g-m]+$$", "path": "/union/first"}]}"""
}
}
- },
+ }
testParameters: {
value: ["abc", "xyz"]
}
- },
+ }
])
structure MalformedPatternInput {
- string: PatternString,
-
- evilString: EvilString,
-
- list: PatternList,
-
- map: PatternMap,
-
+ string: PatternString
+ evilString: EvilString
+ list: PatternList
+ map: PatternMap
union: PatternUnion
}
structure MalformedPatternOverrideInput {
@pattern("^[g-m]+$")
- string: PatternString,
+ string: PatternString
- list: PatternListOverride,
+ list: PatternListOverride
- map: PatternMapOverride,
+ map: PatternMapOverride
union: PatternUnionOverride
}
@@ -427,26 +381,26 @@ list PatternListOverride {
}
map PatternMap {
- key: PatternString,
+ key: PatternString
value: PatternString
}
map PatternMapOverride {
@pattern("^[g-m]+$")
- key: PatternString,
+ key: PatternString
@pattern("^[g-m]+$")
value: PatternString
}
union PatternUnion {
- first: PatternString,
+ first: PatternString
second: PatternString
}
union PatternUnionOverride {
@pattern("^[g-m]+$")
- first: PatternString,
+ first: PatternString
@pattern("^[g-m]+$")
second: PatternString
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-range.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-range.smithy
index 833913ff15c..ffdf7d165be 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-range.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-range.smithy
@@ -3,1051 +3,950 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/MalformedRange", method: "POST")
operation MalformedRange {
- input: MalformedRangeInput,
- errors: [ValidationException]
+ input: MalformedRangeInput
+ errors: [
+ ValidationException
+ ]
}
@suppress(["UnstableTrait"])
@http(uri: "/MalformedRangeOverride", method: "POST")
operation MalformedRangeOverride {
- input: MalformedRangeOverrideInput,
- errors: [ValidationException]
+ input: MalformedRangeOverrideInput
+ errors: [
+ ValidationException
+ ]
}
apply MalformedRange @httpMalformedRequestTests([
{
- id: "RestJsonMalformedRangeByte",
+ id: "RestJsonMalformedRangeByte"
documentation: """
- When a byte member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "byte" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "byte" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/byte' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value at '/byte' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/byte"}]}"""
+ { "message" : "1 validation error detected. Value at '/byte' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value at '/byte' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/byte"}]}"""
}
}
- },
+ }
testParameters: {
value: ["1", "9"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinByte",
+ id: "RestJsonMalformedRangeMinByte"
documentation: """
- When a byte member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "minByte" : 1 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minByte" : 1 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 2",
- "fieldList" : [{"message": "Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minByte"}]}"""
+ { "message" : "1 validation error detected. Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 2",
+ "fieldList" : [{"message": "Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minByte"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxByte",
+ id: "RestJsonMalformedRangeMaxByte"
documentation: """
- When a byte member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "maxByte" : 9 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxByte" : 9 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 8",
- "fieldList" : [{"message": "Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxByte"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 8",
+ "fieldList" : [{"message": "Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxByte"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeFloat",
+ id: "RestJsonMalformedRangeFloat"
documentation: """
- When a float member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a float member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "float" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "float" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/float' failed to satisfy constraint: Member must be between 2.2 and 8.8, inclusive",
- "fieldList" : [{"message": "Value at '/float' failed to satisfy constraint: Member must be between 2.2 and 8.8, inclusive", "path": "/float"}]}"""
+ { "message" : "1 validation error detected. Value at '/float' failed to satisfy constraint: Member must be between 2.2 and 8.8, inclusive",
+ "fieldList" : [{"message": "Value at '/float' failed to satisfy constraint: Member must be between 2.2 and 8.8, inclusive", "path": "/float"}]}"""
}
}
- },
+ }
testParameters: {
value: ["2.1", "8.9"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinFloat",
+ id: "RestJsonMalformedRangeMinFloat"
documentation: """
- When a float member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a float member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "minFloat" : 2.1 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minFloat" : 2.1 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 2.2",
- "fieldList" : [{"message": "Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 2.2", "path": "/minFloat"}]}"""
+ { "message" : "1 validation error detected. Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 2.2",
+ "fieldList" : [{"message": "Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 2.2", "path": "/minFloat"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxFloat",
+ id: "RestJsonMalformedRangeMaxFloat"
documentation: """
- When a float member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a float member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "maxFloat" : 8.9 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxFloat" : 8.9 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 8.8",
- "fieldList" : [{"message": "Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 8.8", "path": "/maxFloat"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 8.8",
+ "fieldList" : [{"message": "Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 8.8", "path": "/maxFloat"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeShort",
+ id: "RestJsonMalformedRangeShort"
documentation: """
- When a short member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "short" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "short" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/short' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value at '/short' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/short"}]}"""
+ { "message" : "1 validation error detected. Value at '/short' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value at '/short' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/short"}]}"""
}
}
- },
+ }
testParameters: {
value: ["1", "9"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinShort",
+ id: "RestJsonMalformedRangeMinShort"
documentation: """
- When a short member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "minShort" : 1 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minShort" : 1 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 2",
- "fieldList" : [{"message": "Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minShort"}]}"""
+ { "message" : "1 validation error detected. Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 2",
+ "fieldList" : [{"message": "Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minShort"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxShort",
+ id: "RestJsonMalformedRangeMaxShort"
documentation: """
- When a short member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "maxShort" : 9 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxShort" : 9 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 8",
- "fieldList" : [{"message": "Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxShort"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 8",
+ "fieldList" : [{"message": "Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxShort"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeInteger",
+ id: "RestJsonMalformedRangeInteger"
documentation: """
- When a integer member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a integer member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "integer" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "integer" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/integer' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value at '/integer' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/integer"}]}"""
+ { "message" : "1 validation error detected. Value at '/integer' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value at '/integer' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/integer"}]}"""
}
}
- },
+ }
testParameters: {
value: ["1", "9"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinInteger",
+ id: "RestJsonMalformedRangeMinInteger"
documentation: """
- When a integer member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a integer member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "minInteger" : 1 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minInteger" : 1 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 2",
- "fieldList" : [{"message": "Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minInteger"}]}"""
+ { "message" : "1 validation error detected. Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 2",
+ "fieldList" : [{"message": "Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minInteger"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxInteger",
+ id: "RestJsonMalformedRangeMaxInteger"
documentation: """
- When a integer member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a integer member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "maxInteger" : 9 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxInteger" : 9 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 8",
- "fieldList" : [{"message": "Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxInteger"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 8",
+ "fieldList" : [{"message": "Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxInteger"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeLong",
+ id: "RestJsonMalformedRangeLong"
documentation: """
- When a long member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a long member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "long" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "long" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/long' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
- "fieldList" : [{"message": "Value at '/long' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/long"}]}"""
+ { "message" : "1 validation error detected. Value at '/long' failed to satisfy constraint: Member must be between 2 and 8, inclusive",
+ "fieldList" : [{"message": "Value at '/long' failed to satisfy constraint: Member must be between 2 and 8, inclusive", "path": "/long"}]}"""
}
}
- },
+ }
testParameters: {
value: ["1", "9"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinLong",
+ id: "RestJsonMalformedRangeMinLong"
documentation: """
- When a long member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a long member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "minLong" : 1 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minLong" : 1 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 2",
- "fieldList" : [{"message": "Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minLong"}]}"""
+ { "message" : "1 validation error detected. Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 2",
+ "fieldList" : [{"message": "Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 2", "path": "/minLong"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxLong",
+ id: "RestJsonMalformedRangeMaxLong"
documentation: """
- When a long member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a long member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRange",
+ method: "POST"
+ uri: "/MalformedRange"
body: """
- { "maxLong" : 9 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxLong" : 9 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 8",
- "fieldList" : [{"message": "Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxLong"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 8",
+ "fieldList" : [{"message": "Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 8", "path": "/maxLong"}]}"""
}
}
}
- },
+ }
])
// now repeat the above tests, but for the more specific constraints applied to the input member
apply MalformedRangeOverride @httpMalformedRequestTests([
{
- id: "RestJsonMalformedRangeByteOverride",
+ id: "RestJsonMalformedRangeByteOverride"
documentation: """
- When a byte member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "byte" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "byte" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/byte' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value at '/byte' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/byte"}]}"""
+ { "message" : "1 validation error detected. Value at '/byte' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value at '/byte' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/byte"}]}"""
}
}
- },
+ }
testParameters: {
value: ["3", "7"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinByteOverride",
+ id: "RestJsonMalformedRangeMinByteOverride"
documentation: """
- When a byte member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "minByte" : 3 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minByte" : 3 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 4",
- "fieldList" : [{"message": "Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minByte"}]}"""
+ { "message" : "1 validation error detected. Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 4",
+ "fieldList" : [{"message": "Value at '/minByte' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minByte"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxByteOverride",
+ id: "RestJsonMalformedRangeMaxByteOverride"
documentation: """
- When a byte member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "maxByte" : 7 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxByte" : 7 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 6",
- "fieldList" : [{"message": "Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxByte"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 6",
+ "fieldList" : [{"message": "Value at '/maxByte' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxByte"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeFloatOverride",
+ id: "RestJsonMalformedRangeFloatOverride"
documentation: """
- When a float member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a float member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "float" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "float" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/float' failed to satisfy constraint: Member must be between 4.4 and 6.6, inclusive",
- "fieldList" : [{"message": "Value at '/float' failed to satisfy constraint: Member must be between 4.4 and 6.6, inclusive", "path": "/float"}]}"""
+ { "message" : "1 validation error detected. Value at '/float' failed to satisfy constraint: Member must be between 4.4 and 6.6, inclusive",
+ "fieldList" : [{"message": "Value at '/float' failed to satisfy constraint: Member must be between 4.4 and 6.6, inclusive", "path": "/float"}]}"""
}
}
- },
+ }
testParameters: {
value: ["4.3", "6.7"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinFloatOverride",
+ id: "RestJsonMalformedRangeMinFloatOverride"
documentation: """
- When a float member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a float member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "minFloat" : 4.3 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minFloat" : 4.3 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 4.4",
- "fieldList" : [{"message": "Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 4.4", "path": "/minFloat"}]}"""
+ { "message" : "1 validation error detected. Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 4.4",
+ "fieldList" : [{"message": "Value at '/minFloat' failed to satisfy constraint: Member must be greater than or equal to 4.4", "path": "/minFloat"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxFloatOverride",
+ id: "RestJsonMalformedRangeMaxFloatOverride"
documentation: """
- When a float member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a float member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "maxFloat" : 6.7 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxFloat" : 6.7 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 6.6",
- "fieldList" : [{"message": "Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 6.6", "path": "/maxFloat"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 6.6",
+ "fieldList" : [{"message": "Value at '/maxFloat' failed to satisfy constraint: Member must be less than or equal to 6.6", "path": "/maxFloat"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeShortOverride",
+ id: "RestJsonMalformedRangeShortOverride"
documentation: """
- When a short member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "short" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "short" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/short' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value at '/short' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/short"}]}"""
+ { "message" : "1 validation error detected. Value at '/short' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value at '/short' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/short"}]}"""
}
}
- },
+ }
testParameters: {
value: ["3", "7"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinShortOverride",
+ id: "RestJsonMalformedRangeMinShortOverride"
documentation: """
- When a short member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "minShort" : 3 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minShort" : 3 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 4",
- "fieldList" : [{"message": "Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minShort"}]}"""
+ { "message" : "1 validation error detected. Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 4",
+ "fieldList" : [{"message": "Value at '/minShort' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minShort"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxShortOverride",
+ id: "RestJsonMalformedRangeMaxShortOverride"
documentation: """
- When a short member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "maxShort" : 7 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxShort" : 7 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 6",
- "fieldList" : [{"message": "Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxShort"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 6",
+ "fieldList" : [{"message": "Value at '/maxShort' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxShort"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeIntegerOverride",
+ id: "RestJsonMalformedRangeIntegerOverride"
documentation: """
- When a integer member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a integer member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "integer" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "integer" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/integer' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value at '/integer' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/integer"}]}"""
+ { "message" : "1 validation error detected. Value at '/integer' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value at '/integer' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/integer"}]}"""
}
}
- },
+ }
testParameters: {
value: ["3", "7"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinIntegerOverride",
+ id: "RestJsonMalformedRangeMinIntegerOverride"
documentation: """
- When a integer member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a integer member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "minInteger" : 3 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minInteger" : 3 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 4",
- "fieldList" : [{"message": "Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minInteger"}]}"""
+ { "message" : "1 validation error detected. Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 4",
+ "fieldList" : [{"message": "Value at '/minInteger' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minInteger"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxIntegerOverride",
+ id: "RestJsonMalformedRangeMaxIntegerOverride"
documentation: """
- When a integer member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a integer member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "maxInteger" : 7 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxInteger" : 7 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 6",
- "fieldList" : [{"message": "Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxInteger"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 6",
+ "fieldList" : [{"message": "Value at '/maxInteger' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxInteger"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeLongOverride",
+ id: "RestJsonMalformedRangeLongOverride"
documentation: """
- When a long member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a long member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "long" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "long" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/long' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
- "fieldList" : [{"message": "Value at '/long' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/long"}]}"""
+ { "message" : "1 validation error detected. Value at '/long' failed to satisfy constraint: Member must be between 4 and 6, inclusive",
+ "fieldList" : [{"message": "Value at '/long' failed to satisfy constraint: Member must be between 4 and 6, inclusive", "path": "/long"}]}"""
}
}
- },
+ }
testParameters: {
value: ["3", "7"]
}
- },
+ }
{
- id: "RestJsonMalformedRangeMinLongOverride",
+ id: "RestJsonMalformedRangeMinLongOverride"
documentation: """
- When a long member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a long member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "minLong" : 3 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "minLong" : 3 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 4",
- "fieldList" : [{"message": "Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minLong"}]}"""
+ { "message" : "1 validation error detected. Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 4",
+ "fieldList" : [{"message": "Value at '/minLong' failed to satisfy constraint: Member must be greater than or equal to 4", "path": "/minLong"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRangeMaxLongOverride",
+ id: "RestJsonMalformedRangeMaxLongOverride"
documentation: """
- When a long member does not fit within range bounds,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a long member does not fit within range bounds,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRangeOverride",
+ method: "POST"
+ uri: "/MalformedRangeOverride"
body: """
- { "maxLong" : 7 }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "maxLong" : 7 }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 6",
- "fieldList" : [{"message": "Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxLong"}]}"""
+ { "message" : "1 validation error detected. Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 6",
+ "fieldList" : [{"message": "Value at '/maxLong' failed to satisfy constraint: Member must be less than or equal to 6", "path": "/maxLong"}]}"""
}
}
}
- },
+ }
])
structure MalformedRangeInput {
- byte: RangeByte,
- minByte: MinByte,
- maxByte: MaxByte,
-
- short: RangeShort,
- minShort: MinShort,
- maxShort: MaxShort,
-
- integer: RangeInteger,
- minInteger: MinInteger,
- maxInteger: MaxInteger,
-
- long: RangeLong,
- minLong: MinLong,
- maxLong: MaxLong,
-
- float: RangeFloat,
- minFloat: MinFloat,
- maxFloat: MaxFloat,
+ byte: RangeByte
+ minByte: MinByte
+ maxByte: MaxByte
+ short: RangeShort
+ minShort: MinShort
+ maxShort: MaxShort
+ integer: RangeInteger
+ minInteger: MinInteger
+ maxInteger: MaxInteger
+ long: RangeLong
+ minLong: MinLong
+ maxLong: MaxLong
+ float: RangeFloat
+ minFloat: MinFloat
+ maxFloat: MaxFloat
}
structure MalformedRangeOverrideInput {
- @range(min:4, max:6)
- byte: RangeByte,
- @range(min:4)
- minByte: MinByte,
- @range(max:6)
- maxByte: MaxByte,
+ @range(min: 4, max: 6)
+ byte: RangeByte
+
+ @range(min: 4)
+ minByte: MinByte
+
+ @range(max: 6)
+ maxByte: MaxByte
@range(min: 4, max: 6)
- short: RangeShort,
+ short: RangeShort
+
@range(min: 4)
- minShort: MinShort,
+ minShort: MinShort
+
@range(max: 6)
- maxShort: MaxShort,
+ maxShort: MaxShort
@range(min: 4, max: 6)
- integer: RangeInteger,
+ integer: RangeInteger
+
@range(min: 4)
- minInteger: MinInteger,
+ minInteger: MinInteger
+
@range(max: 6)
- maxInteger: MaxInteger,
+ maxInteger: MaxInteger
@range(min: 4, max: 6)
- long: RangeLong,
+ long: RangeLong
+
@range(min: 4)
- minLong: MinLong,
+ minLong: MinLong
+
@range(max: 6)
- maxLong: MaxLong,
+ maxLong: MaxLong
+
+ @range(min: 4.4, max: 6.6)
+ float: RangeFloat
- @range(min:4.4, max:6.6)
- float: RangeFloat,
- @range(min:4.4)
- minFloat: MinFloat,
- @range(max:6.6)
- maxFloat: MaxFloat,
+ @range(min: 4.4)
+ minFloat: MinFloat
+
+ @range(max: 6.6)
+ maxFloat: MaxFloat
}
-@range(min:2, max:8)
+@range(min: 2, max: 8)
byte RangeByte
-@range(min:2)
+
+@range(min: 2)
byte MinByte
-@range(max:8)
+
+@range(max: 8)
byte MaxByte
@range(min: 2, max: 8)
short RangeShort
+
@range(min: 2)
short MinShort
+
@range(max: 8)
short MaxShort
@range(min: 2, max: 8)
integer RangeInteger
+
@range(min: 2)
integer MinInteger
+
@range(max: 8)
integer MaxInteger
@range(min: 2, max: 8)
long RangeLong
+
@range(min: 2)
long MinLong
+
@range(max: 8)
long MaxLong
-@range(min:2.2, max:8.8)
+@range(min: 2.2, max: 8.8)
float RangeFloat
-@range(min:2.2)
+
+@range(min: 2.2)
float MinFloat
-@range(max:8.8)
-float MaxFloat
+@range(max: 8.8)
+float MaxFloat
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-required.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-required.smithy
index 5a875c6a574..35cbe7b8a16 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-required.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-required.smithy
@@ -3,115 +3,96 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/MalformedRequired", method: "POST")
operation MalformedRequired {
- input: MalformedRequiredInput,
- errors: [ValidationException]
+ input: MalformedRequiredInput
+ errors: [
+ ValidationException
+ ]
}
apply MalformedRequired @httpMalformedRequestTests([
{
- id: "RestJsonMalformedRequiredBodyUnset",
+ id: "RestJsonMalformedRequiredBodyUnset"
documentation: """
- When a required member is not set in the message body,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a required member is not set in the message body,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRequired",
+ method: "POST"
+ uri: "/MalformedRequired"
body: """
- { }""",
- queryParams: [
- "stringInQuery=abc"
- ],
- headers: {
- "content-type": "application/json",
- "string-in-headers": "abc"
-
- }
- },
+ { }"""
+ queryParams: ["stringInQuery=abc"]
+ headers: { "content-type": "application/json", "string-in-headers": "abc" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must not be null",
- "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must not be null", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must not be null",
+ "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must not be null", "path": "/string"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRequiredBodyExplicitNull",
+ id: "RestJsonMalformedRequiredBodyExplicitNull"
documentation: """
- When a required member is set to null in the message body,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a required member is set to null in the message body,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRequired",
+ method: "POST"
+ uri: "/MalformedRequired"
body: """
- { "string": null }""",
- queryParams: [
- "stringInQuery=abc"
- ],
- headers: {
- "content-type": "application/json",
- "string-in-headers": "abc"
- }
- },
+ { "string": null }"""
+ queryParams: ["stringInQuery=abc"]
+ headers: { "content-type": "application/json", "string-in-headers": "abc" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must not be null",
- "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must not be null", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must not be null",
+ "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must not be null", "path": "/string"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedRequiredHeaderUnset",
+ id: "RestJsonMalformedRequiredHeaderUnset"
documentation: """
- When a required member is not set in headers,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a required member is not set in headers,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedRequired",
+ method: "POST"
+ uri: "/MalformedRequired"
body: """
- { "string": "abc" }""",
- queryParams: [
- "stringInQuery=abc"
- ],
- headers: {
- "content-type": "application/json"
- },
- },
+ { "string": "abc" }"""
+ queryParams: ["stringInQuery=abc"]
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/stringInHeader' failed to satisfy constraint: Member must not be null",
- "fieldList" : [{"message": "Value at '/stringInHeader' failed to satisfy constraint: Member must not be null", "path": "/stringInHeader"}]}"""
+ { "message" : "1 validation error detected. Value at '/stringInHeader' failed to satisfy constraint: Member must not be null",
+ "fieldList" : [{"message": "Value at '/stringInHeader' failed to satisfy constraint: Member must not be null", "path": "/stringInHeader"}]}"""
}
}
}
@@ -120,11 +101,11 @@ apply MalformedRequired @httpMalformedRequestTests([
structure MalformedRequiredInput {
@required
- string: String,
+ string: String
@required
@httpQuery("stringInQuery")
- stringInQuery: String,
+ stringInQuery: String
@required
@httpHeader("string-in-headers")
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-uniqueItems.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-uniqueItems.smithy
index 58b5e66b6ab..1d09749821e 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/malformed-uniqueItems.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/malformed-uniqueItems.smithy
@@ -9,8 +9,8 @@ use aws.protocoltests.shared#ByteSet
use aws.protocoltests.shared#DateTimeSet
use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#HttpDateSet
-use aws.protocoltests.shared#IntegerSet
use aws.protocoltests.shared#IntegerEnumSet
+use aws.protocoltests.shared#IntegerSet
use aws.protocoltests.shared#ListSet
use aws.protocoltests.shared#LongSet
use aws.protocoltests.shared#ShortSet
@@ -18,521 +18,457 @@ use aws.protocoltests.shared#StringSet
use aws.protocoltests.shared#StructureSet
use aws.protocoltests.shared#TimestampSet
use aws.protocoltests.shared#UnionSet
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/MalformedUniqueItems", method: "POST")
operation MalformedUniqueItems {
- input: MalformedUniqueItemsInput,
- errors: [ValidationException]
+ input: MalformedUniqueItemsInput
+ errors: [
+ ValidationException
+ ]
}
apply MalformedUniqueItems @httpMalformedRequestTests([
{
- id: "RestJsonMalformedUniqueItemsBlobList",
+ id: "RestJsonMalformedUniqueItemsBlobList"
documentation: """
- When a blob list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a blob list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "blobList" : ["YQ==", "YQ=="] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "blobList" : ["YQ==", "YQ=="] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/blobList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/blobList' failed to satisfy constraint: Member must have unique values", "path": "/blobList"}]}"""
+ { "message" : "1 validation error detected. Value at '/blobList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/blobList' failed to satisfy constraint: Member must have unique values", "path": "/blobList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsBooleanList",
+ id: "RestJsonMalformedUniqueItemsBooleanList"
documentation: """
- When a boolean list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a boolean list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "booleanList" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "booleanList" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/booleanList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/booleanList' failed to satisfy constraint: Member must have unique values", "path": "/booleanList"}]}"""
+ { "message" : "1 validation error detected. Value at '/booleanList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/booleanList' failed to satisfy constraint: Member must have unique values", "path": "/booleanList"}]}"""
}
}
- },
+ }
testParameters: {
value: ["[true, true]", "[false, false]"]
}
-
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsStringList",
+ id: "RestJsonMalformedUniqueItemsStringList"
documentation: """
- When a string list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a string list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "stringList" : ["abc", "abc"] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "stringList" : ["abc", "abc"] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/stringList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/stringList' failed to satisfy constraint: Member must have unique values", "path": "/stringList"}]}"""
+ { "message" : "1 validation error detected. Value at '/stringList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/stringList' failed to satisfy constraint: Member must have unique values", "path": "/stringList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsByteList",
+ id: "RestJsonMalformedUniqueItemsByteList"
documentation: """
- When a byte list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a byte list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "byteList" : [1, 1] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "byteList" : [1, 1] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/byteList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/byteList' failed to satisfy constraint: Member must have unique values", "path": "/byteList"}]}"""
+ { "message" : "1 validation error detected. Value at '/byteList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/byteList' failed to satisfy constraint: Member must have unique values", "path": "/byteList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsShortList",
+ id: "RestJsonMalformedUniqueItemsShortList"
documentation: """
- When a short list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a short list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "shortList" : [2, 2] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "shortList" : [2, 2] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/shortList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/shortList' failed to satisfy constraint: Member must have unique values", "path": "/shortList"}]}"""
+ { "message" : "1 validation error detected. Value at '/shortList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/shortList' failed to satisfy constraint: Member must have unique values", "path": "/shortList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsIntegerList",
+ id: "RestJsonMalformedUniqueItemsIntegerList"
documentation: """
- When an integer list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an integer list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "integerList" : [3, 3] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "integerList" : [3, 3] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/integerList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/integerList' failed to satisfy constraint: Member must have unique values", "path": "/integerList"}]}"""
+ { "message" : "1 validation error detected. Value at '/integerList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/integerList' failed to satisfy constraint: Member must have unique values", "path": "/integerList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsLongList",
+ id: "RestJsonMalformedUniqueItemsLongList"
documentation: """
- When an integer list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an integer list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "longList" : [4, 4] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "longList" : [4, 4] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/longList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/longList' failed to satisfy constraint: Member must have unique values", "path": "/longList"}]}"""
+ { "message" : "1 validation error detected. Value at '/longList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/longList' failed to satisfy constraint: Member must have unique values", "path": "/longList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsTimestampList",
+ id: "RestJsonMalformedUniqueItemsTimestampList"
documentation: """
- When a timestamp list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a timestamp list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "timestampList" : [1676660607, 1676660607] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "timestampList" : [1676660607, 1676660607] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/timestampList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/timestampList' failed to satisfy constraint: Member must have unique values", "path": "/timestampList"}]}"""
+ { "message" : "1 validation error detected. Value at '/timestampList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/timestampList' failed to satisfy constraint: Member must have unique values", "path": "/timestampList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsDateTimeList",
+ id: "RestJsonMalformedUniqueItemsDateTimeList"
documentation: """
- When a date-time timestamp list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a date-time timestamp list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "dateTimeList" : ["1985-04-12T23:20:50.52Z", "1985-04-12T23:20:50.52Z"] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "dateTimeList" : ["1985-04-12T23:20:50.52Z", "1985-04-12T23:20:50.52Z"] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/dateTimeList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/dateTimeList' failed to satisfy constraint: Member must have unique values", "path": "/dateTimeList"}]}"""
+ { "message" : "1 validation error detected. Value at '/dateTimeList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/dateTimeList' failed to satisfy constraint: Member must have unique values", "path": "/dateTimeList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsHttpDateList",
+ id: "RestJsonMalformedUniqueItemsHttpDateList"
documentation: """
- When a http-date timestamp list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When a http-date timestamp list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "httpDateList" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "httpDateList" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/httpDateList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/httpDateList' failed to satisfy constraint: Member must have unique values", "path": "/httpDateList"}]}"""
+ { "message" : "1 validation error detected. Value at '/httpDateList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/httpDateList' failed to satisfy constraint: Member must have unique values", "path": "/httpDateList"}]}"""
}
}
- },
+ }
testParameters: {
value: ["[\"Tue, 29 Apr 2014 18:30:38 GMT\", \"Tue, 29 Apr 2014 18:30:38 GMT\"]"]
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsEnumList",
+ id: "RestJsonMalformedUniqueItemsEnumList"
documentation: """
- When an enum list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an enum list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "enumList" : ["Foo", "Foo"] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "enumList" : ["Foo", "Foo"] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/enumList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/enumList' failed to satisfy constraint: Member must have unique values", "path": "/enumList"}]}"""
+ { "message" : "1 validation error detected. Value at '/enumList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/enumList' failed to satisfy constraint: Member must have unique values", "path": "/enumList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsIntEnumList",
+ id: "RestJsonMalformedUniqueItemsIntEnumList"
documentation: """
- When an intEnum list contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an intEnum list contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "intEnumList" : [3, 3] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "intEnumList" : [3, 3] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/intEnumList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/intEnumList' failed to satisfy constraint: Member must have unique values", "path": "/intEnumList"}]}"""
+ { "message" : "1 validation error detected. Value at '/intEnumList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/intEnumList' failed to satisfy constraint: Member must have unique values", "path": "/intEnumList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsListList",
+ id: "RestJsonMalformedUniqueItemsListList"
documentation: """
- When an list of lists contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an list of lists contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "listList" : [["foo","bar"], ["foo","bar"]] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "listList" : [["foo","bar"], ["foo","bar"]] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/listList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/listList' failed to satisfy constraint: Member must have unique values", "path": "/listList"}]}"""
+ { "message" : "1 validation error detected. Value at '/listList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/listList' failed to satisfy constraint: Member must have unique values", "path": "/listList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsStructureList",
+ id: "RestJsonMalformedUniqueItemsStructureList"
documentation: """
- When an list of structures contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an list of structures contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "structureList" : [{"hi": "hello"}, {"hi": "hello"}] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "structureList" : [{"hi": "hello"}, {"hi": "hello"}] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/structureList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/structureList' failed to satisfy constraint: Member must have unique values", "path": "/structureList"}]}"""
+ { "message" : "1 validation error detected. Value at '/structureList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/structureList' failed to satisfy constraint: Member must have unique values", "path": "/structureList"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsStructureMissingKeyList",
+ id: "RestJsonMalformedUniqueItemsStructureMissingKeyList"
documentation: """
- When a list of structures does not contain required keys,
- the response should be a 400 ValidationException and not
- a 500 error.""",
- protocol: restJson1,
+ When a list of structures does not contain required keys,
+ the response should be a 400 ValidationException and not
+ a 500 error."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "structureListWithNoKey" : [{"hi2": "bar"}] }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "structureListWithNoKey" : [{"hi2": "bar"}] }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/structureListWithNoKey/0/hi' failed to satisfy constraint: Member must not be null",
- "fieldList" : [{"message": "Value at '/structureListWithNoKey/0/hi' failed to satisfy constraint: Member must not be null", "path": "/structureListWithNoKey/0/hi"}]}"""
+ { "message" : "1 validation error detected. Value at '/structureListWithNoKey/0/hi' failed to satisfy constraint: Member must not be null",
+ "fieldList" : [{"message": "Value at '/structureListWithNoKey/0/hi' failed to satisfy constraint: Member must not be null", "path": "/structureListWithNoKey/0/hi"}]}"""
}
}
}
- },
+ }
{
- id: "RestJsonMalformedUniqueItemsUnionList",
+ id: "RestJsonMalformedUniqueItemsUnionList"
documentation: """
- When an list of unions contains non-unique values,
- the response should be a 400 ValidationException.""",
- protocol: restJson1,
+ When an list of unions contains non-unique values,
+ the response should be a 400 ValidationException."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/MalformedUniqueItems",
+ method: "POST"
+ uri: "/MalformedUniqueItems"
body: """
- { "unionList" : $value:L }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "unionList" : $value:L }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/unionList' failed to satisfy constraint: Member must have unique values",
- "fieldList" : [{"message": "Value at '/unionList' failed to satisfy constraint: Member must have unique values", "path": "/unionList"}]}"""
+ { "message" : "1 validation error detected. Value at '/unionList' failed to satisfy constraint: Member must have unique values",
+ "fieldList" : [{"message": "Value at '/unionList' failed to satisfy constraint: Member must have unique values", "path": "/unionList"}]}"""
}
}
- },
+ }
testParameters: {
value: ["[{\"string\": \"foo\"}, {\"string\": \"foo\"}]", "[{\"integer\": 1}, {\"integer\": 1}]"]
}
- },
+ }
])
-
string MyStringKey
structure MissingKeyStructure {
- @required
- hi: MyStringKey
+ @required
+ hi: MyStringKey
}
@uniqueItems
list StructureSetWithNoKey {
- member: MissingKeyStructure
+ member: MissingKeyStructure
}
structure MalformedUniqueItemsInput {
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/recursive-structures.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/recursive-structures.smithy
index 63f0f50d80d..4bdd7e5d826 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/recursive-structures.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/recursive-structures.smithy
@@ -3,82 +3,78 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
+use smithy.framework#ValidationException
use smithy.test#httpMalformedRequestTests
use smithy.test#httpRequestTests
-use smithy.framework#ValidationException
@suppress(["UnstableTrait"])
@http(uri: "/RecursiveStructures", method: "POST")
operation RecursiveStructures {
- input: RecursiveStructuresInput,
- errors: [ValidationException]
+ input: RecursiveStructuresInput
+ errors: [
+ ValidationException
+ ]
}
apply RecursiveStructures @httpRequestTests([
{
- id: "RestJsonRecursiveStructuresValidate",
+ id: "RestJsonRecursiveStructuresValidate"
documentation: """
- Validation should work with recursive structures.""",
- protocol: restJson1,
+ Validation should work with recursive structures."""
+ protocol: restJson1
params: {
- "union" : {
- "union" : {
- "union" : { "string" : "abc" }
+ union: {
+ union: {
+ union: { string: "abc" }
}
}
- },
- method: "POST",
- uri: "/RecursiveStructures",
- headers: {
- "content-type": "application/json"
- },
+ }
+ method: "POST"
+ uri: "/RecursiveStructures"
+ headers: { "content-type": "application/json" }
body: """
- { "union" : {
- "union" : {
- "union" : { "string" : "abc" }
- }
- }
- }""",
+ { "union" : {
+ "union" : {
+ "union" : { "string" : "abc" }
+ }
+ }
+ }"""
bodyMediaType: "application/json"
}
])
apply RecursiveStructures @httpMalformedRequestTests([
{
- id: "RestJsonMalformedRecursiveStructures",
+ id: "RestJsonMalformedRecursiveStructures"
documentation: """
- When a value deeply nested in a recursive structure does not meet constraints,
- a 400 ValidationException is returned.""",
- protocol: restJson1,
+ When a value deeply nested in a recursive structure does not meet constraints,
+ a 400 ValidationException is returned."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/RecursiveStructures",
+ method: "POST"
+ uri: "/RecursiveStructures"
body: """
- { "union" : {
- "union" : {
- "union" : { "string" : "XYZ" }
- }
- }
- }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "union" : {
+ "union" : {
+ "union" : { "string" : "XYZ" }
+ }
+ }
+ }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/union/union/union/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
- "fieldList" : [{"message": "Value at '/union/union/union/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/union/union/union/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/union/union/union/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]",
+ "fieldList" : [{"message": "Value at '/union/union/union/string' failed to satisfy constraint: Member must satisfy enum value set: [abc, def]", "path": "/union/union/union/string"}]}"""
}
}
}
- },
+ }
])
structure RecursiveStructuresInput {
@@ -91,11 +87,11 @@ enum RecursiveEnumString {
}
union RecursiveUnionOne {
- string: RecursiveEnumString,
+ string: RecursiveEnumString
union: RecursiveUnionTwo
}
union RecursiveUnionTwo {
- string: RecursiveEnumString,
+ string: RecursiveEnumString
union: RecursiveUnionOne
}
diff --git a/smithy-aws-protocol-tests/model/restJson1/validation/sensitive-validation.smithy b/smithy-aws-protocol-tests/model/restJson1/validation/sensitive-validation.smithy
index 0f3b9ec3fd0..9a530fc0f78 100644
--- a/smithy-aws-protocol-tests/model/restJson1/validation/sensitive-validation.smithy
+++ b/smithy-aws-protocol-tests/model/restJson1/validation/sensitive-validation.smithy
@@ -3,47 +3,45 @@ $version: "2.0"
namespace aws.protocoltests.restjson.validation
use aws.protocols#restJson1
-use smithy.test#httpMalformedRequestTests
use smithy.framework#ValidationException
+use smithy.test#httpMalformedRequestTests
@suppress(["UnstableTrait"])
@http(uri: "/SensitiveValidation", method: "POST")
operation SensitiveValidation {
- input: SensitiveValidationInput,
- errors: [ValidationException]
+ input: SensitiveValidationInput
+ errors: [
+ ValidationException
+ ]
}
apply SensitiveValidation @httpMalformedRequestTests([
{
- id: "RestJsonMalformedPatternSensitiveString",
+ id: "RestJsonMalformedPatternSensitiveString"
documentation: """
- When a sensitive member fails validation, the resultant
- ValidationException will omit the value of the input.""",
- protocol: restJson1,
+ When a sensitive member fails validation, the resultant
+ ValidationException will omit the value of the input."""
+ protocol: restJson1
request: {
- method: "POST",
- uri: "/SensitiveValidation",
+ method: "POST"
+ uri: "/SensitiveValidation"
body: """
- { "string" : "ABC" }""",
- headers: {
- "content-type": "application/json"
- }
- },
+ { "string" : "ABC" }"""
+ headers: { "content-type": "application/json" }
+ }
response: {
- code: 400,
- headers: {
- "x-amzn-errortype": "ValidationException"
- },
+ code: 400
+ headers: { "x-amzn-errortype": "ValidationException" }
body: {
- mediaType: "application/json",
+ mediaType: "application/json"
assertion: {
contents: """
- { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$",
- "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$", "path": "/string"}]}"""
+ { "message" : "1 validation error detected. Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$",
+ "fieldList" : [{"message": "Value at '/string' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-m]+$", "path": "/string"}]}"""
}
}
}
- },
+ }
])
structure SensitiveValidationInput {
diff --git a/smithy-aws-protocol-tests/model/restXml/datetime-offsets.smithy b/smithy-aws-protocol-tests/model/restXml/datetime-offsets.smithy
index cb879538d98..a0585efde48 100644
--- a/smithy-aws-protocol-tests/model/restXml/datetime-offsets.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/datetime-offsets.smithy
@@ -16,39 +16,35 @@ operation DatetimeOffsets {
apply DatetimeOffsets @httpResponseTests([
{
- id: "RestXmlDateTimeWithNegativeOffset",
+ id: "RestXmlDateTimeWithNegativeOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: restXml,
- code: 200,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: restXml
+ code: 200
body: """
2019-12-16T22:48:18-01:00
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: { datetime: 1576540098 }
- },
+ }
{
- id: "RestXmlDateTimeWithPositiveOffset",
+ id: "RestXmlDateTimeWithPositiveOffset"
documentation: """
- Ensures that clients can correctly parse datetime (timestamps) with offsets""",
- protocol: restXml,
- code: 200,
+ Ensures that clients can correctly parse datetime (timestamps) with offsets"""
+ protocol: restXml
+ code: 200
body: """
2019-12-17T00:48:18+01:00
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: { datetime: 1576540098 }
- },
+ }
])
structure DatetimeOffsetsOutput {
diff --git a/smithy-aws-protocol-tests/model/restXml/document-lists.smithy b/smithy-aws-protocol-tests/model/restXml/document-lists.smithy
index b2dc28b992d..3db66bb18a2 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-lists.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-lists.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize lists in XML documents.
-
$version: "2.0"
$operationInputSuffix: "Request"
$operationOutputSuffix: "Response"
@@ -8,10 +7,8 @@ namespace aws.protocoltests.restxml
use aws.protocols#restXml
use aws.protocoltests.shared#BooleanList
-use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnumList
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#GreetingList
use aws.protocoltests.shared#IntegerList
use aws.protocoltests.shared#NestedStringList
use aws.protocoltests.shared#StringList
@@ -41,113 +38,114 @@ operation XmlLists {
apply XmlLists @httpRequestTests([
{
- id: "XmlLists",
- documentation: "Tests for XML list serialization",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlLists",
+ id: "XmlLists"
+ documentation: "Tests for XML list serialization"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlLists"
body: """
-
-
- foo
- bar
-
-
- foo
- bar
-
-
- 1
- 2
-
-
- true
- false
-
-
- 2014-04-29T18:30:38Z
- 2014-04-29T18:30:38Z
-
-
- Foo
- 0
-
-
- 1
- 2
-
-
-
- foo
- bar
-
-
- baz
- qux
-
-
-
- - foo
- - bar
-
- hi
- bye
- yep
- nope
-
- -
- 1
- 2
-
- -
- 3
- 4
-
-
-
- 5
- 6
-
-
- 7
- 8
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ foo
+ bar
+
+
+ foo
+ bar
+
+
+ 1
+ 2
+
+
+ true
+ false
+
+
+ 2014-04-29T18:30:38Z
+ 2014-04-29T18:30:38Z
+
+
+ Foo
+ 0
+
+
+ 1
+ 2
+
+
+
+ foo
+ bar
+
+
+ baz
+ qux
+
+
+
+ - foo
+ - bar
+
+ hi
+ bye
+ yep
+ nope
+
+ -
+ 1
+ 2
+
+ -
+ 3
+ 4
+
+
+
+ 5
+ 6
+
+
+ 7
+ 8
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- stringList: ["foo", "bar"],
- stringSet: ["foo", "bar"],
- integerList: [1, 2],
- booleanList: [true, false],
- timestampList: [1398796238, 1398796238],
- enumList: ["Foo", "0"],
- intEnumList: [1, 2],
- nestedStringList: [["foo", "bar"], ["baz", "qux"]],
- renamedListMembers: ["foo", "bar"],
- flattenedList: ["hi", "bye"],
- flattenedList2: ["yep", "nope"],
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ renamedListMembers: ["foo", "bar"]
+ flattenedList: ["hi", "bye"]
+ flattenedList2: ["yep", "nope"]
structureList: [
{
- a: "1",
- b: "2",
- },
+ a: "1"
+ b: "2"
+ }
{
- a: "3",
- b: "4",
+ a: "3"
+ b: "4"
}
- ],
+ ]
flattenedStructureList: [
{
- a: "5",
- b: "6",
- },
+ a: "5"
+ b: "6"
+ }
{
- a: "7",
- b: "8",
+ a: "7"
+ b: "8"
}
]
}
@@ -156,118 +154,119 @@ apply XmlLists @httpRequestTests([
apply XmlLists @httpResponseTests([
{
- id: "XmlLists",
- documentation: "Tests for XML list serialization",
- protocol: restXml,
- code: 200,
+ id: "XmlLists"
+ documentation: "Tests for XML list serialization"
+ protocol: restXml
+ code: 200
body: """
-
-
- foo
- bar
-
-
- foo
- bar
-
-
- 1
- 2
-
-
- true
- false
-
-
- 2014-04-29T18:30:38Z
- 2014-04-29T18:30:38Z
-
-
- Foo
- 0
-
-
- 1
- 2
-
-
-
- foo
- bar
-
-
- baz
- qux
-
-
-
- - foo
- - bar
-
- hi
- bye
- yep
- nope
- a
- b
- a
- b
-
- -
- 1
- 2
-
- -
- 3
- 4
-
-
-
- 5
- 6
-
-
- 7
- 8
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ foo
+ bar
+
+
+ foo
+ bar
+
+
+ 1
+ 2
+
+
+ true
+ false
+
+
+ 2014-04-29T18:30:38Z
+ 2014-04-29T18:30:38Z
+
+
+ Foo
+ 0
+
+
+ 1
+ 2
+
+
+
+ foo
+ bar
+
+
+ baz
+ qux
+
+
+
+ - foo
+ - bar
+
+ hi
+ bye
+ yep
+ nope
+ a
+ b
+ a
+ b
+
+ -
+ 1
+ 2
+
+ -
+ 3
+ 4
+
+
+
+ 5
+ 6
+
+
+ 7
+ 8
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- stringList: ["foo", "bar"],
- stringSet: ["foo", "bar"],
- integerList: [1, 2],
- booleanList: [true, false],
- timestampList: [1398796238, 1398796238],
- enumList: ["Foo", "0"],
- intEnumList: [1, 2],
- nestedStringList: [["foo", "bar"], ["baz", "qux"]],
- renamedListMembers: ["foo", "bar"],
- flattenedList: ["hi", "bye"],
- flattenedList2: ["yep", "nope"],
- flattenedListWithMemberNamespace: ["a", "b"],
- flattenedListWithNamespace: ["a", "b"],
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ renamedListMembers: ["foo", "bar"]
+ flattenedList: ["hi", "bye"]
+ flattenedList2: ["yep", "nope"]
+ flattenedListWithMemberNamespace: ["a", "b"]
+ flattenedListWithNamespace: ["a", "b"]
structureList: [
{
- a: "1",
- b: "2",
- },
+ a: "1"
+ b: "2"
+ }
{
- a: "3",
- b: "4",
+ a: "3"
+ b: "4"
}
- ],
+ ]
flattenedStructureList: [
{
- a: "5",
- b: "6",
- },
+ a: "5"
+ b: "6"
+ }
{
- a: "7",
- b: "8",
+ a: "7"
+ b: "8"
}
]
}
@@ -284,97 +283,93 @@ operation XmlEmptyLists {
apply XmlEmptyLists @httpRequestTests([
{
- id: "XmlEmptyLists",
- documentation: "Serializes Empty XML lists",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlEmptyLists",
+ id: "XmlEmptyLists"
+ documentation: "Serializes Empty XML lists"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlEmptyLists"
body: """
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- stringList: [],
- stringSet: [],
- },
- appliesTo: "client",
+ stringList: []
+ stringSet: []
+ }
+ appliesTo: "client"
}
])
apply XmlEmptyLists @httpResponseTests([
{
- id: "XmlEmptyLists",
- documentation: "Deserializes Empty XML lists",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptyLists"
+ documentation: "Deserializes Empty XML lists"
+ protocol: restXml
+ code: 200
body: """
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- stringList: [],
- stringSet: [],
- },
- appliesTo: "client",
+ stringList: []
+ stringSet: []
+ }
+ appliesTo: "client"
}
])
@mixin
structure XmlListsInputOutput {
- stringList: StringList,
+ stringList: StringList
- stringSet: StringSet,
+ stringSet: StringSet
- integerList: IntegerList,
+ integerList: IntegerList
- booleanList: BooleanList,
+ booleanList: BooleanList
- timestampList: TimestampList,
+ timestampList: TimestampList
- enumList: FooEnumList,
+ enumList: FooEnumList
- intEnumList: IntegerEnumList,
+ intEnumList: IntegerEnumList
- nestedStringList: NestedStringList,
+ nestedStringList: NestedStringList
@xmlName("renamed")
- renamedListMembers: RenamedListMembers,
+ renamedListMembers: RenamedListMembers
@xmlFlattened
// The xmlname on the targeted list is ignored, and the member name is used.
- flattenedList: RenamedListMembers,
+ flattenedList: RenamedListMembers
@xmlName("customName")
@xmlFlattened
// the xmlName trait on the targeted list's member is ignored when
// serializing flattened lists in structures.
- flattenedList2: RenamedListMembers,
+ flattenedList2: RenamedListMembers
// The XML namespace of the flattened list's member is used, and
// list's XML namespace is disregarded.
@xmlFlattened
- flattenedListWithMemberNamespace: ListWithMemberNamespace,
+ flattenedListWithMemberNamespace: ListWithMemberNamespace
// Again, the XML namespace of the flattened list is ignored.
// The namespace of the member is used, which is empty, so
// no xmlns attribute appears on the serialized XML.
@xmlFlattened
- flattenedListWithNamespace: ListWithNamespace,
+ flattenedListWithNamespace: ListWithNamespace
@xmlName("myStructureList")
- structureList: StructureList,
+ structureList: StructureList
@xmlFlattened
flattenedStructureList: StructureList
@@ -382,29 +377,29 @@ structure XmlListsInputOutput {
list RenamedListMembers {
@xmlName("item")
- member: String,
+ member: String
}
list StructureList {
@xmlName("item")
- member: StructureListMember,
+ member: StructureListMember
}
structure StructureListMember {
@xmlName("value")
- a: String,
+ a: String
@xmlName("other")
- b: String,
+ b: String
}
@xmlNamespace(uri: "https://xml-list.example.com")
list ListWithMemberNamespace {
@xmlNamespace(uri: "https://xml-member.example.com")
- member: String,
+ member: String
}
@xmlNamespace(uri: "https://xml-list.example.com")
list ListWithNamespace {
- member: String,
+ member: String
}
diff --git a/smithy-aws-protocol-tests/model/restXml/document-maps.smithy b/smithy-aws-protocol-tests/model/restXml/document-maps.smithy
index 0062b98b9cf..07de269359d 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-maps.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-maps.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize maps in XML payloads.
-
$version: "2.0"
$operationInputSuffix: "Request"
$operationOutputSuffix: "Response"
@@ -25,41 +24,35 @@ operation XmlMaps {
apply XmlMaps @httpRequestTests([
{
- id: "XmlMaps",
- documentation: "Tests for XML map serialization",
- protocol: restXml,
- method: "POST",
- uri: "/XmlMaps",
+ id: "XmlMaps"
+ documentation: "Tests for XML map serialization"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlMaps"
body: """
-
-
-
- foo
-
- there
-
-
-
- baz
-
- bye
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ foo
+
+ there
+
+
+
+ baz
+
+ bye
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {
- foo: {
- hi: "there"
- },
- baz: {
- hi: "bye"
- }
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
}
@@ -67,40 +60,34 @@ apply XmlMaps @httpRequestTests([
apply XmlMaps @httpResponseTests([
{
- id: "XmlMaps",
- documentation: "Tests for XML map serialization",
- protocol: restXml,
- code: 200,
+ id: "XmlMaps"
+ documentation: "Tests for XML map serialization"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- foo
-
- there
-
-
-
- baz
-
- bye
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ foo
+
+ there
+
+
+
+ baz
+
+ bye
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {
- foo: {
- hi: "there"
- },
- baz: {
- hi: "bye"
- }
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
}
@@ -119,70 +106,64 @@ operation XmlEmptyMaps {
apply XmlEmptyMaps @httpRequestTests([
{
- id: "XmlEmptyMaps",
- documentation: "Serializes Empty XML maps",
- protocol: restXml,
- method: "POST",
- uri: "/XmlEmptyMaps",
+ id: "XmlEmptyMaps"
+ documentation: "Serializes Empty XML maps"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlEmptyMaps"
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {}
- },
+ }
appliesTo: "client"
}
])
apply XmlEmptyMaps @httpResponseTests([
{
- id: "XmlEmptyMaps",
- documentation: "Deserializes Empty XML maps",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptyMaps"
+ documentation: "Deserializes Empty XML maps"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {}
- },
- appliesTo: "client",
- },
+ }
+ appliesTo: "client"
+ }
{
- id: "XmlEmptySelfClosedMaps",
- documentation: "Deserializes Empty Self-closed XML maps",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptySelfClosedMaps"
+ documentation: "Deserializes Empty Self-closed XML maps"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {}
- },
- appliesTo: "client",
+ }
+ appliesTo: "client"
}
])
map XmlMapsInputOutputMap {
- key: String,
+ key: String
value: GreetingStruct
}
@@ -199,41 +180,35 @@ operation XmlMapsXmlName {
apply XmlMapsXmlName @httpRequestTests([
{
- id: "XmlMapsXmlName",
- documentation: "Serializes XML maps that have xmlName on members",
- protocol: restXml,
- method: "POST",
- uri: "/XmlMapsXmlName",
+ id: "XmlMapsXmlName"
+ documentation: "Serializes XML maps that have xmlName on members"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlMapsXmlName"
body: """
-
-
-
- foo
-
- there
-
-
-
- baz
-
- bye
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ foo
+
+ there
+
+
+
+ baz
+
+ bye
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {
- foo: {
- hi: "there"
- },
- baz: {
- hi: "bye"
- }
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
}
@@ -241,40 +216,34 @@ apply XmlMapsXmlName @httpRequestTests([
apply XmlMapsXmlName @httpResponseTests([
{
- id: "XmlMapsXmlName",
- documentation: "Serializes XML lists",
- protocol: restXml,
- code: 200,
+ id: "XmlMapsXmlName"
+ documentation: "Serializes XML lists"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- foo
-
- there
-
-
-
- baz
-
- bye
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ foo
+
+ there
+
+
+
+ baz
+
+ bye
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
myMap: {
- foo: {
- hi: "there"
- },
- baz: {
- hi: "bye"
- }
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
}
@@ -282,7 +251,7 @@ apply XmlMapsXmlName @httpResponseTests([
map XmlMapsXmlNameInputOutputMap {
@xmlName("Attribute")
- key: String,
+ key: String
@xmlName("Setting")
value: GreetingStruct
@@ -295,6 +264,7 @@ operation FlattenedXmlMap {
@xmlFlattened
myMap: FooEnumMap
}
+
output := {
@xmlFlattened
myMap: FooEnumMap
@@ -303,61 +273,51 @@ operation FlattenedXmlMap {
apply FlattenedXmlMap @httpRequestTests([
{
- id: "FlattenedXmlMap",
- documentation: "Serializes flattened XML maps in requests",
- protocol: restXml,
- method: "POST",
- uri: "/FlattenedXmlMap",
+ id: "FlattenedXmlMap"
+ documentation: "Serializes flattened XML maps in requests"
+ protocol: restXml
+ method: "POST"
+ uri: "/FlattenedXmlMap"
body: """
-
-
- foo
- Foo
-
-
- baz
- Baz
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ foo
+ Foo
+
+
+ baz
+ Baz
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- foo: "Foo",
- baz: "Baz"
- }
+ myMap: { foo: "Foo", baz: "Baz" }
}
}
])
apply FlattenedXmlMap @httpResponseTests([
{
- id: "FlattenedXmlMap",
- documentation: "Serializes flattened XML maps in responses",
- protocol: restXml,
- code: 200,
+ id: "FlattenedXmlMap"
+ documentation: "Serializes flattened XML maps in responses"
+ protocol: restXml
+ code: 200
body: """
-
-
- foo
- Foo
-
-
- baz
- Baz
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ foo
+ Foo
+
+
+ baz
+ Baz
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- foo: "Foo",
- baz: "Baz"
- }
+ myMap: { foo: "Foo", baz: "Baz" }
}
}
])
@@ -368,8 +328,9 @@ operation FlattenedXmlMapWithXmlName {
input := {
@xmlFlattened
@xmlName("KVP")
- myMap: FlattenedXmlMapWithXmlNameInputOutputMap,
+ myMap: FlattenedXmlMapWithXmlNameInputOutputMap
}
+
output := {
@xmlFlattened
@xmlName("KVP")
@@ -379,71 +340,61 @@ operation FlattenedXmlMapWithXmlName {
apply FlattenedXmlMapWithXmlName @httpRequestTests([
{
- id: "FlattenedXmlMapWithXmlName",
- documentation: "Serializes flattened XML maps in requests that have xmlName on members",
- protocol: restXml,
- method: "POST",
- uri: "/FlattenedXmlMapWithXmlName",
+ id: "FlattenedXmlMapWithXmlName"
+ documentation: "Serializes flattened XML maps in requests that have xmlName on members"
+ protocol: restXml
+ method: "POST"
+ uri: "/FlattenedXmlMapWithXmlName"
body: """
-
-
- a
- A
-
-
- b
- B
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ a
+ A
+
+
+ b
+ B
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
apply FlattenedXmlMapWithXmlName @httpResponseTests([
{
- id: "FlattenedXmlMapWithXmlName",
- documentation: "Serializes flattened XML maps in responses that have xmlName on members",
- protocol: restXml,
- code: 200,
+ id: "FlattenedXmlMapWithXmlName"
+ documentation: "Serializes flattened XML maps in responses that have xmlName on members"
+ protocol: restXml
+ code: 200
body: """
-
-
- a
- A
-
-
- b
- B
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ a
+ A
+
+
+ b
+ B
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
map FlattenedXmlMapWithXmlNameInputOutputMap {
@xmlName("K")
- key: String,
+ key: String
@xmlName("V")
- value: String,
+ value: String
}
/// Flattened maps with @xmlNamespace and @xmlName
@@ -454,30 +405,25 @@ operation FlattenedXmlMapWithXmlNamespace {
apply FlattenedXmlMapWithXmlNamespace @httpResponseTests([
{
- id: "RestXmlFlattenedXmlMapWithXmlNamespace",
- documentation: "Serializes flattened XML maps in responses that have xmlNamespace and xmlName on members",
- protocol: restXml,
- code: 200,
+ id: "RestXmlFlattenedXmlMapWithXmlNamespace"
+ documentation: "Serializes flattened XML maps in responses that have xmlNamespace and xmlName on members"
+ protocol: restXml
+ code: 200
body: """
-
-
- a
- A
-
-
- b
- B
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ a
+ A
+
+
+ b
+ B
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
@@ -486,17 +432,17 @@ structure FlattenedXmlMapWithXmlNamespaceOutput {
@xmlFlattened
@xmlName("KVP")
@xmlNamespace(uri: "https://the-member.example.com")
- myMap: FlattenedXmlMapWithXmlNamespaceOutputMap,
+ myMap: FlattenedXmlMapWithXmlNamespaceOutputMap
}
map FlattenedXmlMapWithXmlNamespaceOutputMap {
@xmlName("K")
@xmlNamespace(uri: "https://the-key.example.com")
- key: String,
+ key: String
@xmlName("V")
@xmlNamespace(uri: "https://the-value.example.com")
- value: String,
+ value: String
}
@http(uri: "/NestedXmlMaps", method: "POST")
@@ -507,24 +453,24 @@ operation NestedXmlMaps {
@mixin
structure NestedXmlMapsInputOutput {
- nestedMap: NestedMap,
+ nestedMap: NestedMap
@xmlFlattened
- flatNestedMap: NestedMap,
+ flatNestedMap: NestedMap
}
map NestedMap {
- key: String,
- value: FooEnumMap,
+ key: String
+ value: FooEnumMap
}
apply NestedXmlMaps @httpRequestTests([
{
- id: "NestedXmlMapRequest",
- documentation: "Tests requests with nested maps.",
- protocol: restXml,
- method: "POST",
- uri: "/NestedXmlMaps",
+ id: "NestedXmlMapRequest"
+ documentation: "Tests requests with nested maps."
+ protocol: restXml
+ method: "POST"
+ uri: "/NestedXmlMaps"
body: """
@@ -538,27 +484,23 @@ apply NestedXmlMaps @httpRequestTests([
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nestedMap: {
- foo: {
- bar: "Bar",
- }
+ foo: { bar: "Bar" }
}
}
- },
+ }
{
- id: "FlatNestedXmlMapRequest",
+ id: "FlatNestedXmlMapRequest"
documentation: """
Tests requests with nested flat maps. Since maps can only be
- flattened when they're structure members, only the outer map is flat.""",
- protocol: restXml,
- method: "POST",
- uri: "/NestedXmlMaps",
+ flattened when they're structure members, only the outer map is flat."""
+ protocol: restXml
+ method: "POST"
+ uri: "/NestedXmlMaps"
body: """
@@ -570,27 +512,23 @@ apply NestedXmlMaps @httpRequestTests([
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
flatNestedMap: {
- foo: {
- bar: "Bar",
- }
+ foo: { bar: "Bar" }
}
}
- },
+ }
])
apply NestedXmlMaps @httpResponseTests([
{
- id: "NestedXmlMapResponse",
- documentation: "Tests responses with nested maps.",
- protocol: restXml,
- code: 200,
+ id: "NestedXmlMapResponse"
+ documentation: "Tests responses with nested maps."
+ protocol: restXml
+ code: 200
body: """
@@ -604,26 +542,22 @@ apply NestedXmlMaps @httpResponseTests([
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nestedMap: {
- foo: {
- bar: "Bar",
- }
+ foo: { bar: "Bar" }
}
}
- },
+ }
{
- id: "FlatNestedXmlMapResponse",
+ id: "FlatNestedXmlMapResponse"
documentation: """
Tests responses with nested flat maps. Since maps can only be
- flattened when they're structure members, only the outer map is flat.""",
- protocol: restXml,
- code: 200,
+ flattened when they're structure members, only the outer map is flat."""
+ protocol: restXml
+ code: 200
body: """
@@ -635,19 +569,15 @@ apply NestedXmlMaps @httpResponseTests([
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
flatNestedMap: {
- foo: {
- bar: "Bar",
- }
+ foo: { bar: "Bar" }
}
}
- },
+ }
])
/// Nested Xml Maps with key/values with @xmlName
@@ -661,135 +591,115 @@ structure NestedXmlMapWithXmlNameInputOutput {
nestedXmlMapWithXmlNameMap: NestedXmlMapWithXmlNameMap
}
-map NestedXmlMapWithXmlNameMap{
+map NestedXmlMapWithXmlNameMap {
@xmlName("OuterKey")
key: String
-
+
value: NestedXmlMapWithXmlNameInnerMap
}
-map NestedXmlMapWithXmlNameInnerMap{
+map NestedXmlMapWithXmlNameInnerMap {
@xmlName("InnerKey")
key: String
-
+
@xmlName("InnerValue")
value: String
}
apply NestedXmlMapWithXmlName @httpRequestTests([
{
- id : "NestedXmlMapWithXmlNameSerializes",
- documentation : "Serializes nested XML Maps in requests that have xmlName on members",
- protocol: restXml,
- method: "POST",
- uri: "/NestedXmlMapWithXmlName",
+ id: "NestedXmlMapWithXmlNameSerializes"
+ documentation: "Serializes nested XML Maps in requests that have xmlName on members"
+ protocol: restXml
+ method: "POST"
+ uri: "/NestedXmlMapWithXmlName"
body: """
-
-
-
- foo
-
-
- bar
- Baz
-
-
- fizz
- Buzz
-
-
-
-
- qux
-
-
- foobar
- Bar
-
-
- fizzbuzz
- Buzz
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+
+ foo
+
+
+ bar
+ Baz
+
+
+ fizz
+ Buzz
+
+
+
+
+ qux
+
+
+ foobar
+ Bar
+
+
+ fizzbuzz
+ Buzz
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nestedXmlMapWithXmlNameMap: {
- foo: {
- bar: "Baz",
- fizz: "Buzz"
- },
- qux: {
- foobar: "Bar",
- fizzbuzz: "Buzz"
- }
+ foo: { bar: "Baz", fizz: "Buzz" }
+ qux: { foobar: "Bar", fizzbuzz: "Buzz" }
}
}
}
-
-
-
-
])
apply NestedXmlMapWithXmlName @httpResponseTests([
{
- id: "NestedXmlMapWithXmlNameDeserializes",
- documentation: "Serializes nested XML maps in responses that have xmlName on members",
- protocol: restXml,
- code: 200,
+ id: "NestedXmlMapWithXmlNameDeserializes"
+ documentation: "Serializes nested XML maps in responses that have xmlName on members"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- foo
-
-
- bar
- Baz
-
-
- fizz
- Buzz
-
-
-
-
- qux
-
-
- foobar
- Bar
-
-
- fizzbuzz
- Buzz
-
-
-
-
-
- """
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- }
+
+
+
+ foo
+
+
+ bar
+ Baz
+
+
+ fizz
+ Buzz
+
+
+
+
+ qux
+
+
+ foobar
+ Bar
+
+
+ fizzbuzz
+ Buzz
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nestedXmlMapWithXmlNameMap: {
- foo: {
- bar: "Baz",
- fizz: "Buzz"
- },
- qux: {
- foobar: "Bar",
- fizzbuzz: "Buzz"
- }
+ foo: { bar: "Baz", fizz: "Buzz" }
+ qux: { foobar: "Bar", fizzbuzz: "Buzz" }
}
}
}
@@ -804,65 +714,55 @@ operation XmlMapWithXmlNamespace {
apply XmlMapWithXmlNamespace @httpRequestTests([
{
- id: "RestXmlXmlMapWithXmlNamespace",
- documentation: "Serializes XML maps in requests that have xmlNamespace and xmlName on members",
- protocol: restXml,
- method: "POST",
- uri: "/XmlMapWithXmlNamespace",
+ id: "RestXmlXmlMapWithXmlNamespace"
+ documentation: "Serializes XML maps in requests that have xmlNamespace and xmlName on members"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlMapWithXmlNamespace"
body: """
-
-
-
- a
- A
-
-
- b
- B
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ a
+ A
+
+
+ b
+ B
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
apply XmlMapWithXmlNamespace @httpResponseTests([
{
- id: "RestXmlXmlMapWithXmlNamespace",
- documentation: "Serializes XML maps in responses that have xmlNamespace and xmlName on members",
- protocol: restXml,
- code: 200,
+ id: "RestXmlXmlMapWithXmlNamespace"
+ documentation: "Serializes XML maps in responses that have xmlNamespace and xmlName on members"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- a
- A
-
-
- b
- B
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+
+ a
+ A
+
+
+ b
+ B
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- myMap: {
- a: "A",
- b: "B",
- }
+ myMap: { a: "A", b: "B" }
}
}
])
@@ -871,15 +771,15 @@ apply XmlMapWithXmlNamespace @httpResponseTests([
structure XmlMapWithXmlNamespaceInputOutput {
@xmlName("KVP")
@xmlNamespace(uri: "https://the-member.example.com")
- myMap: XmlMapWithXmlNamespaceInputOutputMap,
+ myMap: XmlMapWithXmlNamespaceInputOutputMap
}
map XmlMapWithXmlNamespaceInputOutputMap {
@xmlName("K")
@xmlNamespace(uri: "https://the-key.example.com")
- key: String,
+ key: String
@xmlName("V")
@xmlNamespace(uri: "https://the-value.example.com")
- value: String,
+ value: String
}
diff --git a/smithy-aws-protocol-tests/model/restXml/document-structs.smithy b/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
index b06dcf8d0fd..c6a3fa1850a 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-structs.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that serialize synthesized XML documents
// in the payload of HTTP requests and responses.
-
$version: "2.0"
$operationInputSuffix: "Request"
$operationOutputSuffix: "Response"
@@ -12,13 +11,13 @@ use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#FooEnum
use aws.protocoltests.shared#FooEnumList
-use aws.protocoltests.shared#FooEnumSet
use aws.protocoltests.shared#FooEnumMap
+use aws.protocoltests.shared#FooEnumSet
+use aws.protocoltests.shared#HttpDate
use aws.protocoltests.shared#IntegerEnum
use aws.protocoltests.shared#IntegerEnumList
-use aws.protocoltests.shared#IntegerEnumSet
use aws.protocoltests.shared#IntegerEnumMap
-use aws.protocoltests.shared#HttpDate
+use aws.protocoltests.shared#IntegerEnumSet
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
@@ -33,398 +32,299 @@ operation SimpleScalarProperties {
apply SimpleScalarProperties @httpRequestTests([
{
- id: "SimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "SimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- string
- true
- false
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "string",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- }
- },
+
+ string
+ true
+ false
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "string", trueBooleanValue: true, falseBooleanValue: false, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
{
- id: "SimpleScalarPropertiesWithEscapedCharacter",
- documentation: "Serializes string with escaping",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "SimpleScalarPropertiesWithEscapedCharacter"
+ documentation: "Serializes string with escaping"
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- <string>
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "",
- }
- },
+
+ <string>
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "" }
+ }
{
- id: "SimpleScalarPropertiesWithWhiteSpace",
- documentation: "Serializes string containing white space",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "SimpleScalarPropertiesWithWhiteSpace"
+ documentation: "Serializes string containing white space"
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- string with white space
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: " string with white space ",
- }
- },
+
+ string with white space
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: " string with white space " }
+ }
{
- id: "SimpleScalarPropertiesPureWhiteSpace",
- documentation: "Serializes string containing exclusively whitespace",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "SimpleScalarPropertiesPureWhiteSpace"
+ documentation: "Serializes string containing exclusively whitespace"
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: " ",
- }
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: " " }
+ }
{
- id: "RestXmlSupportsNaNFloatInputs",
- documentation: "Supports handling NaN float values.",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "RestXmlSupportsNaNFloatInputs"
+ documentation: "Supports handling NaN float values."
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- NaN
- NaN
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+
+ NaN
+ NaN
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "RestXmlSupportsInfinityFloatInputs",
- documentation: "Supports handling Infinity float values.",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "RestXmlSupportsInfinityFloatInputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- Infinity
- Infinity
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+
+ Infinity
+ Infinity
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "RestXmlSupportsNegativeInfinityFloatInputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "RestXmlSupportsNegativeInfinityFloatInputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- -Infinity
- -Infinity
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+
+ -Infinity
+ -Infinity
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
apply SimpleScalarProperties @httpResponseTests([
{
- id: "SimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- code: 200,
+ id: "SimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ code: 200
body: """
-
- string
- true
- false
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "string",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- }
- },
+
+ string
+ true
+ false
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "string", trueBooleanValue: true, falseBooleanValue: false, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
{
- id: "SimpleScalarPropertiesComplexEscapes",
+ id: "SimpleScalarPropertiesComplexEscapes"
documentation: """
- Serializes string with escaping.
+ Serializes string with escaping.
- This validates the three escape types: literal, decimal and hexadecimal. It also validates that unescaping properly
- handles the case where unescaping an & produces a newly formed escape sequence (this should not be re-unescaped).
+ This validates the three escape types: literal, decimal and hexadecimal. It also validates that unescaping properly
+ handles the case where unescaping an & produces a newly formed escape sequence (this should not be re-unescaped).
- Servers may produce different output, this test is designed different unescapes clients must handle
- """,
- protocol: restXml,
- code: 200,
+ Servers may produce different output, this test is designed different unescapes clients must handle
+ """
+ protocol: restXml
+ code: 200
body: """
-
- escaped data: <
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "escaped data: <\r\n",
- },
- appliesTo: "client",
- },
+
+ escaped data: <
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "escaped data: <\r\n" }
+ appliesTo: "client"
+ }
{
- id: "SimpleScalarPropertiesWithEscapedCharacter",
- documentation: "Serializes string with escaping",
- protocol: restXml,
- code: 200,
+ id: "SimpleScalarPropertiesWithEscapedCharacter"
+ documentation: "Serializes string with escaping"
+ protocol: restXml
+ code: 200
body: """
-
- <string>
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "",
- }
- },
+
+ <string>
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "" }
+ }
{
- id: "SimpleScalarPropertiesWithXMLPreamble",
- documentation: "Serializes simple scalar properties with xml preamble, comments and CDATA",
- protocol: restXml,
- code: 200,
+ id: "SimpleScalarPropertiesWithXMLPreamble"
+ documentation: "Serializes simple scalar properties with xml preamble, comments and CDATA"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- string
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: "string",
- }
- },
+
+
+
+ string
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: "string" }
+ }
{
- id: "SimpleScalarPropertiesWithWhiteSpace",
- documentation: "Serializes string containing white space",
- protocol: restXml,
- code: 200,
+ id: "SimpleScalarPropertiesWithWhiteSpace"
+ documentation: "Serializes string containing white space"
+ protocol: restXml
+ code: 200
body: """
-
-
- string with white space
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: " string with white space ",
- }
- },
+
+
+ string with white space
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: " string with white space " }
+ }
{
- id: "SimpleScalarPropertiesPureWhiteSpace",
- documentation: "Serializes string containing white space",
- protocol: restXml,
- code: 200,
+ id: "SimpleScalarPropertiesPureWhiteSpace"
+ documentation: "Serializes string containing white space"
+ protocol: restXml
+ code: 200
body: """
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
- params: {
- foo: "Foo",
- stringValue: " ",
- }
- },
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
+ params: { foo: "Foo", stringValue: " " }
+ }
{
- id: "RestXmlSupportsNaNFloatOutputs",
- documentation: "Supports handling NaN float values.",
- protocol: restXml,
- code: 200,
+ id: "RestXmlSupportsNaNFloatOutputs"
+ documentation: "Supports handling NaN float values."
+ protocol: restXml
+ code: 200
body: """
-
- NaN
- NaN
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- floatValue: "NaN",
- doubleValue: "NaN",
- }
- },
+
+ NaN
+ NaN
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { floatValue: "NaN", doubleValue: "NaN" }
+ }
{
- id: "RestXmlSupportsInfinityFloatOutputs",
- documentation: "Supports handling Infinity float values.",
- protocol: restXml,
- code: 200,
+ id: "RestXmlSupportsInfinityFloatOutputs"
+ documentation: "Supports handling Infinity float values."
+ protocol: restXml
+ code: 200
body: """
-
- Infinity
- Infinity
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- floatValue: "Infinity",
- doubleValue: "Infinity",
- }
- },
+
+ Infinity
+ Infinity
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { floatValue: "Infinity", doubleValue: "Infinity" }
+ }
{
- id: "RestXmlSupportsNegativeInfinityFloatOutputs",
- documentation: "Supports handling -Infinity float values.",
- protocol: restXml,
- code: 200,
+ id: "RestXmlSupportsNegativeInfinityFloatOutputs"
+ documentation: "Supports handling -Infinity float values."
+ protocol: restXml
+ code: 200
body: """
-
- -Infinity
- -Infinity
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- floatValue: "-Infinity",
- doubleValue: "-Infinity",
- }
- },
+
+ -Infinity
+ -Infinity
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { floatValue: "-Infinity", doubleValue: "-Infinity" }
+ }
])
@mixin
structure SimpleScalarPropertiesInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
+
+ stringValue: String
+
+ trueBooleanValue: Boolean
+
+ falseBooleanValue: Boolean
+
+ byteValue: Byte
+
+ shortValue: Short
+
+ integerValue: Integer
- stringValue: String,
- trueBooleanValue: Boolean,
- falseBooleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
+ longValue: Long
+
+ floatValue: Float
@xmlName("DoubleDribble")
- doubleValue: Double,
+ doubleValue: Double
}
// This example serializes empty string in the top level XML document.
@@ -441,66 +341,54 @@ operation XmlEmptyStrings {
}
apply XmlEmptyStrings @httpRequestTests([
- {
- id: "XmlEmptyStrings",
- documentation: "Serializes xml empty strings",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlEmptyStrings",
- body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
- params: {
- emptyString: "",
- },
- appliesTo: "client",
- }
+ {
+ id: "XmlEmptyStrings"
+ documentation: "Serializes xml empty strings"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlEmptyStrings"
+ body: """
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { emptyString: "" }
+ appliesTo: "client"
+ }
])
apply XmlEmptyStrings @httpResponseTests([
{
- id: "XmlEmptyStrings",
- documentation: "Deserializes xml empty strings",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptyStrings"
+ documentation: "Deserializes xml empty strings"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- emptyString: ""
- },
- appliesTo: "client",
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { emptyString: "" }
+ appliesTo: "client"
+ }
{
- id: "XmlEmptySelfClosedStrings",
- documentation: "Empty self closed string are deserialized as empty string",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptySelfClosedStrings"
+ documentation: "Empty self closed string are deserialized as empty string"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- emptyString: ""
- },
- appliesTo: "client",
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { emptyString: "" }
+ appliesTo: "client"
}
])
@@ -517,44 +405,36 @@ operation XmlBlobs {
apply XmlBlobs @httpRequestTests([
{
- id: "XmlBlobs",
- documentation: "Blobs are base64 encoded",
- protocol: restXml,
- method: "POST",
- uri: "/XmlBlobs",
+ id: "XmlBlobs"
+ documentation: "Blobs are base64 encoded"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlBlobs"
body: """
-
- dmFsdWU=
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- data: "value"
- }
+
+ dmFsdWU=
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { data: "value" }
}
])
apply XmlBlobs @httpResponseTests([
{
- id: "XmlBlobs",
- documentation: "Blobs are base64 encoded",
- protocol: restXml,
- code: 200,
+ id: "XmlBlobs"
+ documentation: "Blobs are base64 encoded"
+ protocol: restXml
+ code: 200
body: """
-
- dmFsdWU=
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- data: "value"
- }
+
+ dmFsdWU=
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { data: "value" }
}
])
@@ -572,42 +452,34 @@ operation XmlEmptyBlobs {
apply XmlEmptyBlobs @httpResponseTests([
{
- id: "XmlEmptyBlobs",
- documentation: "Empty blobs are deserialized as empty string",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptyBlobs"
+ documentation: "Empty blobs are deserialized as empty string"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- data: ""
- },
- appliesTo: "client",
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { data: "" }
+ appliesTo: "client"
+ }
{
- id: "XmlEmptySelfClosedBlobs",
- documentation: "Empty self closed blobs are deserialized as empty string",
- protocol: restXml,
- code: 200,
+ id: "XmlEmptySelfClosedBlobs"
+ documentation: "Empty self closed blobs are deserialized as empty string"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- data: ""
- },
- appliesTo: "client",
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { data: "" }
+ appliesTo: "client"
}
])
@@ -622,287 +494,231 @@ operation XmlTimestamps {
apply XmlTimestamps @httpRequestTests([
{
- id: "XmlTimestamps",
- documentation: "Tests how normal timestamps are serialized",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestamps"
+ documentation: "Tests how normal timestamps are serialized"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- 2014-04-29T18:30:38Z
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- normal: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { normal: 1398796238 }
+ }
{
- id: "XmlTimestampsWithDateTimeFormat",
- documentation: "Ensures that the timestampFormat of date-time works like normal timestamps",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestampsWithDateTimeFormat"
+ documentation: "Ensures that the timestampFormat of date-time works like normal timestamps"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- 2014-04-29T18:30:38Z
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- dateTime: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { dateTime: 1398796238 }
+ }
{
- id: "XmlTimestampsWithDateTimeOnTargetFormat",
- documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestampsWithDateTimeOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- 2014-04-29T18:30:38Z
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- dateTimeOnTarget: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { dateTimeOnTarget: 1398796238 }
+ }
{
- id: "XmlTimestampsWithEpochSecondsFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds works",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestampsWithEpochSecondsFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds works"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- 1398796238
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- epochSeconds: 1398796238
- }
- },
+
+ 1398796238
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { epochSeconds: 1398796238 }
+ }
{
- id: "XmlTimestampsWithEpochSecondsOnTargetFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestampsWithEpochSecondsOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- 1398796238
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- epochSecondsOnTarget: 1398796238
- }
- },
+
+ 1398796238
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { epochSecondsOnTarget: 1398796238 }
+ }
{
- id: "XmlTimestampsWithHttpDateFormat",
- documentation: "Ensures that the timestampFormat of http-date works",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestampsWithHttpDateFormat"
+ documentation: "Ensures that the timestampFormat of http-date works"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- Tue, 29 Apr 2014 18:30:38 GMT
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- httpDate: 1398796238
- }
- },
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { httpDate: 1398796238 }
+ }
{
- id: "XmlTimestampsWithHttpDateOnTargetFormat",
- documentation: "Ensures that the timestampFormat of http-date on the target shape works",
- protocol: restXml,
- method: "POST",
- uri: "/XmlTimestamps",
+ id: "XmlTimestampsWithHttpDateOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlTimestamps"
body: """
-
- Tue, 29 Apr 2014 18:30:38 GMT
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- httpDateOnTarget: 1398796238
- }
- },
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { httpDateOnTarget: 1398796238 }
+ }
])
apply XmlTimestamps @httpResponseTests([
{
- id: "XmlTimestamps",
- documentation: "Tests how normal timestamps are serialized",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestamps"
+ documentation: "Tests how normal timestamps are serialized"
+ protocol: restXml
+ code: 200
body: """
-
- 2014-04-29T18:30:38Z
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- normal: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { normal: 1398796238 }
+ }
{
- id: "XmlTimestampsWithDateTimeFormat",
- documentation: "Ensures that the timestampFormat of date-time works like normal timestamps",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestampsWithDateTimeFormat"
+ documentation: "Ensures that the timestampFormat of date-time works like normal timestamps"
+ protocol: restXml
+ code: 200
body: """
-
- 2014-04-29T18:30:38Z
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- dateTime: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { dateTime: 1398796238 }
+ }
{
- id: "XmlTimestampsWithDateTimeOnTargetFormat",
- documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestampsWithDateTimeOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps"
+ protocol: restXml
+ code: 200
body: """
-
- 2014-04-29T18:30:38Z
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- dateTimeOnTarget: 1398796238
- }
- },
+
+ 2014-04-29T18:30:38Z
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { dateTimeOnTarget: 1398796238 }
+ }
{
- id: "XmlTimestampsWithEpochSecondsFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds works",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestampsWithEpochSecondsFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds works"
+ protocol: restXml
+ code: 200
body: """
-
- 1398796238
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- epochSeconds: 1398796238
- }
- },
+
+ 1398796238
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { epochSeconds: 1398796238 }
+ }
{
- id: "XmlTimestampsWithEpochSecondsOnTargetFormat",
- documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestampsWithEpochSecondsOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of epoch-seconds on the target shape works"
+ protocol: restXml
+ code: 200
body: """
-
- 1398796238
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- epochSecondsOnTarget: 1398796238
- }
- },
+
+ 1398796238
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { epochSecondsOnTarget: 1398796238 }
+ }
{
- id: "XmlTimestampsWithHttpDateFormat",
- documentation: "Ensures that the timestampFormat of http-date works",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestampsWithHttpDateFormat"
+ documentation: "Ensures that the timestampFormat of http-date works"
+ protocol: restXml
+ code: 200
body: """
-
- Tue, 29 Apr 2014 18:30:38 GMT
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- httpDate: 1398796238
- }
- },
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { httpDate: 1398796238 }
+ }
{
- id: "XmlTimestampsWithHttpDateOnTargetFormat",
- documentation: "Ensures that the timestampFormat of http-date on the target shape works",
- protocol: restXml,
- code: 200,
+ id: "XmlTimestampsWithHttpDateOnTargetFormat"
+ documentation: "Ensures that the timestampFormat of http-date on the target shape works"
+ protocol: restXml
+ code: 200
body: """
-
- Tue, 29 Apr 2014 18:30:38 GMT
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- httpDateOnTarget: 1398796238
- }
- },
+
+ Tue, 29 Apr 2014 18:30:38 GMT
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { httpDateOnTarget: 1398796238 }
+ }
])
@mixin
structure XmlTimestampsInputOutput {
- normal: Timestamp,
+ normal: Timestamp
@timestampFormat("date-time")
- dateTime: Timestamp,
+ dateTime: Timestamp
- dateTimeOnTarget: DateTime,
+ dateTimeOnTarget: DateTime
@timestampFormat("epoch-seconds")
- epochSeconds: Timestamp,
+ epochSeconds: Timestamp
- epochSecondsOnTarget: EpochSeconds,
+ epochSecondsOnTarget: EpochSeconds
@timestampFormat("http-date")
- httpDate: Timestamp,
+ httpDate: Timestamp
- httpDateOnTarget: HttpDate,
+ httpDateOnTarget: HttpDate
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
@@ -915,111 +731,101 @@ operation XmlEnums {
apply XmlEnums @httpRequestTests([
{
- id: "XmlEnums",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlEnums",
+ id: "XmlEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlEnums"
body: """
-
- Foo
- 0
- 1
-
- Foo
- 0
-
-
- Foo
- 0
-
-
-
- hi
- Foo
-
-
- zero
- 0
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ Foo
+ 0
+ 1
+
+ Foo
+ 0
+
+
+ Foo
+ 0
+
+
+
+ hi
+ Foo
+
+
+ zero
+ 0
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
apply XmlEnums @httpResponseTests([
{
- id: "XmlEnums",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- code: 200,
+ id: "XmlEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ code: 200
body: """
-
- Foo
- 0
- 1
-
- Foo
- 0
-
-
- Foo
- 0
-
-
-
- hi
- Foo
-
-
- zero
- 0
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ Foo
+ 0
+ 1
+
+ Foo
+ 0
+
+
+ Foo
+ 0
+
+
+
+ hi
+ Foo
+
+
+ zero
+ 0
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- fooEnum1: "Foo",
- fooEnum2: "0",
- fooEnum3: "1",
- fooEnumList: ["Foo", "0"],
- fooEnumSet: ["Foo", "0"],
- fooEnumMap: {
- "hi": "Foo",
- "zero": "0"
- }
+ fooEnum1: "Foo"
+ fooEnum2: "0"
+ fooEnum3: "1"
+ fooEnumList: ["Foo", "0"]
+ fooEnumSet: ["Foo", "0"]
+ fooEnumMap: { hi: "Foo", zero: "0" }
}
}
])
@mixin
structure XmlEnumsInputOutput {
- fooEnum1: FooEnum,
- fooEnum2: FooEnum,
- fooEnum3: FooEnum,
- fooEnumList: FooEnumList,
- fooEnumSet: FooEnumSet,
- fooEnumMap: FooEnumMap,
+ fooEnum1: FooEnum
+ fooEnum2: FooEnum
+ fooEnum3: FooEnum
+ fooEnumList: FooEnumList
+ fooEnumSet: FooEnumSet
+ fooEnumMap: FooEnumMap
}
/// This example serializes enums as top level properties, in lists, sets, and maps.
@@ -1032,111 +838,101 @@ operation XmlIntEnums {
apply XmlIntEnums @httpRequestTests([
{
- id: "XmlIntEnums",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlIntEnums",
+ id: "XmlIntEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlIntEnums"
body: """
-
- 1
- 2
- 3
-
- 1
- 2
-
-
- 1
- 2
-
-
-
- a
- 1
-
-
- b
- 2
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ 1
+ 2
+ 3
+
+ 1
+ 2
+
+
+ 1
+ 2
+
+
+
+ a
+ 1
+
+
+ b
+ 2
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- intEnum1: 1,
- intEnum2: 2,
- intEnum3: 3,
- intEnumList: [1, 2],
- intEnumSet: [1, 2],
- intEnumMap: {
- "a": 1,
- "b": 2
- }
+ intEnum1: 1
+ intEnum2: 2
+ intEnum3: 3
+ intEnumList: [1, 2]
+ intEnumSet: [1, 2]
+ intEnumMap: { a: 1, b: 2 }
}
}
])
apply XmlIntEnums @httpResponseTests([
{
- id: "XmlIntEnums",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- code: 200,
+ id: "XmlIntEnums"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ code: 200
body: """
-
- 1
- 2
- 3
-
- 1
- 2
-
-
- 1
- 2
-
-
-
- a
- 1
-
-
- b
- 2
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ 1
+ 2
+ 3
+
+ 1
+ 2
+
+
+ 1
+ 2
+
+
+
+ a
+ 1
+
+
+ b
+ 2
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- intEnum1: 1,
- intEnum2: 2,
- intEnum3: 3,
- intEnumList: [1, 2],
- intEnumSet: [1, 2],
- intEnumMap: {
- "a": 1,
- "b": 2
- }
+ intEnum1: 1
+ intEnum2: 2
+ intEnum3: 3
+ intEnumList: [1, 2]
+ intEnumSet: [1, 2]
+ intEnumMap: { a: 1, b: 2 }
}
}
])
@mixin
structure XmlIntEnumsInputOutput {
- intEnum1: IntegerEnum,
- intEnum2: IntegerEnum,
- intEnum3: IntegerEnum,
- intEnumList: IntegerEnumList,
- intEnumSet: IntegerEnumSet,
- intEnumMap: IntegerEnumMap,
+ intEnum1: IntegerEnum
+ intEnum2: IntegerEnum
+ intEnum3: IntegerEnum
+ intEnumList: IntegerEnumList
+ intEnumSet: IntegerEnumSet
+ intEnumMap: IntegerEnumMap
}
/// Recursive shapes
@@ -1153,41 +949,37 @@ operation RecursiveShapes {
apply RecursiveShapes @httpRequestTests([
{
- id: "RecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: restXml,
- method: "PUT",
- uri: "/RecursiveShapes",
+ id: "RecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: restXml
+ method: "PUT"
+ uri: "/RecursiveShapes"
body: """
-
-
- Foo1
-
- Bar1
-
- Foo2
-
- Bar2
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ Foo1
+
+ Bar1
+
+ Foo2
+
+ Bar2
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -1197,40 +989,36 @@ apply RecursiveShapes @httpRequestTests([
apply RecursiveShapes @httpResponseTests([
{
- id: "RecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: restXml,
- code: 200,
+ id: "RecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: restXml
+ code: 200
body: """
-
-
- Foo1
-
- Bar1
-
- Foo2
-
- Bar2
-
-
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ Foo1
+
+ Bar1
+
+ Foo2
+
+ Bar2
+
+
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -1239,13 +1027,13 @@ apply RecursiveShapes @httpResponseTests([
])
structure RecursiveShapesInputOutputNested1 {
- foo: String,
+ foo: String
nested: RecursiveShapesInputOutputNested2
}
structure RecursiveShapesInputOutputNested2 {
- bar: String,
- recursiveMember: RecursiveShapesInputOutputNested1,
+ bar: String
+ recursiveMember: RecursiveShapesInputOutputNested1
}
// XML namespace
@@ -1257,33 +1045,28 @@ operation XmlNamespaces {
apply XmlNamespaces @httpRequestTests([
{
- id: "XmlNamespaces",
- documentation: "Serializes XML namespaces",
- protocol: restXml,
- method: "POST",
- uri: "/XmlNamespaces",
+ id: "XmlNamespaces"
+ documentation: "Serializes XML namespaces"
+ protocol: restXml
+ method: "POST"
+ uri: "/XmlNamespaces"
body: """
-
-
- Foo
-
- Bar
- Baz
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nested: {
- foo: "Foo",
- values: [
- "Bar",
- "Baz"
- ]
+ foo: "Foo"
+ values: ["Bar", "Baz"]
}
}
}
@@ -1291,32 +1074,27 @@ apply XmlNamespaces @httpRequestTests([
apply XmlNamespaces @httpResponseTests([
{
- id: "XmlNamespaces",
- documentation: "Serializes XML namespaces",
- protocol: restXml,
- code: 200,
+ id: "XmlNamespaces"
+ documentation: "Serializes XML namespaces"
+ protocol: restXml
+ code: 200
body: """
-
-
- Foo
-
- Bar
- Baz
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
nested: {
- foo: "Foo",
- values: [
- "Bar",
- "Baz"
- ]
+ foo: "Foo"
+ values: ["Bar", "Baz"]
}
}
}
@@ -1332,7 +1110,7 @@ structure XmlNamespacesInputOutput {
@xmlNamespace(uri: "http://foo.com")
structure XmlNamespaceNested {
@xmlNamespace(uri: "http://baz.com", prefix: "baz")
- foo: String,
+ foo: String
@xmlNamespace(uri: "http://qux.com")
values: XmlNamespacedList
@@ -1340,5 +1118,5 @@ structure XmlNamespaceNested {
list XmlNamespacedList {
@xmlNamespace(uri: "http://bux.com")
- member: String,
+ member: String
}
diff --git a/smithy-aws-protocol-tests/model/restXml/document-unions.smithy b/smithy-aws-protocol-tests/model/restXml/document-unions.smithy
index f852e6a3565..3c153561ab1 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-unions.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-unions.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that serialize synthesized XML documents
// in the payload of HTTP requests and responses.
-
$version: "2.0"
$operationInputSuffix: "Request"
$operationOutputSuffix: "Response"
@@ -26,255 +25,208 @@ operation XmlUnions {
apply XmlUnions @httpRequestTests([
{
- id: "XmlUnionsWithStructMember",
- documentation: "Serializes union struct member",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlUnions",
+ id: "XmlUnionsWithStructMember"
+ documentation: "Serializes union struct member"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlUnions"
body: """
-
-
-
- string
- true
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+
+ string
+ true
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
unionValue: {
- structValue: {
- stringValue: "string",
- booleanValue: true,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- },
- },
+ structValue: { stringValue: "string", booleanValue: true, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
}
- },
+ }
{
- id: "XmlUnionsWithStringMember",
- documentation: "serialize union string member",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlUnions",
+ id: "XmlUnionsWithStringMember"
+ documentation: "serialize union string member"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlUnions"
body: """
-
-
- some string
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+ some string
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- unionValue: {
- stringValue: "some string",
- },
+ unionValue: { stringValue: "some string" }
}
- },
+ }
{
- id: "XmlUnionsWithBooleanMember",
- documentation: "Serializes union boolean member",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlUnions",
+ id: "XmlUnionsWithBooleanMember"
+ documentation: "Serializes union boolean member"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlUnions"
body: """
-
-
- true
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+ true
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- unionValue: {
- booleanValue: true,
- },
+ unionValue: { booleanValue: true }
}
- },
+ }
{
- id: "XmlUnionsWithUnionMember",
- documentation: "Serializes union member",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlUnions",
+ id: "XmlUnionsWithUnionMember"
+ documentation: "Serializes union member"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlUnions"
body: """
-
-
-
- true
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+
+ true
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
unionValue: {
- unionValue: {
- booleanValue: true,
- },
- },
+ unionValue: { booleanValue: true }
+ }
}
- },
+ }
])
apply XmlUnions @httpResponseTests([
{
- id: "XmlUnionsWithStructMember",
- documentation: "Serializes union struct member",
- protocol: restXml,
- code: 200,
+ id: "XmlUnionsWithStructMember"
+ documentation: "Serializes union struct member"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- string
- true
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+
+ string
+ true
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
unionValue: {
- structValue: {
- stringValue: "string",
- booleanValue: true,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- },
- },
+ structValue: { stringValue: "string", booleanValue: true, byteValue: 1, shortValue: 2, integerValue: 3, longValue: 4, floatValue: 5.5, doubleValue: 6.5 }
+ }
}
- },
+ }
{
- id: "XmlUnionsWithStringMember",
- documentation: "Serializes union string member",
- protocol: restXml,
- code: 200,
+ id: "XmlUnionsWithStringMember"
+ documentation: "Serializes union string member"
+ protocol: restXml
+ code: 200
body: """
-
-
- some string
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+ some string
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- unionValue: {
- stringValue: "some string",
- },
+ unionValue: { stringValue: "some string" }
}
- },
+ }
{
- id: "XmlUnionsWithBooleanMember",
- documentation: "Serializes union boolean member",
- protocol: restXml,
- code: 200,
+ id: "XmlUnionsWithBooleanMember"
+ documentation: "Serializes union boolean member"
+ protocol: restXml
+ code: 200
body: """
-
-
- true
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+ true
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- unionValue: {
- booleanValue: true,
- },
+ unionValue: { booleanValue: true }
}
- },
+ }
{
- id: "XmlUnionsWithUnionMember",
- documentation: "Serializes union member",
- protocol: restXml,
- code: 200,
+ id: "XmlUnionsWithUnionMember"
+ documentation: "Serializes union member"
+ protocol: restXml
+ code: 200
body: """
-
-
-
- true
-
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+
+
+ true
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
unionValue: {
- unionValue: {
- booleanValue: true,
- },
- },
+ unionValue: { booleanValue: true }
+ }
}
- },
+ }
])
union XmlUnionShape {
- stringValue: String,
- booleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
- doubleValue: Double,
-
- unionValue: XmlUnionShape,
- structValue: XmlNestedUnionStruct,
+ stringValue: String
+ booleanValue: Boolean
+ byteValue: Byte
+ shortValue: Short
+ integerValue: Integer
+ longValue: Long
+ floatValue: Float
+ doubleValue: Double
+ unionValue: XmlUnionShape
+ structValue: XmlNestedUnionStruct
}
structure XmlNestedUnionStruct {
- stringValue: String,
- booleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
- doubleValue: Double,
+ stringValue: String
+ booleanValue: Boolean
+ byteValue: Byte
+ shortValue: Short
+ integerValue: Integer
+ longValue: Long
+ floatValue: Float
+ doubleValue: Double
}
diff --git a/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy b/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy
index 1b5177de307..ee0e3a69cba 100644
--- a/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/document-xml-attributes.smithy
@@ -1,5 +1,4 @@
// This file defines test cases that serialize XML attributes.
-
$version: "2.0"
$operationInputSuffix: "Request"
$operationOutputSuffix: "Response"
@@ -20,76 +19,61 @@ operation XmlAttributes {
apply XmlAttributes @httpRequestTests([
{
- id: "XmlAttributes",
- documentation: "Serializes XML attributes on the synthesized document",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlAttributes",
+ id: "XmlAttributes"
+ documentation: "Serializes XML attributes on the synthesized document"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlAttributes"
body: """
-
- hi
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- foo: "hi",
- attr: "test"
- }
- },
+
+ hi
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { foo: "hi", attr: "test" }
+ }
{
- id: "XmlAttributesWithEscaping",
- documentation: "Serializes XML attributes with escaped characters on the synthesized document",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlAttributes",
+ id: "XmlAttributesWithEscaping"
+ documentation: "Serializes XML attributes with escaped characters on the synthesized document"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlAttributes"
body: """
-
- hi
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- foo: "hi",
- attr: ""
- }
- },
+
+ hi
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { foo: "hi", attr: "" }
+ }
])
apply XmlAttributes @httpResponseTests([
{
- id: "XmlAttributes",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- code: 200,
+ id: "XmlAttributes"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ code: 200
body: """
-
- hi
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- params: {
- foo: "hi",
- attr: "test"
- }
+
+ hi
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ params: { foo: "hi", attr: "test" }
}
])
@mixin
structure XmlAttributesInputOutput {
- foo: String,
+ foo: String
@xmlAttribute
@xmlName("test")
- attr: String,
+ attr: String
}
/// This example serializes an XML attributes on a document targeted by httpPayload.
@@ -100,6 +84,7 @@ operation XmlAttributesOnPayload {
@httpPayload
payload: XmlAttributesPayloadRequest
}
+
output := {
@httpPayload
payload: XmlAttributesPayloadResponse
@@ -108,49 +93,39 @@ operation XmlAttributesOnPayload {
apply XmlAttributesOnPayload @httpRequestTests([
{
- id: "XmlAttributesOnPayload",
- documentation: "Serializes XML attributes on the synthesized document",
- protocol: restXml,
- method: "PUT",
- uri: "/XmlAttributesOnPayload",
+ id: "XmlAttributesOnPayload"
+ documentation: "Serializes XML attributes on the synthesized document"
+ protocol: restXml
+ method: "PUT"
+ uri: "/XmlAttributesOnPayload"
body: """
-
- hi
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ hi
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- payload: {
- foo: "hi",
- attr: "test"
- }
+ payload: { foo: "hi", attr: "test" }
}
}
])
apply XmlAttributesOnPayload @httpResponseTests([
{
- id: "XmlAttributesOnPayload",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- code: 200,
+ id: "XmlAttributesOnPayload"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ code: 200
body: """
-
- hi
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ hi
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- payload: {
- foo: "hi",
- attr: "test"
- }
+ payload: { foo: "hi", attr: "test" }
}
}
])
diff --git a/smithy-aws-protocol-tests/model/restXml/empty-input-output.smithy b/smithy-aws-protocol-tests/model/restXml/empty-input-output.smithy
index 93b98643bf3..0ef0083be33 100644
--- a/smithy-aws-protocol-tests/model/restXml/empty-input-output.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/empty-input-output.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test the basics of empty input and
// output shape serialization.
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -17,23 +16,23 @@ operation NoInputAndNoOutput {}
apply NoInputAndNoOutput @httpRequestTests([
{
- id: "NoInputAndNoOutput",
- documentation: "No input serializes no payload",
- protocol: restXml,
- method: "POST",
- uri: "/NoInputAndNoOutput",
+ id: "NoInputAndNoOutput"
+ documentation: "No input serializes no payload"
+ protocol: restXml
+ method: "POST"
+ uri: "/NoInputAndNoOutput"
body: ""
}
])
apply NoInputAndNoOutput @httpResponseTests([
- {
- id: "NoInputAndNoOutput",
- documentation: "No output serializes no payload",
- protocol: restXml,
- code: 200,
- body: ""
- }
+ {
+ id: "NoInputAndNoOutput"
+ documentation: "No output serializes no payload"
+ protocol: restXml
+ code: 200
+ body: ""
+ }
])
/// The example tests how requests and responses are serialized when there's
@@ -47,21 +46,21 @@ operation NoInputAndOutput {
apply NoInputAndOutput @httpRequestTests([
{
- id: "NoInputAndOutput",
- documentation: "No input serializes no payload",
- protocol: restXml,
- method: "POST",
- uri: "/NoInputAndOutputOutput",
+ id: "NoInputAndOutput"
+ documentation: "No input serializes no payload"
+ protocol: restXml
+ method: "POST"
+ uri: "/NoInputAndOutputOutput"
body: ""
}
])
apply NoInputAndOutput @httpResponseTests([
{
- id: "NoInputAndOutput",
- documentation: "Empty output serializes no payload",
- protocol: restXml,
- code: 200,
+ id: "NoInputAndOutput"
+ documentation: "Empty output serializes no payload"
+ protocol: restXml
+ code: 200
body: ""
}
])
@@ -74,30 +73,31 @@ structure NoInputAndOutputOutput {}
/// be rare, code generators must support this.
@http(uri: "/EmptyInputAndEmptyOutput", method: "POST")
operation EmptyInputAndEmptyOutput {
- input: EmptyInputAndEmptyOutputInput,
+ input: EmptyInputAndEmptyOutputInput
output: EmptyInputAndEmptyOutputOutput
}
apply EmptyInputAndEmptyOutput @httpRequestTests([
{
- id: "EmptyInputAndEmptyOutput",
- documentation: "Empty input serializes no payload",
- protocol: restXml,
- method: "POST",
- uri: "/EmptyInputAndEmptyOutput",
+ id: "EmptyInputAndEmptyOutput"
+ documentation: "Empty input serializes no payload"
+ protocol: restXml
+ method: "POST"
+ uri: "/EmptyInputAndEmptyOutput"
body: ""
- },
+ }
])
apply EmptyInputAndEmptyOutput @httpResponseTests([
{
- id: "EmptyInputAndEmptyOutput",
- documentation: "Empty output serializes no payload",
- protocol: restXml,
- code: 200,
+ id: "EmptyInputAndEmptyOutput"
+ documentation: "Empty output serializes no payload"
+ protocol: restXml
+ code: 200
body: ""
- },
+ }
])
structure EmptyInputAndEmptyOutputInput {}
+
structure EmptyInputAndEmptyOutputOutput {}
diff --git a/smithy-aws-protocol-tests/model/restXml/endpoints.smithy b/smithy-aws-protocol-tests/model/restXml/endpoints.smithy
index 4af3a84705e..848ea6bc352 100644
--- a/smithy-aws-protocol-tests/model/restXml/endpoints.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/endpoints.smithy
@@ -1,6 +1,5 @@
// This file defines tests to ensure that implementations support the endpoint
// trait and other features that modify the host.
-
$version: "2.0"
$operationInputSuffix: "Request"
@@ -11,16 +10,16 @@ use smithy.test#httpRequestTests
@httpRequestTests([
{
- id: "RestXmlEndpointTrait",
+ id: "RestXmlEndpointTrait"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait.""",
- protocol: restXml,
- method: "POST",
- uri: "/EndpointOperation",
- body: "",
- host: "example.com",
- resolvedHost: "foo.example.com",
+ Operations can prepend to the given host if they define the
+ endpoint trait."""
+ protocol: restXml
+ method: "POST"
+ uri: "/EndpointOperation"
+ body: ""
+ host: "example.com"
+ resolvedHost: "foo.example.com"
}
])
@endpoint(hostPrefix: "foo.")
@@ -29,25 +28,23 @@ operation EndpointOperation {}
@httpRequestTests([
{
- id: "RestXmlEndpointTraitWithHostLabel",
+ id: "RestXmlEndpointTraitWithHostLabel"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input.""",
- protocol: restXml,
- method: "POST",
- uri: "/EndpointWithHostLabelOperation",
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input."""
+ protocol: restXml
+ method: "POST"
+ uri: "/EndpointWithHostLabelOperation"
body: """
-
-
-
- """,
- bodyMediaType: "application/xml",
- host: "example.com",
- resolvedHost: "foo.bar.example.com",
- params: {
- label: "bar",
- },
+
+
+
+ """
+ bodyMediaType: "application/xml"
+ host: "example.com"
+ resolvedHost: "foo.bar.example.com"
+ params: { label: "bar" }
}
])
@endpoint(hostPrefix: "foo.{label}.")
@@ -62,37 +59,33 @@ operation EndpointWithHostLabelOperation {
@httpRequestTests([
{
- id: "RestXmlEndpointTraitWithHostLabelAndHttpBinding",
+ id: "RestXmlEndpointTraitWithHostLabelAndHttpBinding"
documentation: """
- Operations can prepend to the given host if they define the
- endpoint trait, and can use the host label trait to define
- further customization based on user input. The label must also
- be serialized in into any other location it is bound to, such
- as the body or in this case an http header.""",
- protocol: restXml,
- method: "POST",
- uri: "/EndpointWithHostLabelHeaderOperation",
- body: "",
- bodyMediaType: "application/xml",
- host: "example.com",
- resolvedHost: "bar.example.com",
- headers: {
- "X-Amz-Account-Id": "bar",
- },
- params: {
- accountId: "bar",
- },
+ Operations can prepend to the given host if they define the
+ endpoint trait, and can use the host label trait to define
+ further customization based on user input. The label must also
+ be serialized in into any other location it is bound to, such
+ as the body or in this case an http header."""
+ protocol: restXml
+ method: "POST"
+ uri: "/EndpointWithHostLabelHeaderOperation"
+ body: ""
+ bodyMediaType: "application/xml"
+ host: "example.com"
+ resolvedHost: "bar.example.com"
+ headers: { "X-Amz-Account-Id": "bar" }
+ params: { accountId: "bar" }
}
])
@endpoint(hostPrefix: "{accountId}.")
@http(uri: "/EndpointWithHostLabelHeaderOperation", method: "POST")
operation EndpointWithHostLabelHeaderOperation {
- input: HostLabelHeaderInput,
+ input: HostLabelHeaderInput
}
structure HostLabelHeaderInput {
@required
@hostLabel
@httpHeader("X-Amz-Account-Id")
- accountId: String,
+ accountId: String
}
diff --git a/smithy-aws-protocol-tests/model/restXml/errors.smithy b/smithy-aws-protocol-tests/model/restXml/errors.smithy
index b623cd5b266..326e28caa82 100644
--- a/smithy-aws-protocol-tests/model/restXml/errors.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/errors.smithy
@@ -1,11 +1,9 @@
// This file defines test cases that test error serialization.
-
$version: "2.0"
namespace aws.protocoltests.restxml
use aws.protocols#restXml
-use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
/// This operation has three possible return values:
@@ -20,62 +18,57 @@ use smithy.test#httpResponseTests
@idempotent
@http(uri: "/GreetingWithErrors", method: "PUT")
operation GreetingWithErrors {
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError]
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ ]
}
apply GreetingWithErrors @httpResponseTests([
{
- id: "GreetingWithErrors",
- documentation: "Ensures that operations with errors successfully know how to deserialize the successful response",
- protocol: restXml,
- code: 200,
- body: "",
- headers: {
- "X-Greeting": "Hello"
- },
- params: {
- greeting: "Hello"
- }
+ id: "GreetingWithErrors"
+ documentation: "Ensures that operations with errors successfully know how to deserialize the successful response"
+ protocol: restXml
+ code: 200
+ body: ""
+ headers: { "X-Greeting": "Hello" }
+ params: { greeting: "Hello" }
}
])
structure GreetingWithErrorsOutput {
@httpHeader("X-Greeting")
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
@httpError(400)
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "InvalidGreetingError",
- documentation: "Parses simple XML errors",
- protocol: restXml,
- params: {
- Message: "Hi"
- },
- code: 400,
- headers: {
- "Content-Type": "application/xml"
- },
+ id: "InvalidGreetingError"
+ documentation: "Parses simple XML errors"
+ protocol: restXml
+ params: { Message: "Hi" }
+ code: 400
+ headers: { "Content-Type": "application/xml" }
body: """
-
-
- Sender
- InvalidGreeting
- Hi
- setting
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
+
+
+ Sender
+ InvalidGreeting
+ Hi
+ setting
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
}
])
@@ -85,47 +78,42 @@ apply InvalidGreeting @httpResponseTests([
structure ComplexError {
// Errors support HTTP bindings!
@httpHeader("X-Header")
- Header: String,
+ Header: String
- TopLevel: String,
+ TopLevel: String
- Nested: ComplexNestedErrorData,
+ Nested: ComplexNestedErrorData
}
apply ComplexError @httpResponseTests([
{
- id: "ComplexError",
- protocol: restXml,
+ id: "ComplexError"
+ protocol: restXml
params: {
- Header: "Header",
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 400,
- headers: {
- "Content-Type": "application/xml",
- "X-Header": "Header",
- },
+ Header: "Header"
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 400
+ headers: { "Content-Type": "application/xml", "X-Header": "Header" }
body: """
-
-
- Sender
- ComplexError
- Hi
- Top level
-
- bar
-
-
- foo-id
-
- """,
- bodyMediaType: "application/xml",
+
+
+ Sender
+ ComplexError
+ Hi
+ Top level
+
+ bar
+
+
+ foo-id
+
+ """
+ bodyMediaType: "application/xml"
}
])
structure ComplexNestedErrorData {
- Foo: String,
+ Foo: String
}
diff --git a/smithy-aws-protocol-tests/model/restXml/fractional-seconds.smithy b/smithy-aws-protocol-tests/model/restXml/fractional-seconds.smithy
index dc5cb78a38d..4400e96dc2a 100644
--- a/smithy-aws-protocol-tests/model/restXml/fractional-seconds.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/fractional-seconds.smithy
@@ -15,20 +15,18 @@ operation FractionalSeconds {
apply FractionalSeconds @httpResponseTests([
{
- id: "RestXmlDateTimeWithFractionalSeconds",
+ id: "RestXmlDateTimeWithFractionalSeconds"
documentation: """
- Ensures that clients can correctly parse datetime timestamps with fractional seconds""",
- protocol: restXml,
- code: 200,
+ Ensures that clients can correctly parse datetime timestamps with fractional seconds"""
+ protocol: restXml
+ code: 200
body: """
2000-01-02T20:34:56.123Z
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: { datetime: 946845296.123 }
}
])
diff --git a/smithy-aws-protocol-tests/model/restXml/http-headers.smithy b/smithy-aws-protocol-tests/model/restXml/http-headers.smithy
index fb61681f5d9..05bcea2f8af 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-headers.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-headers.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP header bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -23,336 +22,258 @@ use smithy.test#httpResponseTests
/// no input or output payload but there are HTTP header bindings.
@http(uri: "/InputAndOutputWithHeaders", method: "POST")
operation InputAndOutputWithHeaders {
- input: InputAndOutputWithHeadersIO,
+ input: InputAndOutputWithHeadersIO
output: InputAndOutputWithHeadersIO
}
apply InputAndOutputWithHeaders @httpRequestTests([
{
- id: "InputAndOutputWithStringHeaders",
- documentation: "Tests requests with string header bindings",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-String": "Hello",
- "X-StringList": "a, b, c",
- "X-StringSet": "a, b, c"
- },
- body: "",
+ id: "InputAndOutputWithStringHeaders"
+ documentation: "Tests requests with string header bindings"
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-String": "Hello", "X-StringList": "a, b, c", "X-StringSet": "a, b, c" }
+ body: ""
params: {
- headerString: "Hello",
- headerStringList: ["a", "b", "c"],
- headerStringSet: ["a", "b", "c"],
+ headerString: "Hello"
+ headerStringList: ["a", "b", "c"]
+ headerStringSet: ["a", "b", "c"]
}
- },
+ }
{
- id: "InputAndOutputWithNumericHeaders",
- documentation: "Tests requests with numeric header bindings",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-Byte": "1",
- "X-Short": "123",
- "X-Integer": "123",
- "X-Long": "123",
- "X-Float": "1.1",
- "X-Double": "1.1",
- "X-IntegerList": "1, 2, 3",
- },
- body: "",
+ id: "InputAndOutputWithNumericHeaders"
+ documentation: "Tests requests with numeric header bindings"
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-Byte": "1", "X-Short": "123", "X-Integer": "123", "X-Long": "123", "X-Float": "1.1", "X-Double": "1.1", "X-IntegerList": "1, 2, 3" }
+ body: ""
params: {
- headerByte: 1,
- headerShort: 123,
- headerInteger: 123,
- headerLong: 123,
- headerFloat: 1.1,
- headerDouble: 1.1,
- headerIntegerList: [1, 2, 3],
+ headerByte: 1
+ headerShort: 123
+ headerInteger: 123
+ headerLong: 123
+ headerFloat: 1.1
+ headerDouble: 1.1
+ headerIntegerList: [1, 2, 3]
}
- },
+ }
{
- id: "InputAndOutputWithBooleanHeaders",
- documentation: "Tests requests with boolean header bindings",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-Boolean1": "true",
- "X-Boolean2": "false",
- "X-BooleanList": "true, false, true"
- },
- body: "",
+ id: "InputAndOutputWithBooleanHeaders"
+ documentation: "Tests requests with boolean header bindings"
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-Boolean1": "true", "X-Boolean2": "false", "X-BooleanList": "true, false, true" }
+ body: ""
params: {
- headerTrueBool: true,
- headerFalseBool: false,
+ headerTrueBool: true
+ headerFalseBool: false
headerBooleanList: [true, false, true]
}
- },
+ }
{
- id: "InputAndOutputWithTimestampHeaders",
- documentation: "Tests requests with timestamp header bindings",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT"
- },
- body: "",
+ id: "InputAndOutputWithTimestampHeaders"
+ documentation: "Tests requests with timestamp header bindings"
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT" }
+ body: ""
params: {
headerTimestampList: [1576540098, 1576540098]
}
- },
+ }
{
- id: "InputAndOutputWithEnumHeaders",
- documentation: "Tests requests with enum header bindings",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- headers: {
- "X-Enum": "Foo",
- "X-EnumList": "Foo, Bar, Baz"
- },
- body: "",
+ id: "InputAndOutputWithEnumHeaders"
+ documentation: "Tests requests with enum header bindings"
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ headers: { "X-Enum": "Foo", "X-EnumList": "Foo, Bar, Baz" }
+ body: ""
params: {
- headerEnum: "Foo",
- headerEnumList: ["Foo", "Bar", "Baz"],
+ headerEnum: "Foo"
+ headerEnumList: ["Foo", "Bar", "Baz"]
}
- },
+ }
{
- id: "RestXmlSupportsNaNFloatHeaderInputs",
- documentation: "Supports handling NaN float header values.",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- body: "",
- headers: {
- "X-Float": "NaN",
- "X-Double": "NaN",
- },
- params: {
- headerFloat: "NaN",
- headerDouble: "NaN",
- }
- },
+ id: "RestXmlSupportsNaNFloatHeaderInputs"
+ documentation: "Supports handling NaN float header values."
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ body: ""
+ headers: { "X-Float": "NaN", "X-Double": "NaN" }
+ params: { headerFloat: "NaN", headerDouble: "NaN" }
+ }
{
- id: "RestXmlSupportsInfinityFloatHeaderInputs",
- documentation: "Supports handling Infinity float header values.",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- body: "",
- headers: {
- "X-Float": "Infinity",
- "X-Double": "Infinity",
- },
- params: {
- headerFloat: "Infinity",
- headerDouble: "Infinity",
- }
- },
+ id: "RestXmlSupportsInfinityFloatHeaderInputs"
+ documentation: "Supports handling Infinity float header values."
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ body: ""
+ headers: { "X-Float": "Infinity", "X-Double": "Infinity" }
+ params: { headerFloat: "Infinity", headerDouble: "Infinity" }
+ }
{
- id: "RestXmlSupportsNegativeInfinityFloatHeaderInputs",
- documentation: "Supports handling -Infinity float header values.",
- protocol: restXml,
- method: "POST",
- uri: "/InputAndOutputWithHeaders",
- body: "",
- headers: {
- "X-Float": "-Infinity",
- "X-Double": "-Infinity",
- },
- params: {
- headerFloat: "-Infinity",
- headerDouble: "-Infinity",
- }
- },
+ id: "RestXmlSupportsNegativeInfinityFloatHeaderInputs"
+ documentation: "Supports handling -Infinity float header values."
+ protocol: restXml
+ method: "POST"
+ uri: "/InputAndOutputWithHeaders"
+ body: ""
+ headers: { "X-Float": "-Infinity", "X-Double": "-Infinity" }
+ params: { headerFloat: "-Infinity", headerDouble: "-Infinity" }
+ }
])
apply InputAndOutputWithHeaders @httpResponseTests([
{
- id: "InputAndOutputWithStringHeaders",
- documentation: "Tests responses with string header bindings",
- protocol: restXml,
- code: 200,
- headers: {
- "X-String": "Hello",
- "X-StringList": "a, b, c",
- "X-StringSet": "a, b, c"
- },
- body: "",
+ id: "InputAndOutputWithStringHeaders"
+ documentation: "Tests responses with string header bindings"
+ protocol: restXml
+ code: 200
+ headers: { "X-String": "Hello", "X-StringList": "a, b, c", "X-StringSet": "a, b, c" }
+ body: ""
params: {
- headerString: "Hello",
- headerStringList: ["a", "b", "c"],
- headerStringSet: ["a", "b", "c"],
+ headerString: "Hello"
+ headerStringList: ["a", "b", "c"]
+ headerStringSet: ["a", "b", "c"]
}
- },
+ }
{
- id: "InputAndOutputWithNumericHeaders",
- documentation: "Tests responses with numeric header bindings",
- protocol: restXml,
- code: 200,
- headers: {
- "X-Byte": "1",
- "X-Short": "123",
- "X-Integer": "123",
- "X-Long": "123",
- "X-Float": "1.1",
- "X-Double": "1.1",
- "X-IntegerList": "1, 2, 3",
- },
- body: "",
+ id: "InputAndOutputWithNumericHeaders"
+ documentation: "Tests responses with numeric header bindings"
+ protocol: restXml
+ code: 200
+ headers: { "X-Byte": "1", "X-Short": "123", "X-Integer": "123", "X-Long": "123", "X-Float": "1.1", "X-Double": "1.1", "X-IntegerList": "1, 2, 3" }
+ body: ""
params: {
- headerByte: 1,
- headerShort: 123,
- headerInteger: 123,
- headerLong: 123,
- headerFloat: 1.1,
- headerDouble: 1.1,
- headerIntegerList: [1, 2, 3],
+ headerByte: 1
+ headerShort: 123
+ headerInteger: 123
+ headerLong: 123
+ headerFloat: 1.1
+ headerDouble: 1.1
+ headerIntegerList: [1, 2, 3]
}
- },
+ }
{
- id: "InputAndOutputWithBooleanHeaders",
- documentation: "Tests responses with boolean header bindings",
- protocol: restXml,
- code: 200,
- headers: {
- "X-Boolean1": "true",
- "X-Boolean2": "false",
- "X-BooleanList": "true, false, true"
- },
- body: "",
+ id: "InputAndOutputWithBooleanHeaders"
+ documentation: "Tests responses with boolean header bindings"
+ protocol: restXml
+ code: 200
+ headers: { "X-Boolean1": "true", "X-Boolean2": "false", "X-BooleanList": "true, false, true" }
+ body: ""
params: {
- headerTrueBool: true,
- headerFalseBool: false,
+ headerTrueBool: true
+ headerFalseBool: false
headerBooleanList: [true, false, true]
}
- },
+ }
{
- id: "InputAndOutputWithTimestampHeaders",
- documentation: "Tests responses with timestamp header bindings",
- protocol: restXml,
- code: 200,
- headers: {
- "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT"
- },
- body: "",
+ id: "InputAndOutputWithTimestampHeaders"
+ documentation: "Tests responses with timestamp header bindings"
+ protocol: restXml
+ code: 200
+ headers: { "X-TimestampList": "Mon, 16 Dec 2019 23:48:18 GMT, Mon, 16 Dec 2019 23:48:18 GMT" }
+ body: ""
params: {
headerTimestampList: [1576540098, 1576540098]
}
- },
+ }
{
- id: "InputAndOutputWithEnumHeaders",
- documentation: "Tests responses with enum header bindings",
- protocol: restXml,
- code: 200,
- headers: {
- "X-Enum": "Foo",
- "X-EnumList": "Foo, Bar, Baz"
- },
- body: "",
+ id: "InputAndOutputWithEnumHeaders"
+ documentation: "Tests responses with enum header bindings"
+ protocol: restXml
+ code: 200
+ headers: { "X-Enum": "Foo", "X-EnumList": "Foo, Bar, Baz" }
+ body: ""
params: {
- headerEnum: "Foo",
- headerEnumList: ["Foo", "Bar", "Baz"],
+ headerEnum: "Foo"
+ headerEnumList: ["Foo", "Bar", "Baz"]
}
- },
+ }
{
- id: "RestXmlSupportsNaNFloatHeaderOutputs",
- documentation: "Supports handling NaN float header values.",
- protocol: restXml,
- code: 200,
- headers: {
- "X-Float": "NaN",
- "X-Double": "NaN",
- },
- body: "",
- params: {
- headerFloat: "NaN",
- headerDouble: "NaN",
- }
- },
+ id: "RestXmlSupportsNaNFloatHeaderOutputs"
+ documentation: "Supports handling NaN float header values."
+ protocol: restXml
+ code: 200
+ headers: { "X-Float": "NaN", "X-Double": "NaN" }
+ body: ""
+ params: { headerFloat: "NaN", headerDouble: "NaN" }
+ }
{
- id: "RestXmlSupportsInfinityFloatHeaderOutputs",
- documentation: "Supports handling Infinity float header values.",
- protocol: restXml,
- code: 200,
- headers: {
- "X-Float": "Infinity",
- "X-Double": "Infinity",
- },
- body: "",
- params: {
- headerFloat: "Infinity",
- headerDouble: "Infinity",
- }
- },
+ id: "RestXmlSupportsInfinityFloatHeaderOutputs"
+ documentation: "Supports handling Infinity float header values."
+ protocol: restXml
+ code: 200
+ headers: { "X-Float": "Infinity", "X-Double": "Infinity" }
+ body: ""
+ params: { headerFloat: "Infinity", headerDouble: "Infinity" }
+ }
{
- id: "RestXmlSupportsNegativeInfinityFloatHeaderOutputs",
- documentation: "Supports handling -Infinity float header values.",
- protocol: restXml,
- code: 200,
- headers: {
- "X-Float": "-Infinity",
- "X-Double": "-Infinity",
- },
- body: "",
- params: {
- headerFloat: "-Infinity",
- headerDouble: "-Infinity",
- }
- },
+ id: "RestXmlSupportsNegativeInfinityFloatHeaderOutputs"
+ documentation: "Supports handling -Infinity float header values."
+ protocol: restXml
+ code: 200
+ headers: { "X-Float": "-Infinity", "X-Double": "-Infinity" }
+ body: ""
+ params: { headerFloat: "-Infinity", headerDouble: "-Infinity" }
+ }
])
structure InputAndOutputWithHeadersIO {
@httpHeader("X-String")
- headerString: String,
+ headerString: String
@httpHeader("X-Byte")
- headerByte: Byte,
+ headerByte: Byte
@httpHeader("X-Short")
- headerShort: Short,
+ headerShort: Short
@httpHeader("X-Integer")
- headerInteger: Integer,
+ headerInteger: Integer
@httpHeader("X-Long")
- headerLong: Long,
+ headerLong: Long
@httpHeader("X-Float")
- headerFloat: Float,
+ headerFloat: Float
@httpHeader("X-Double")
- headerDouble: Double,
+ headerDouble: Double
@httpHeader("X-Boolean1")
- headerTrueBool: Boolean,
+ headerTrueBool: Boolean
@httpHeader("X-Boolean2")
- headerFalseBool: Boolean,
+ headerFalseBool: Boolean
@httpHeader("X-StringList")
- headerStringList: StringList,
+ headerStringList: StringList
@httpHeader("X-StringSet")
- headerStringSet: StringSet,
+ headerStringSet: StringSet
@httpHeader("X-IntegerList")
- headerIntegerList: IntegerList,
+ headerIntegerList: IntegerList
@httpHeader("X-BooleanList")
- headerBooleanList: BooleanList,
+ headerBooleanList: BooleanList
@httpHeader("X-TimestampList")
- headerTimestampList: TimestampList,
+ headerTimestampList: TimestampList
@httpHeader("X-Enum")
- headerEnum: FooEnum,
+ headerEnum: FooEnum
@httpHeader("X-EnumList")
- headerEnumList: FooEnumList,
+ headerEnumList: FooEnumList
}
/// Null and empty headers are not sent over the wire.
@@ -360,26 +281,26 @@ structure InputAndOutputWithHeadersIO {
@http(uri: "/NullAndEmptyHeadersClient", method: "GET")
@tags(["client-only"])
operation NullAndEmptyHeadersClient {
- input: NullAndEmptyHeadersIO,
+ input: NullAndEmptyHeadersIO
output: NullAndEmptyHeadersIO
}
apply NullAndEmptyHeadersClient @httpRequestTests([
{
- id: "NullAndEmptyHeaders",
- documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
- protocol: restXml,
- method: "GET",
- uri: "/NullAndEmptyHeadersClient",
- forbidHeaders: ["X-A", "X-B", "X-C"],
- body: "",
+ id: "NullAndEmptyHeaders"
+ documentation: "Do not send null values, empty strings, or empty lists over the wire in headers"
+ protocol: restXml
+ method: "GET"
+ uri: "/NullAndEmptyHeadersClient"
+ forbidHeaders: ["X-A", "X-B", "X-C"]
+ body: ""
params: {
- a: null,
- b: "",
- c: [],
- },
- appliesTo: "client",
- },
+ a: null
+ b: ""
+ c: []
+ }
+ appliesTo: "client"
+ }
])
/// Null and empty headers are not sent over the wire.
@@ -387,124 +308,92 @@ apply NullAndEmptyHeadersClient @httpRequestTests([
@http(uri: "/NullAndEmptyHeadersServer", method: "GET")
@tags(["server-only"])
operation NullAndEmptyHeadersServer {
- input: NullAndEmptyHeadersIO,
+ input: NullAndEmptyHeadersIO
output: NullAndEmptyHeadersIO
}
apply NullAndEmptyHeadersServer @httpResponseTests([
{
- id: "NullAndEmptyHeaders",
- documentation: "Do not send null or empty headers",
- protocol: restXml,
- code: 200,
- forbidHeaders: ["X-A", "X-B", "X-C"],
- body: "",
+ id: "NullAndEmptyHeaders"
+ documentation: "Do not send null or empty headers"
+ protocol: restXml
+ code: 200
+ forbidHeaders: ["X-A", "X-B", "X-C"]
+ body: ""
params: {
- a: null,
- b: "",
- c: [],
- },
- appliesTo: "server",
- },
+ a: null
+ b: ""
+ c: []
+ }
+ appliesTo: "server"
+ }
])
structure NullAndEmptyHeadersIO {
@httpHeader("X-A")
- a: String,
+ a: String
@httpHeader("X-B")
- b: String,
+ b: String
@httpHeader("X-C")
- c: StringList,
+ c: StringList
}
/// The example tests how timestamp request and response headers are serialized.
@http(uri: "/TimestampFormatHeaders", method: "POST")
operation TimestampFormatHeaders {
- input: TimestampFormatHeadersIO,
+ input: TimestampFormatHeadersIO
output: TimestampFormatHeadersIO
}
apply TimestampFormatHeaders @httpRequestTests([
{
- id: "TimestampFormatHeaders",
- documentation: "Tests how timestamp request headers are serialized",
- protocol: restXml,
- method: "POST",
- uri: "/TimestampFormatHeaders",
- headers: {
- "X-memberEpochSeconds": "1576540098",
- "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-memberDateTime": "2019-12-16T23:48:18Z",
- "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetEpochSeconds": "1576540098",
- "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetDateTime": "2019-12-16T23:48:18Z",
- },
- body: "",
- params: {
- memberEpochSeconds: 1576540098,
- memberHttpDate: 1576540098,
- memberDateTime: 1576540098,
- defaultFormat: 1576540098,
- targetEpochSeconds: 1576540098,
- targetHttpDate: 1576540098,
- targetDateTime: 1576540098,
- }
- },
+ id: "TimestampFormatHeaders"
+ documentation: "Tests how timestamp request headers are serialized"
+ protocol: restXml
+ method: "POST"
+ uri: "/TimestampFormatHeaders"
+ headers: { "X-memberEpochSeconds": "1576540098", "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberDateTime": "2019-12-16T23:48:18Z", "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetEpochSeconds": "1576540098", "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetDateTime": "2019-12-16T23:48:18Z" }
+ body: ""
+ params: { memberEpochSeconds: 1576540098, memberHttpDate: 1576540098, memberDateTime: 1576540098, defaultFormat: 1576540098, targetEpochSeconds: 1576540098, targetHttpDate: 1576540098, targetDateTime: 1576540098 }
+ }
])
apply TimestampFormatHeaders @httpResponseTests([
{
- id: "TimestampFormatHeaders",
- documentation: "Tests how timestamp response headers are serialized",
- protocol: restXml,
- code: 200,
- headers: {
- "X-memberEpochSeconds": "1576540098",
- "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-memberDateTime": "2019-12-16T23:48:18Z",
- "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetEpochSeconds": "1576540098",
- "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT",
- "X-targetDateTime": "2019-12-16T23:48:18Z",
- },
- body: "",
- params: {
- memberEpochSeconds: 1576540098,
- memberHttpDate: 1576540098,
- memberDateTime: 1576540098,
- defaultFormat: 1576540098,
- targetEpochSeconds: 1576540098,
- targetHttpDate: 1576540098,
- targetDateTime: 1576540098,
- }
- },
+ id: "TimestampFormatHeaders"
+ documentation: "Tests how timestamp response headers are serialized"
+ protocol: restXml
+ code: 200
+ headers: { "X-memberEpochSeconds": "1576540098", "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberDateTime": "2019-12-16T23:48:18Z", "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetEpochSeconds": "1576540098", "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetDateTime": "2019-12-16T23:48:18Z" }
+ body: ""
+ params: { memberEpochSeconds: 1576540098, memberHttpDate: 1576540098, memberDateTime: 1576540098, defaultFormat: 1576540098, targetEpochSeconds: 1576540098, targetHttpDate: 1576540098, targetDateTime: 1576540098 }
+ }
])
structure TimestampFormatHeadersIO {
@httpHeader("X-memberEpochSeconds")
@timestampFormat("epoch-seconds")
- memberEpochSeconds: Timestamp,
+ memberEpochSeconds: Timestamp
@httpHeader("X-memberHttpDate")
@timestampFormat("http-date")
- memberHttpDate: Timestamp,
+ memberHttpDate: Timestamp
@httpHeader("X-memberDateTime")
@timestampFormat("date-time")
- memberDateTime: Timestamp,
+ memberDateTime: Timestamp
@httpHeader("X-defaultFormat")
- defaultFormat: Timestamp,
+ defaultFormat: Timestamp
@httpHeader("X-targetEpochSeconds")
- targetEpochSeconds: EpochSeconds,
+ targetEpochSeconds: EpochSeconds
@httpHeader("X-targetHttpDate")
- targetHttpDate: HttpDate,
+ targetHttpDate: HttpDate
@httpHeader("X-targetDateTime")
- targetDateTime: DateTime,
+ targetDateTime: DateTime
}
diff --git a/smithy-aws-protocol-tests/model/restXml/http-labels.smithy b/smithy-aws-protocol-tests/model/restXml/http-labels.smithy
index 6065f85e5d9..1993231f708 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-labels.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-labels.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP URI label bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httplabel-trait
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -10,158 +9,128 @@ use aws.protocoltests.shared#DateTime
use aws.protocoltests.shared#EpochSeconds
use aws.protocoltests.shared#HttpDate
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// The example tests how requests are serialized when there's no input
-/// payload but there are HTTP labels.
@readonly
-@http(method: "GET", uri: "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}")
+@http(
+ method: "GET"
+ uri: "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}"
+)
operation HttpRequestWithLabels {
input: HttpRequestWithLabelsInput
}
apply HttpRequestWithLabels @httpRequestTests([
{
- id: "InputWithHeadersAndAllParams",
- documentation: "Sends a GET request that uses URI label bindings",
- protocol: restXml,
- method: "GET",
- uri: "/HttpRequestWithLabels/string/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
- body: "",
- params: {
- string: "string",
- short: 1,
- integer: 2,
- long: 3,
- float: 4.1,
- double: 5.1,
- boolean: true,
- timestamp: 1576540098
- }
- },
+ id: "InputWithHeadersAndAllParams"
+ documentation: "Sends a GET request that uses URI label bindings"
+ protocol: restXml
+ method: "GET"
+ uri: "/HttpRequestWithLabels/string/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z"
+ body: ""
+ params: { string: "string", short: 1, integer: 2, long: 3, float: 4.1, double: 5.1, boolean: true, timestamp: 1576540098 }
+ }
{
- id: "HttpRequestLabelEscaping",
- documentation: "Sends a GET request that uses URI label bindings",
- protocol: restXml,
- method: "GET",
- uri: "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
- body: "",
- params: {
- string: " %:/?#[]@!$&'()*+,;=😹",
- short: 1,
- integer: 2,
- long: 3,
- float: 4.1,
- double: 5.1,
- boolean: true,
- timestamp: 1576540098
- }
- },
+ id: "HttpRequestLabelEscaping"
+ documentation: "Sends a GET request that uses URI label bindings"
+ protocol: restXml
+ method: "GET"
+ uri: "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z"
+ body: ""
+ params: { string: " %:/?#[]@!$&'()*+,;=😹", short: 1, integer: 2, long: 3, float: 4.1, double: 5.1, boolean: true, timestamp: 1576540098 }
+ }
])
structure HttpRequestWithLabelsInput {
@httpLabel
@required
- string: String,
+ string: String
@httpLabel
@required
- short: Short,
+ short: Short
@httpLabel
@required
- integer: Integer,
+ integer: Integer
@httpLabel
@required
- long: Long,
+ long: Long
@httpLabel
@required
- float: Float,
+ float: Float
@httpLabel
@required
- double: Double,
+ double: Double
/// Serialized in the path as true or false.
@httpLabel
@required
- boolean: Boolean,
+ boolean: Boolean
/// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
@httpLabel
@required
- timestamp: Timestamp,
+ timestamp: Timestamp
}
/// The example tests how requests serialize different timestamp formats in the
/// URI path.
@readonly
-@http(method: "GET", uri: "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}")
+@http(
+ method: "GET"
+ uri: "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}"
+)
operation HttpRequestWithLabelsAndTimestampFormat {
input: HttpRequestWithLabelsAndTimestampFormatInput
}
apply HttpRequestWithLabelsAndTimestampFormat @httpRequestTests([
{
- id: "HttpRequestWithLabelsAndTimestampFormat",
- documentation: "Serializes different timestamp formats in URI labels",
- protocol: restXml,
- method: "GET",
+ id: "HttpRequestWithLabelsAndTimestampFormat"
+ documentation: "Serializes different timestamp formats in URI labels"
+ protocol: restXml
+ method: "GET"
uri: """
- /HttpRequestWithLabelsAndTimestampFormat\
- /1576540098\
- /Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT\
- /2019-12-16T23%3A48%3A18Z\
- /2019-12-16T23%3A48%3A18Z\
- /1576540098\
- /Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT\
- /2019-12-16T23%3A48%3A18Z""",
- body: "",
- params: {
- memberEpochSeconds: 1576540098,
- memberHttpDate: 1576540098,
- memberDateTime: 1576540098,
- defaultFormat: 1576540098,
- targetEpochSeconds: 1576540098,
- targetHttpDate: 1576540098,
- targetDateTime: 1576540098,
- }
- },
+ /HttpRequestWithLabelsAndTimestampFormat/1576540098/Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT/2019-12-16T23%3A48%3A18Z/2019-12-16T23%3A48%3A18Z/1576540098/Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT/2019-12-16T23%3A48%3A18Z"""
+ body: ""
+ params: { memberEpochSeconds: 1576540098, memberHttpDate: 1576540098, memberDateTime: 1576540098, defaultFormat: 1576540098, targetEpochSeconds: 1576540098, targetHttpDate: 1576540098, targetDateTime: 1576540098 }
+ }
])
structure HttpRequestWithLabelsAndTimestampFormatInput {
@httpLabel
@required
@timestampFormat("epoch-seconds")
- memberEpochSeconds: Timestamp,
+ memberEpochSeconds: Timestamp
@httpLabel
@required
@timestampFormat("http-date")
- memberHttpDate: Timestamp,
+ memberHttpDate: Timestamp
@httpLabel
@required
@timestampFormat("date-time")
- memberDateTime: Timestamp,
+ memberDateTime: Timestamp
@httpLabel
@required
- defaultFormat: Timestamp,
+ defaultFormat: Timestamp
@httpLabel
@required
- targetEpochSeconds: EpochSeconds,
+ targetEpochSeconds: EpochSeconds
@httpLabel
@required
- targetHttpDate: HttpDate,
+ targetHttpDate: HttpDate
@httpLabel
@required
- targetDateTime: DateTime,
+ targetDateTime: DateTime
}
// This example uses a greedy label and a normal label.
@@ -173,66 +142,54 @@ operation HttpRequestWithGreedyLabelInPath {
apply HttpRequestWithGreedyLabelInPath @httpRequestTests([
{
- id: "HttpRequestWithGreedyLabelInPath",
- documentation: "Serializes greedy labels and normal labels",
- protocol: restXml,
- method: "GET",
- uri: "/HttpRequestWithGreedyLabelInPath/foo/hello/baz/there/guy",
- body: "",
- params: {
- foo: "hello",
- baz: "there/guy",
- }
- },
+ id: "HttpRequestWithGreedyLabelInPath"
+ documentation: "Serializes greedy labels and normal labels"
+ protocol: restXml
+ method: "GET"
+ uri: "/HttpRequestWithGreedyLabelInPath/foo/hello/baz/there/guy"
+ body: ""
+ params: { foo: "hello", baz: "there/guy" }
+ }
])
structure HttpRequestWithGreedyLabelInPathInput {
@httpLabel
@required
- foo: String,
+ foo: String
@httpLabel
@required
- baz: String,
+ baz: String
}
apply HttpRequestWithFloatLabels @httpRequestTests([
{
- id: "RestXmlSupportsNaNFloatLabels",
- documentation: "Supports handling NaN float label values.",
- protocol: restXml,
- method: "GET",
- uri: "/FloatHttpLabels/NaN/NaN",
- body: "",
- params: {
- float: "NaN",
- double: "NaN",
- }
- },
+ id: "RestXmlSupportsNaNFloatLabels"
+ documentation: "Supports handling NaN float label values."
+ protocol: restXml
+ method: "GET"
+ uri: "/FloatHttpLabels/NaN/NaN"
+ body: ""
+ params: { float: "NaN", double: "NaN" }
+ }
{
- id: "RestXmlSupportsInfinityFloatLabels",
- documentation: "Supports handling Infinity float label values.",
- protocol: restXml,
- method: "GET",
- uri: "/FloatHttpLabels/Infinity/Infinity",
- body: "",
- params: {
- float: "Infinity",
- double: "Infinity",
- }
- },
+ id: "RestXmlSupportsInfinityFloatLabels"
+ documentation: "Supports handling Infinity float label values."
+ protocol: restXml
+ method: "GET"
+ uri: "/FloatHttpLabels/Infinity/Infinity"
+ body: ""
+ params: { float: "Infinity", double: "Infinity" }
+ }
{
- id: "RestXmlSupportsNegativeInfinityFloatLabels",
- documentation: "Supports handling -Infinity float label values.",
- protocol: restXml,
- method: "GET",
- uri: "/FloatHttpLabels/-Infinity/-Infinity",
- body: "",
- params: {
- float: "-Infinity",
- double: "-Infinity",
- }
- },
+ id: "RestXmlSupportsNegativeInfinityFloatLabels"
+ documentation: "Supports handling -Infinity float label values."
+ protocol: restXml
+ method: "GET"
+ uri: "/FloatHttpLabels/-Infinity/-Infinity"
+ body: ""
+ params: { float: "-Infinity", double: "-Infinity" }
+ }
])
@readonly
@@ -244,9 +201,9 @@ operation HttpRequestWithFloatLabels {
structure HttpRequestWithFloatLabelsInput {
@httpLabel
@required
- float: Float,
-
+ float: Float
+
@httpLabel
@required
- double: Double,
+ double: Double
}
diff --git a/smithy-aws-protocol-tests/model/restXml/http-payload.smithy b/smithy-aws-protocol-tests/model/restXml/http-payload.smithy
index 002139cf4bc..7ba7fc83943 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-payload.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-payload.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP payload bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httppayload-trait
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -16,137 +15,103 @@ use smithy.test#httpResponseTests
/// not a structure or a union type.
@http(uri: "/HttpPayloadTraits", method: "POST")
operation HttpPayloadTraits {
- input: HttpPayloadTraitsInputOutput,
+ input: HttpPayloadTraitsInputOutput
output: HttpPayloadTraitsInputOutput
}
apply HttpPayloadTraits @httpRequestTests([
{
- id: "HttpPayloadTraitsWithBlob",
- documentation: "Serializes a blob in the HTTP payload",
- protocol: restXml,
- method: "POST",
- uri: "/HttpPayloadTraits",
- body: "blobby blob blob",
- headers: {
- "X-Foo": "Foo"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "HttpPayloadTraitsWithBlob"
+ documentation: "Serializes a blob in the HTTP payload"
+ protocol: restXml
+ method: "POST"
+ uri: "/HttpPayloadTraits"
+ body: "blobby blob blob"
+ headers: { "X-Foo": "Foo" }
+ requireHeaders: ["Content-Length"]
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "HttpPayloadTraitsWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restXml,
- method: "POST",
- uri: "/HttpPayloadTraits",
- body: "",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
- },
+ id: "HttpPayloadTraitsWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restXml
+ method: "POST"
+ uri: "/HttpPayloadTraits"
+ body: ""
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
+ }
])
apply HttpPayloadTraits @httpResponseTests([
{
- id: "HttpPayloadTraitsWithBlob",
- documentation: "Serializes a blob in the HTTP payload",
- protocol: restXml,
- code: 200,
- body: "blobby blob blob",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
- },
+ id: "HttpPayloadTraitsWithBlob"
+ documentation: "Serializes a blob in the HTTP payload"
+ protocol: restXml
+ code: 200
+ body: "blobby blob blob"
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
+ }
{
- id: "HttpPayloadTraitsWithNoBlobBody",
- documentation: "Serializes an empty blob in the HTTP payload",
- protocol: restXml,
- code: 200,
- body: "",
- headers: {
- "X-Foo": "Foo"
- },
- params: {
- foo: "Foo"
- }
+ id: "HttpPayloadTraitsWithNoBlobBody"
+ documentation: "Serializes an empty blob in the HTTP payload"
+ protocol: restXml
+ code: 200
+ body: ""
+ headers: { "X-Foo": "Foo" }
+ params: { foo: "Foo" }
}
])
structure HttpPayloadTraitsInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
- blob: Blob,
+ blob: Blob
}
/// This example uses a `@mediaType` trait on the payload to force a custom
/// content-type to be serialized.
@http(uri: "/HttpPayloadTraitsWithMediaType", method: "POST")
operation HttpPayloadTraitsWithMediaType {
- input: HttpPayloadTraitsWithMediaTypeInputOutput,
+ input: HttpPayloadTraitsWithMediaTypeInputOutput
output: HttpPayloadTraitsWithMediaTypeInputOutput
}
apply HttpPayloadTraitsWithMediaType @httpRequestTests([
{
- id: "HttpPayloadTraitsWithMediaTypeWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a content-type",
- protocol: restXml,
- method: "POST",
- uri: "/HttpPayloadTraitsWithMediaType",
- body: "blobby blob blob",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "text/plain"
- },
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
+ id: "HttpPayloadTraitsWithMediaTypeWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a content-type"
+ protocol: restXml
+ method: "POST"
+ uri: "/HttpPayloadTraitsWithMediaType"
+ body: "blobby blob blob"
+ headers: { "X-Foo": "Foo", "Content-Type": "text/plain" }
+ requireHeaders: ["Content-Length"]
+ params: { foo: "Foo", blob: "blobby blob blob" }
}
])
apply HttpPayloadTraitsWithMediaType @httpResponseTests([
{
- id: "HttpPayloadTraitsWithMediaTypeWithBlob",
- documentation: "Serializes a blob in the HTTP payload with a content-type",
- protocol: restXml,
- code: 200,
- body: "blobby blob blob",
- headers: {
- "X-Foo": "Foo",
- "Content-Type": "text/plain"
- },
- params: {
- foo: "Foo",
- blob: "blobby blob blob"
- }
+ id: "HttpPayloadTraitsWithMediaTypeWithBlob"
+ documentation: "Serializes a blob in the HTTP payload with a content-type"
+ protocol: restXml
+ code: 200
+ body: "blobby blob blob"
+ headers: { "X-Foo": "Foo", "Content-Type": "text/plain" }
+ params: { foo: "Foo", blob: "blobby blob blob" }
}
])
structure HttpPayloadTraitsWithMediaTypeInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPayload
- blob: TextPlainBlob,
+ blob: TextPlainBlob
}
/// This example serializes a structure in the payload.
@@ -156,72 +121,60 @@ structure HttpPayloadTraitsWithMediaTypeInputOutput {
@idempotent
@http(uri: "/HttpPayloadWithStructure", method: "PUT")
operation HttpPayloadWithStructure {
- input: HttpPayloadWithStructureInputOutput,
+ input: HttpPayloadWithStructureInputOutput
output: HttpPayloadWithStructureInputOutput
}
apply HttpPayloadWithStructure @httpRequestTests([
{
- id: "HttpPayloadWithStructure",
- documentation: "Serializes a structure in the payload",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithStructure",
+ id: "HttpPayloadWithStructure"
+ documentation: "Serializes a structure in the payload"
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithStructure"
body: """
-
- hello
- Phreddy
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- requireHeaders: [
- "Content-Length"
- ],
+
+ hello
+ Phreddy
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- greeting: "hello",
- name: "Phreddy"
- }
+ nested: { greeting: "hello", name: "Phreddy" }
}
}
])
apply HttpPayloadWithStructure @httpResponseTests([
{
- id: "HttpPayloadWithStructure",
- documentation: "Serializes a structure in the payload",
- protocol: restXml,
- code: 200,
+ id: "HttpPayloadWithStructure"
+ documentation: "Serializes a structure in the payload"
+ protocol: restXml
+ code: 200
body: """
hello
Phreddy
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- greeting: "hello",
- name: "Phreddy"
- }
+ nested: { greeting: "hello", name: "Phreddy" }
}
}
])
structure HttpPayloadWithStructureInputOutput {
@httpPayload
- nested: NestedPayload,
+ nested: NestedPayload
}
structure NestedPayload {
- greeting: String,
- name: String,
+ greeting: String
+ name: String
}
/// The following example serializes a payload that uses an XML name,
@@ -229,55 +182,45 @@ structure NestedPayload {
@idempotent
@http(uri: "/HttpPayloadWithXmlName", method: "PUT")
operation HttpPayloadWithXmlName {
- input: HttpPayloadWithXmlNameInputOutput,
+ input: HttpPayloadWithXmlNameInputOutput
output: HttpPayloadWithXmlNameInputOutput
}
apply HttpPayloadWithXmlName @httpRequestTests([
{
- id: "HttpPayloadWithXmlName",
- documentation: "Serializes a structure in the payload using a wrapper name based on xmlName",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithXmlName",
- body: "Phreddy",
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "HttpPayloadWithXmlName"
+ documentation: "Serializes a structure in the payload using a wrapper name based on xmlName"
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithXmlName"
+ body: "Phreddy"
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
apply HttpPayloadWithXmlName @httpResponseTests([
{
- id: "HttpPayloadWithXmlName",
- documentation: "Serializes a structure in the payload using a wrapper name based on xmlName",
- protocol: restXml,
- code: 200,
- body: "Phreddy",
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ id: "HttpPayloadWithXmlName"
+ documentation: "Serializes a structure in the payload using a wrapper name based on xmlName"
+ protocol: restXml
+ code: 200
+ body: "Phreddy"
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
structure HttpPayloadWithXmlNameInputOutput {
@httpPayload
- nested: PayloadWithXmlName,
+ nested: PayloadWithXmlName
}
@xmlName("Hello")
@@ -290,105 +233,84 @@ structure PayloadWithXmlName {
@idempotent
@http(uri: "/BodyWithXmlName", method: "PUT")
operation BodyWithXmlName {
- input: BodyWithXmlNameInputOutput,
+ input: BodyWithXmlNameInputOutput
output: BodyWithXmlNameInputOutput
}
apply BodyWithXmlName @httpRequestTests([
{
- id: "BodyWithXmlName",
- documentation: "Serializes a payload using a wrapper name based on the xmlName",
- protocol: restXml,
- method: "PUT",
- uri: "/BodyWithXmlName",
- body: "Phreddy",
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "BodyWithXmlName"
+ documentation: "Serializes a payload using a wrapper name based on the xmlName"
+ protocol: restXml
+ method: "PUT"
+ uri: "/BodyWithXmlName"
+ body: "Phreddy"
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
apply BodyWithXmlName @httpResponseTests([
{
- id: "BodyWithXmlName",
- documentation: "Serializes a payload using a wrapper name based on the xmlName",
- protocol: restXml,
- code: 200,
- body: "Phreddy",
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ id: "BodyWithXmlName"
+ documentation: "Serializes a payload using a wrapper name based on the xmlName"
+ protocol: restXml
+ code: 200
+ body: "Phreddy"
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
@xmlName("Ahoy")
structure BodyWithXmlNameInputOutput {
- nested: PayloadWithXmlName,
+ nested: PayloadWithXmlName
}
/// The following example serializes a payload that uses an XML name
/// on the member, changing the wrapper name.
-
@idempotent
@http(uri: "/HttpPayloadWithMemberXmlName", method: "PUT")
operation HttpPayloadWithMemberXmlName {
- input: HttpPayloadWithMemberXmlNameInputOutput,
+ input: HttpPayloadWithMemberXmlNameInputOutput
output: HttpPayloadWithMemberXmlNameInputOutput
}
apply HttpPayloadWithMemberXmlName @httpRequestTests([
{
- id: "HttpPayloadWithMemberXmlName",
- documentation: "Serializes a structure in the payload using a wrapper name based on member xmlName",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithMemberXmlName",
- body: "Phreddy",
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "HttpPayloadWithMemberXmlName"
+ documentation: "Serializes a structure in the payload using a wrapper name based on member xmlName"
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithMemberXmlName"
+ body: "Phreddy"
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
apply HttpPayloadWithMemberXmlName @httpResponseTests([
{
- id: "HttpPayloadWithMemberXmlName",
- documentation: "Serializes a structure in the payload using a wrapper name based on member xmlName",
- protocol: restXml,
- code: 200,
- body: "Phreddy",
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+ id: "HttpPayloadWithMemberXmlName"
+ documentation: "Serializes a structure in the payload using a wrapper name based on member xmlName"
+ protocol: restXml
+ code: 200
+ body: "Phreddy"
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
@@ -396,68 +318,58 @@ apply HttpPayloadWithMemberXmlName @httpResponseTests([
structure HttpPayloadWithMemberXmlNameInputOutput {
@httpPayload
@xmlName("Hola")
- nested: PayloadWithXmlName,
+ nested: PayloadWithXmlName
}
/// The following example serializes a payload that uses an XML namespace.
@idempotent
@http(uri: "/HttpPayloadWithXmlNamespace", method: "PUT")
operation HttpPayloadWithXmlNamespace {
- input: HttpPayloadWithXmlNamespaceInputOutput,
+ input: HttpPayloadWithXmlNamespaceInputOutput
output: HttpPayloadWithXmlNamespaceInputOutput
}
apply HttpPayloadWithXmlNamespace @httpRequestTests([
{
- id: "HttpPayloadWithXmlNamespace",
- documentation: "Serializes a structure in the payload using a wrapper with an XML namespace",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithXmlNamespace",
+ id: "HttpPayloadWithXmlNamespace"
+ documentation: "Serializes a structure in the payload using a wrapper with an XML namespace"
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithXmlNamespace"
body: """
-
- Phreddy
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- requireHeaders: [
- "Content-Length"
- ],
+
+ Phreddy
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
apply HttpPayloadWithXmlNamespace @httpResponseTests([
{
- id: "HttpPayloadWithXmlNamespace",
- documentation: "Serializes a structure in the payload using a wrapper with an XML namespace",
- protocol: restXml,
- code: 200,
+ id: "HttpPayloadWithXmlNamespace"
+ documentation: "Serializes a structure in the payload using a wrapper with an XML namespace"
+ protocol: restXml
+ code: 200
body: """
-
- Phreddy
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ Phreddy
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
structure HttpPayloadWithXmlNamespaceInputOutput {
@httpPayload
- nested: PayloadWithXmlNamespace,
+ nested: PayloadWithXmlNamespace
}
@xmlNamespace(uri: "http://foo.com")
@@ -469,61 +381,51 @@ structure PayloadWithXmlNamespace {
@idempotent
@http(uri: "/HttpPayloadWithXmlNamespaceAndPrefix", method: "PUT")
operation HttpPayloadWithXmlNamespaceAndPrefix {
- input: HttpPayloadWithXmlNamespaceAndPrefixInputOutput,
+ input: HttpPayloadWithXmlNamespaceAndPrefixInputOutput
output: HttpPayloadWithXmlNamespaceAndPrefixInputOutput
}
apply HttpPayloadWithXmlNamespaceAndPrefix @httpRequestTests([
{
- id: "HttpPayloadWithXmlNamespaceAndPrefix",
- documentation: "Serializes a structure in the payload using a wrapper with an XML namespace",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithXmlNamespaceAndPrefix",
+ id: "HttpPayloadWithXmlNamespaceAndPrefix"
+ documentation: "Serializes a structure in the payload using a wrapper with an XML namespace"
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithXmlNamespaceAndPrefix"
body: """
-
- Phreddy
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
- requireHeaders: [
- "Content-Length"
- ],
+
+ Phreddy
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
apply HttpPayloadWithXmlNamespaceAndPrefix @httpResponseTests([
{
- id: "HttpPayloadWithXmlNamespaceAndPrefix",
- documentation: "Serializes a structure in the payload using a wrapper with an XML namespace",
- protocol: restXml,
- code: 200,
+ id: "HttpPayloadWithXmlNamespaceAndPrefix"
+ documentation: "Serializes a structure in the payload using a wrapper with an XML namespace"
+ protocol: restXml
+ code: 200
body: """
-
- Phreddy
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml"
- },
+
+ Phreddy
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- name: "Phreddy"
- }
+ nested: { name: "Phreddy" }
}
}
])
structure HttpPayloadWithXmlNamespaceAndPrefixInputOutput {
@httpPayload
- nested: PayloadWithXmlNamespaceAndPrefix,
+ nested: PayloadWithXmlNamespaceAndPrefix
}
@xmlNamespace(uri: "http://foo.com", prefix: "baz")
@@ -531,86 +433,73 @@ structure PayloadWithXmlNamespaceAndPrefix {
name: String
}
-
/// This example serializes a union in the payload.
@idempotent
@http(uri: "/HttpPayloadWithUnion", method: "PUT")
operation HttpPayloadWithUnion {
- input: HttpPayloadWithUnionInputOutput,
+ input: HttpPayloadWithUnionInputOutput
output: HttpPayloadWithUnionInputOutput
}
apply HttpPayloadWithUnion @httpRequestTests([
{
- id: "RestXmlHttpPayloadWithUnion",
- documentation: "Serializes a union in the payload.",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithUnion",
+ id: "RestXmlHttpPayloadWithUnion"
+ documentation: "Serializes a union in the payload."
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithUnion"
body: """
-
- hello
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
- requireHeaders: [
- "Content-Length"
- ],
+
+ hello
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
+ requireHeaders: ["Content-Length"]
params: {
- nested: {
- greeting: "hello"
- }
+ nested: { greeting: "hello" }
}
- },
+ }
{
- id: "RestXmlHttpPayloadWithUnsetUnion",
- documentation: "No payload is sent if the union has no value.",
- protocol: restXml,
- method: "PUT",
- uri: "/HttpPayloadWithUnion",
- body: "",
+ id: "RestXmlHttpPayloadWithUnsetUnion"
+ documentation: "No payload is sent if the union has no value."
+ protocol: restXml
+ method: "PUT"
+ uri: "/HttpPayloadWithUnion"
+ body: ""
params: {}
}
])
apply HttpPayloadWithUnion @httpResponseTests([
{
- id: "RestXmlHttpPayloadWithUnion",
- documentation: "Serializes a union in the payload.",
- protocol: restXml,
- code: 200,
+ id: "RestXmlHttpPayloadWithUnion"
+ documentation: "Serializes a union in the payload."
+ protocol: restXml
+ code: 200
body: """
-
- hello
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- },
+
+ hello
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml" }
params: {
- nested: {
- greeting: "hello"
- }
+ nested: { greeting: "hello" }
}
- },
+ }
{
- id: "RestXmlHttpPayloadWithUnsetUnion",
- documentation: "No payload is sent if the union has no value.",
- protocol: restXml,
- code: 200,
- body: "",
- headers: {
- "Content-Length": "0"
- },
+ id: "RestXmlHttpPayloadWithUnsetUnion"
+ documentation: "No payload is sent if the union has no value."
+ protocol: restXml
+ code: 200
+ body: ""
+ headers: { "Content-Length": "0" }
params: {}
}
])
structure HttpPayloadWithUnionInputOutput {
@httpPayload
- nested: UnionPayload,
+ nested: UnionPayload
}
union UnionPayload {
diff --git a/smithy-aws-protocol-tests/model/restXml/http-prefix-headers.smithy b/smithy-aws-protocol-tests/model/restXml/http-prefix-headers.smithy
index eb99631c59a..200bf9e0d2b 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-prefix-headers.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-prefix-headers.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test httpPrefix headers.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpprefixheaders-trait
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -14,94 +13,76 @@ use smithy.test#httpResponseTests
@http(uri: "/HttpPrefixHeaders", method: "GET")
@externalDocumentation("httpPrefixHeaders Trait": "https://smithy.io/2.0/spec/http-bindings.html#httpprefixheaders-trait")
operation HttpPrefixHeaders {
- input: HttpPrefixHeadersInputOutput,
+ input: HttpPrefixHeadersInputOutput
output: HttpPrefixHeadersInputOutput
}
apply HttpPrefixHeaders @httpRequestTests([
{
- id: "HttpPrefixHeadersArePresent",
- documentation: "Adds headers by prefix",
- protocol: restXml,
- method: "GET",
- uri: "/HttpPrefixHeaders",
- body: "",
- headers: {
- "X-Foo": "Foo",
- "X-Foo-Abc": "Abc value",
- "X-Foo-Def": "Def value",
- },
+ id: "HttpPrefixHeadersArePresent"
+ documentation: "Adds headers by prefix"
+ protocol: restXml
+ method: "GET"
+ uri: "/HttpPrefixHeaders"
+ body: ""
+ headers: { "X-Foo": "Foo", "X-Foo-Abc": "Abc value", "X-Foo-Def": "Def value" }
params: {
- foo: "Foo",
- fooMap: {
- Abc: "Abc value",
- Def: "Def value",
- }
+ foo: "Foo"
+ fooMap: { Abc: "Abc value", Def: "Def value" }
}
- },
+ }
{
- id: "HttpPrefixHeadersAreNotPresent",
- documentation: "No prefix headers are serialized because the value is empty",
- protocol: restXml,
- method: "GET",
- uri: "/HttpPrefixHeaders",
- body: "",
- headers: {
- "X-Foo": "Foo"
- },
+ id: "HttpPrefixHeadersAreNotPresent"
+ documentation: "No prefix headers are serialized because the value is empty"
+ protocol: restXml
+ method: "GET"
+ uri: "/HttpPrefixHeaders"
+ body: ""
+ headers: { "X-Foo": "Foo" }
params: {
- foo: "Foo",
+ foo: "Foo"
fooMap: {}
- },
+ }
appliesTo: "client"
- },
+ }
])
apply HttpPrefixHeaders @httpResponseTests([
{
- id: "HttpPrefixHeadersArePresent",
- documentation: "Adds headers by prefix",
- protocol: restXml,
- code: 200,
- body: "",
- headers: {
- "X-Foo": "Foo",
- "X-Foo-Abc": "Abc value",
- "X-Foo-Def": "Def value",
- },
+ id: "HttpPrefixHeadersArePresent"
+ documentation: "Adds headers by prefix"
+ protocol: restXml
+ code: 200
+ body: ""
+ headers: { "X-Foo": "Foo", "X-Foo-Abc": "Abc value", "X-Foo-Def": "Def value" }
params: {
- foo: "Foo",
- fooMap: {
- Abc: "Abc value",
- Def: "Def value",
- }
+ foo: "Foo"
+ fooMap: { Abc: "Abc value", Def: "Def value" }
}
- },
+ }
{
- id: "HttpPrefixHeadersAreNotPresent",
- documentation: "No prefix headers are serialized because the value is empty",
- protocol: restXml,
- code: 200,
- body: "",
- headers: {
- "X-Foo": "Foo"
- },
+ id: "HttpPrefixHeadersAreNotPresent"
+ documentation: "No prefix headers are serialized because the value is empty"
+ protocol: restXml
+ code: 200
+ body: ""
+ headers: { "X-Foo": "Foo" }
params: {
- foo: "Foo",
+ foo: "Foo"
fooMap: {}
}
- },
+ }
])
structure HttpPrefixHeadersInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
@httpPrefixHeaders("X-Foo-")
- fooMap: FooPrefixHeaders,
+ fooMap: FooPrefixHeaders
}
map FooPrefixHeaders {
- key: String,
- value: String,
+ key: String
+ value: String
}
diff --git a/smithy-aws-protocol-tests/model/restXml/http-query.smithy b/smithy-aws-protocol-tests/model/restXml/http-query.smithy
index 017003b411e..443e49e64f7 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-query.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-query.smithy
@@ -1,7 +1,6 @@
// This file defines test cases that test HTTP query string bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpquery-trait and
// https://smithy.io/2.0/spec/http-bindings.html#httpqueryparams-trait
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -32,154 +31,88 @@ operation AllQueryStringTypes {
apply AllQueryStringTypes @httpRequestTests([
{
- id: "AllQueryStringTypes",
- documentation: "Serializes query string parameters with all supported types",
- protocol: restXml,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "String=Hello%20there",
- "StringList=a",
- "StringList=b",
- "StringList=c",
- "StringSet=a",
- "StringSet=b",
- "StringSet=c",
- "Byte=1",
- "Short=2",
- "Integer=3",
- "IntegerList=1",
- "IntegerList=2",
- "IntegerList=3",
- "IntegerSet=1",
- "IntegerSet=2",
- "IntegerSet=3",
- "Long=4",
- "Float=1.1",
- "Double=1.1",
- "DoubleList=1.1",
- "DoubleList=2.1",
- "DoubleList=3.1",
- "Boolean=true",
- "BooleanList=true",
- "BooleanList=false",
- "BooleanList=true",
- "Timestamp=1970-01-01T00%3A00%3A01Z",
- "TimestampList=1970-01-01T00%3A00%3A01Z",
- "TimestampList=1970-01-01T00%3A00%3A02Z",
- "TimestampList=1970-01-01T00%3A00%3A03Z",
- "Enum=Foo",
- "EnumList=Foo",
- "EnumList=Baz",
- "EnumList=Bar",
- "IntegerEnum=1",
- "IntegerEnumList=1",
- "IntegerEnumList=2",
- ],
+ id: "AllQueryStringTypes"
+ documentation: "Serializes query string parameters with all supported types"
+ protocol: restXml
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["String=Hello%20there", "StringList=a", "StringList=b", "StringList=c", "StringSet=a", "StringSet=b", "StringSet=c", "Byte=1", "Short=2", "Integer=3", "IntegerList=1", "IntegerList=2", "IntegerList=3", "IntegerSet=1", "IntegerSet=2", "IntegerSet=3", "Long=4", "Float=1.1", "Double=1.1", "DoubleList=1.1", "DoubleList=2.1", "DoubleList=3.1", "Boolean=true", "BooleanList=true", "BooleanList=false", "BooleanList=true", "Timestamp=1970-01-01T00%3A00%3A01Z", "TimestampList=1970-01-01T00%3A00%3A01Z", "TimestampList=1970-01-01T00%3A00%3A02Z", "TimestampList=1970-01-01T00%3A00%3A03Z", "Enum=Foo", "EnumList=Foo", "EnumList=Baz", "EnumList=Bar", "IntegerEnum=1", "IntegerEnumList=1", "IntegerEnumList=2"]
params: {
- queryString: "Hello there",
- queryStringList: ["a", "b", "c"],
- queryStringSet: ["a", "b", "c"],
- queryByte: 1,
- queryShort: 2,
- queryInteger: 3,
- queryIntegerList: [1, 2, 3],
- queryIntegerSet: [1, 2, 3],
- queryLong: 4,
- queryFloat: 1.1,
- queryDouble: 1.1,
- queryDoubleList: [1.1, 2.1, 3.1],
- queryBoolean: true,
- queryBooleanList: [true, false, true],
- queryTimestamp: 1,
- queryTimestampList: [1, 2, 3],
- queryEnum: "Foo",
- queryEnumList: ["Foo", "Baz", "Bar"],
- queryIntegerEnum: 1,
- queryIntegerEnumList: [1, 2],
+ queryString: "Hello there"
+ queryStringList: ["a", "b", "c"]
+ queryStringSet: ["a", "b", "c"]
+ queryByte: 1
+ queryShort: 2
+ queryInteger: 3
+ queryIntegerList: [1, 2, 3]
+ queryIntegerSet: [1, 2, 3]
+ queryLong: 4
+ queryFloat: 1.1
+ queryDouble: 1.1
+ queryDoubleList: [1.1, 2.1, 3.1]
+ queryBoolean: true
+ queryBooleanList: [true, false, true]
+ queryTimestamp: 1
+ queryTimestampList: [1, 2, 3]
+ queryEnum: "Foo"
+ queryEnumList: ["Foo", "Baz", "Bar"]
+ queryIntegerEnum: 1
+ queryIntegerEnumList: [1, 2]
}
- },
+ }
{
- id: "RestXmlQueryStringMap",
- documentation: "Handles query string maps",
- protocol: restXml,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "QueryParamsStringKeyA=Foo",
- "QueryParamsStringKeyB=Bar",
- ],
+ id: "RestXmlQueryStringMap"
+ documentation: "Handles query string maps"
+ protocol: restXml
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["QueryParamsStringKeyA=Foo", "QueryParamsStringKeyB=Bar"]
params: {
- queryParamsMapOfStrings: {
- "QueryParamsStringKeyA": "Foo",
- "QueryParamsStringKeyB": "Bar",
- },
+ queryParamsMapOfStrings: { QueryParamsStringKeyA: "Foo", QueryParamsStringKeyB: "Bar" }
}
- },
+ }
{
- id: "RestXmlQueryStringEscaping",
- documentation: "Handles escaping all required characters in the query string.",
- protocol: restXml,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9",
- ],
- params: {
- queryString: " %:/?#[]@!$&'()*+,;=😹",
- }
- },
+ id: "RestXmlQueryStringEscaping"
+ documentation: "Handles escaping all required characters in the query string."
+ protocol: restXml
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"]
+ params: { queryString: " %:/?#[]@!$&'()*+,;=😹" }
+ }
{
- id: "RestXmlSupportsNaNFloatQueryValues",
- documentation: "Supports handling NaN float query values.",
- protocol: restXml,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "Float=NaN",
- "Double=NaN",
- ],
- params: {
- queryFloat: "NaN",
- queryDouble: "NaN",
- }
- },
+ id: "RestXmlSupportsNaNFloatQueryValues"
+ documentation: "Supports handling NaN float query values."
+ protocol: restXml
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["Float=NaN", "Double=NaN"]
+ params: { queryFloat: "NaN", queryDouble: "NaN" }
+ }
{
- id: "RestXmlSupportsInfinityFloatQueryValues",
- documentation: "Supports handling Infinity float query values.",
- protocol: restXml,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "Float=Infinity",
- "Double=Infinity",
- ],
- params: {
- queryFloat: "Infinity",
- queryDouble: "Infinity",
- }
- },
+ id: "RestXmlSupportsInfinityFloatQueryValues"
+ documentation: "Supports handling Infinity float query values."
+ protocol: restXml
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["Float=Infinity", "Double=Infinity"]
+ params: { queryFloat: "Infinity", queryDouble: "Infinity" }
+ }
{
- id: "RestXmlSupportsNegativeInfinityFloatQueryValues",
- documentation: "Supports handling -Infinity float query values.",
- protocol: restXml,
- method: "GET",
- uri: "/AllQueryStringTypesInput",
- body: "",
- queryParams: [
- "Float=-Infinity",
- "Double=-Infinity",
- ],
- params: {
- queryFloat: "-Infinity",
- queryDouble: "-Infinity",
- }
- },
+ id: "RestXmlSupportsNegativeInfinityFloatQueryValues"
+ documentation: "Supports handling -Infinity float query values."
+ protocol: restXml
+ method: "GET"
+ uri: "/AllQueryStringTypesInput"
+ body: ""
+ queryParams: ["Float=-Infinity", "Double=-Infinity"]
+ params: { queryFloat: "-Infinity", queryDouble: "-Infinity" }
+ }
{
id: "RestXmlZeroAndFalseQueryValues"
documentation: "Query values of 0 and false are serialized"
@@ -187,81 +120,75 @@ apply AllQueryStringTypes @httpRequestTests([
method: "GET"
uri: "/AllQueryStringTypesInput"
body: ""
- queryParams: [
- "Integer=0"
- "Boolean=false"
- ]
- params: {
- queryInteger: 0
- queryBoolean: false
- }
+ queryParams: ["Integer=0", "Boolean=false"]
+ params: { queryInteger: 0, queryBoolean: false }
}
])
@suppress(["HttpQueryParamsTrait"])
structure AllQueryStringTypesInput {
@httpQuery("String")
- queryString: String,
+ queryString: String
@httpQuery("StringList")
- queryStringList: StringList,
+ queryStringList: StringList
@httpQuery("StringSet")
- queryStringSet: StringSet,
+ queryStringSet: StringSet
@httpQuery("Byte")
- queryByte: Byte,
+ queryByte: Byte
@httpQuery("Short")
- queryShort: Short,
+ queryShort: Short
@httpQuery("Integer")
- queryInteger: Integer,
+ queryInteger: Integer
@httpQuery("IntegerList")
- queryIntegerList: IntegerList,
+ queryIntegerList: IntegerList
@httpQuery("IntegerSet")
- queryIntegerSet: IntegerSet,
+ queryIntegerSet: IntegerSet
@httpQuery("Long")
- queryLong: Long,
+ queryLong: Long
@httpQuery("Float")
- queryFloat: Float,
+ queryFloat: Float
@httpQuery("Double")
- queryDouble: Double,
+ queryDouble: Double
@httpQuery("DoubleList")
- queryDoubleList: DoubleList,
+ queryDoubleList: DoubleList
@httpQuery("Boolean")
- queryBoolean: Boolean,
+ queryBoolean: Boolean
@httpQuery("BooleanList")
- queryBooleanList: BooleanList,
+ queryBooleanList: BooleanList
@httpQuery("Timestamp")
- queryTimestamp: Timestamp,
+ queryTimestamp: Timestamp
@httpQuery("TimestampList")
- queryTimestampList: TimestampList,
+ queryTimestampList: TimestampList
@httpQuery("Enum")
- queryEnum: FooEnum,
+ queryEnum: FooEnum
@httpQuery("EnumList")
- queryEnumList: FooEnumList,
+ queryEnumList: FooEnumList
@httpQuery("IntegerEnum")
- queryIntegerEnum: IntegerEnum,
+ queryIntegerEnum: IntegerEnum
@httpQuery("IntegerEnumList")
- queryIntegerEnumList: IntegerEnumList,
+ queryIntegerEnumList: IntegerEnumList
@httpQueryParams
- queryParamsMapOfStrings: StringMap,
+ queryParamsMapOfStrings: StringMap
}
/// This example uses a constant query string parameters and a label.
@@ -272,20 +199,15 @@ structure AllQueryStringTypesInput {
@http(uri: "/ConstantQueryString/{hello}?foo=bar&hello", method: "GET")
@httpRequestTests([
{
- id: "ConstantQueryString",
- documentation: "Includes constant query string parameters",
- protocol: restXml,
- method: "GET",
- uri: "/ConstantQueryString/hi",
- queryParams: [
- "foo=bar",
- "hello",
- ],
- body: "",
- params: {
- hello: "hi"
- }
- },
+ id: "ConstantQueryString"
+ documentation: "Includes constant query string parameters"
+ protocol: restXml
+ method: "GET"
+ uri: "/ConstantQueryString/hi"
+ queryParams: ["foo=bar", "hello"]
+ body: ""
+ params: { hello: "hi" }
+ }
])
operation ConstantQueryString {
input: ConstantQueryStringInput
@@ -294,7 +216,7 @@ operation ConstantQueryString {
structure ConstantQueryStringInput {
@httpLabel
@required
- hello: String,
+ hello: String
}
/// This example uses fixed query string params and variable query string params.
@@ -308,46 +230,34 @@ operation ConstantAndVariableQueryString {
apply ConstantAndVariableQueryString @httpRequestTests([
{
- id: "ConstantAndVariableQueryStringMissingOneValue",
- documentation: "Mixes constant and variable query string parameters",
- protocol: restXml,
- method: "GET",
- uri: "/ConstantAndVariableQueryString",
- queryParams: [
- "foo=bar",
- "baz=bam",
- ],
- forbidQueryParams: ["maybeSet"],
- body: "",
- params: {
- baz: "bam"
- }
- },
+ id: "ConstantAndVariableQueryStringMissingOneValue"
+ documentation: "Mixes constant and variable query string parameters"
+ protocol: restXml
+ method: "GET"
+ uri: "/ConstantAndVariableQueryString"
+ queryParams: ["foo=bar", "baz=bam"]
+ forbidQueryParams: ["maybeSet"]
+ body: ""
+ params: { baz: "bam" }
+ }
{
- id: "ConstantAndVariableQueryStringAllValues",
- documentation: "Mixes constant and variable query string parameters",
- protocol: restXml,
- method: "GET",
- uri: "/ConstantAndVariableQueryString",
- queryParams: [
- "foo=bar",
- "baz=bam",
- "maybeSet=yes"
- ],
- body: "",
- params: {
- baz: "bam",
- maybeSet: "yes"
- }
- },
+ id: "ConstantAndVariableQueryStringAllValues"
+ documentation: "Mixes constant and variable query string parameters"
+ protocol: restXml
+ method: "GET"
+ uri: "/ConstantAndVariableQueryString"
+ queryParams: ["foo=bar", "baz=bam", "maybeSet=yes"]
+ body: ""
+ params: { baz: "bam", maybeSet: "yes" }
+ }
])
structure ConstantAndVariableQueryStringInput {
@httpQuery("baz")
- baz: String,
+ baz: String
@httpQuery("maybeSet")
- maybeSet: String,
+ maybeSet: String
}
/// This example ensures that query string bound request parameters are
@@ -361,18 +271,14 @@ operation IgnoreQueryParamsInResponse {
apply IgnoreQueryParamsInResponse @httpResponseTests([
{
- id: "IgnoreQueryParamsInResponse",
- documentation: "Query parameters must be ignored when serializing the output of an operation",
- protocol: restXml,
- code: 200,
- headers: {
- "Content-Type": "application/xml"
- },
- body: "bam",
- bodyMediaType: "application/xml",
- params: {
- baz: "bam"
- }
+ id: "IgnoreQueryParamsInResponse"
+ documentation: "Query parameters must be ignored when serializing the output of an operation"
+ protocol: restXml
+ code: 200
+ headers: { "Content-Type": "application/xml" }
+ body: "bam"
+ bodyMediaType: "application/xml"
+ params: { baz: "bam" }
}
])
@@ -391,39 +297,33 @@ operation OmitsNullSerializesEmptyString {
apply OmitsNullSerializesEmptyString @httpRequestTests([
{
- id: "RestXmlOmitsNullQuery",
- documentation: "Omits null query values",
- protocol: restXml,
- method: "GET",
- uri: "/OmitsNullSerializesEmptyString",
- body: "",
- params: {
- nullValue: null,
- },
- appliesTo: "client",
- },
+ id: "RestXmlOmitsNullQuery"
+ documentation: "Omits null query values"
+ protocol: restXml
+ method: "GET"
+ uri: "/OmitsNullSerializesEmptyString"
+ body: ""
+ params: { nullValue: null }
+ appliesTo: "client"
+ }
{
- id: "RestXmlSerializesEmptyString",
- documentation: "Serializes empty query strings",
- protocol: restXml,
- method: "GET",
- uri: "/OmitsNullSerializesEmptyString",
- body: "",
- queryParams: [
- "Empty=",
- ],
- params: {
- emptyString: "",
- },
+ id: "RestXmlSerializesEmptyString"
+ documentation: "Serializes empty query strings"
+ protocol: restXml
+ method: "GET"
+ uri: "/OmitsNullSerializesEmptyString"
+ body: ""
+ queryParams: ["Empty="]
+ params: { emptyString: "" }
}
])
structure OmitsNullSerializesEmptyStringInput {
@httpQuery("Null")
- nullValue: String,
+ nullValue: String
@httpQuery("Empty")
- emptyString: String,
+ emptyString: String
}
/// Automatically adds idempotency tokens.
@@ -435,38 +335,32 @@ operation QueryIdempotencyTokenAutoFill {
apply QueryIdempotencyTokenAutoFill @httpRequestTests([
{
- id: "QueryIdempotencyTokenAutoFill",
- documentation: "Automatically adds idempotency token when not set",
- protocol: restXml,
- method: "POST",
- uri: "/QueryIdempotencyTokenAutoFill",
- body: "",
- queryParams: [
- "token=00000000-0000-4000-8000-000000000000",
- ],
- appliesTo: "client",
- },
+ id: "QueryIdempotencyTokenAutoFill"
+ documentation: "Automatically adds idempotency token when not set"
+ protocol: restXml
+ method: "POST"
+ uri: "/QueryIdempotencyTokenAutoFill"
+ body: ""
+ queryParams: ["token=00000000-0000-4000-8000-000000000000"]
+ appliesTo: "client"
+ }
{
- id: "QueryIdempotencyTokenAutoFillIsSet",
- documentation: "Uses the given idempotency token as-is",
- protocol: restXml,
- method: "POST",
- uri: "/QueryIdempotencyTokenAutoFill",
- body: "",
- queryParams: [
- "token=00000000-0000-4000-8000-000000000000",
- ],
- params: {
- token: "00000000-0000-4000-8000-000000000000"
- },
- appliesTo: "client",
+ id: "QueryIdempotencyTokenAutoFillIsSet"
+ documentation: "Uses the given idempotency token as-is"
+ protocol: restXml
+ method: "POST"
+ uri: "/QueryIdempotencyTokenAutoFill"
+ body: ""
+ queryParams: ["token=00000000-0000-4000-8000-000000000000"]
+ params: { token: "00000000-0000-4000-8000-000000000000" }
+ appliesTo: "client"
}
])
structure QueryIdempotencyTokenAutoFillInput {
@httpQuery("token")
@idempotencyToken
- token: String,
+ token: String
}
// Clients must make named query members take precedence over unnamed members
@@ -478,51 +372,39 @@ operation QueryPrecedence {
apply QueryPrecedence @httpRequestTests([
{
- id: "RestXmlQueryPrecedence",
- documentation: "Prefer named query parameters when serializing",
- protocol: restXml,
- method: "POST",
- uri: "/Precedence",
- body: "",
- queryParams: [
- "bar=named",
- "qux=alsoFromMap"
- ],
+ id: "RestXmlQueryPrecedence"
+ documentation: "Prefer named query parameters when serializing"
+ protocol: restXml
+ method: "POST"
+ uri: "/Precedence"
+ body: ""
+ queryParams: ["bar=named", "qux=alsoFromMap"]
params: {
- foo: "named",
- baz: {
- bar: "fromMap",
- qux: "alsoFromMap"
- }
- },
- appliesTo: "client",
- },
+ foo: "named"
+ baz: { bar: "fromMap", qux: "alsoFromMap" }
+ }
+ appliesTo: "client"
+ }
{
- id: "RestXmlServersPutAllQueryParamsInMap",
- documentation: "Servers put all query params in map",
- protocol: restXml,
- method: "POST",
- uri: "/Precedence",
- body: "",
- queryParams: [
- "bar=named",
- "qux=fromMap"
- ],
+ id: "RestXmlServersPutAllQueryParamsInMap"
+ documentation: "Servers put all query params in map"
+ protocol: restXml
+ method: "POST"
+ uri: "/Precedence"
+ body: ""
+ queryParams: ["bar=named", "qux=fromMap"]
params: {
- foo: "named",
- baz: {
- bar: "named",
- qux: "fromMap"
- }
- },
- appliesTo: "server",
+ foo: "named"
+ baz: { bar: "named", qux: "fromMap" }
+ }
+ appliesTo: "server"
}
])
@suppress(["HttpQueryParamsTrait"])
structure QueryPrecedenceInput {
@httpQuery("bar")
- foo: String,
+ foo: String
@httpQueryParams
baz: StringMap
@@ -536,44 +418,36 @@ operation QueryParamsAsStringListMap {
apply QueryParamsAsStringListMap @httpRequestTests([
{
- id: "RestXmlQueryParamsStringListMap",
- documentation: "Serialize query params from map of list strings",
- protocol: restXml,
- method: "POST",
- uri: "/StringListMap",
- body: "",
- queryParams: [
- "corge=named",
- "baz=bar",
- "baz=qux"
- ],
+ id: "RestXmlQueryParamsStringListMap"
+ documentation: "Serialize query params from map of list strings"
+ protocol: restXml
+ method: "POST"
+ uri: "/StringListMap"
+ body: ""
+ queryParams: ["corge=named", "baz=bar", "baz=qux"]
params: {
- qux: "named",
+ qux: "named"
foo: {
- "baz": ["bar", "qux"]
+ baz: ["bar", "qux"]
}
- },
+ }
appliesTo: "client"
- },
+ }
{
- id: "RestXmlServersQueryParamsStringListMap",
- documentation: "Servers put all query params in map",
- protocol: restXml,
- method: "POST",
- uri: "/StringListMap",
- body: "",
- queryParams: [
- "corge=named",
- "baz=bar",
- "baz=qux"
- ],
+ id: "RestXmlServersQueryParamsStringListMap"
+ documentation: "Servers put all query params in map"
+ protocol: restXml
+ method: "POST"
+ uri: "/StringListMap"
+ body: ""
+ queryParams: ["corge=named", "baz=bar", "baz=qux"]
params: {
- qux: "named",
+ qux: "named"
foo: {
- "corge": ["named"],
- "baz": ["bar", "qux"]
+ corge: ["named"]
+ baz: ["bar", "qux"]
}
- },
+ }
appliesTo: "server"
}
])
@@ -581,7 +455,7 @@ apply QueryParamsAsStringListMap @httpRequestTests([
@suppress(["HttpQueryParamsTrait"])
structure QueryParamsAsStringListMapInput {
@httpQuery("corge")
- qux: String,
+ qux: String
@httpQueryParams
foo: StringListMap
diff --git a/smithy-aws-protocol-tests/model/restXml/http-response-code.smithy b/smithy-aws-protocol-tests/model/restXml/http-response-code.smithy
index 87b91bb5215..9bc7c3024f5 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-response-code.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-response-code.smithy
@@ -1,6 +1,5 @@
// This file defines test cases that test HTTP response code bindings.
// See: https://smithy.io/2.0/spec/http-bindings.html#httpresponsecode-trait
-
$version: "2.0"
namespace aws.protocoltests.restxml
@@ -21,17 +20,13 @@ structure HttpResponseCodeOutput {
apply HttpResponseCode @httpResponseTests([
{
- id: "RestXmlHttpResponseCode",
- documentation: "Binds the http response code to an output structure.",
- protocol: restXml,
- code: 201,
- headers: {
- "Content-Type": "application/xml"
- },
- "body": "",
- "bodyMediaType": "application/xml",
- params: {
- Status: 201,
- }
+ id: "RestXmlHttpResponseCode"
+ documentation: "Binds the http response code to an output structure."
+ protocol: restXml
+ code: 201
+ headers: { "Content-Type": "application/xml" }
+ body: ""
+ bodyMediaType: "application/xml"
+ params: { Status: 201 }
}
])
diff --git a/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy b/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy
index 851e34066e3..4dd29877a26 100644
--- a/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/http-string-payload.smithy
@@ -8,25 +8,25 @@ use smithy.test#httpResponseTests
@http(uri: "/EnumPayload", method: "POST")
@httpRequestTests([
{
- id: "RestXmlEnumPayloadRequest",
- uri: "/EnumPayload",
- body: "enumvalue",
- params: { payload: "enumvalue" },
- method: "POST",
+ id: "RestXmlEnumPayloadRequest"
+ uri: "/EnumPayload"
+ body: "enumvalue"
+ params: { payload: "enumvalue" }
+ method: "POST"
protocol: "aws.protocols#restXml"
}
])
@httpResponseTests([
{
- id: "RestXmlEnumPayloadResponse",
- body: "enumvalue",
- params: { payload: "enumvalue" },
- protocol: "aws.protocols#restXml",
+ id: "RestXmlEnumPayloadResponse"
+ body: "enumvalue"
+ params: { payload: "enumvalue" }
+ protocol: "aws.protocols#restXml"
code: 200
}
])
operation HttpEnumPayload {
- input: EnumPayloadInput,
+ input: EnumPayloadInput
output: EnumPayloadInput
}
@@ -42,25 +42,25 @@ enum StringEnum {
@http(uri: "/StringPayload", method: "POST")
@httpRequestTests([
{
- id: "RestXmlStringPayloadRequest",
- uri: "/StringPayload",
- body: "rawstring",
- params: { payload: "rawstring" },
- method: "POST",
+ id: "RestXmlStringPayloadRequest"
+ uri: "/StringPayload"
+ body: "rawstring"
+ params: { payload: "rawstring" }
+ method: "POST"
protocol: "aws.protocols#restXml"
}
])
@httpResponseTests([
{
- id: "RestXmlStringPayloadResponse",
- body: "rawstring",
- params: { payload: "rawstring" },
- protocol: "aws.protocols#restXml",
+ id: "RestXmlStringPayloadResponse"
+ body: "rawstring"
+ params: { payload: "rawstring" }
+ protocol: "aws.protocols#restXml"
code: 200
}
])
operation HttpStringPayload {
- input: StringPayloadInput,
+ input: StringPayloadInput
output: StringPayloadInput
}
diff --git a/smithy-aws-protocol-tests/model/restXml/main.smithy b/smithy-aws-protocol-tests/model/restXml/main.smithy
index 348eb303c82..177426ba690 100644
--- a/smithy-aws-protocol-tests/model/restXml/main.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/main.smithy
@@ -5,105 +5,88 @@ namespace aws.protocoltests.restxml
use aws.api#service
use aws.auth#sigv4
use aws.protocols#restXml
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
-/// A REST XML service that sends XML requests and responses.
@service(sdkId: "Rest Xml Protocol")
@sigv4(name: "restxml")
@restXml
@title("Sample Rest Xml Protocol Service")
service RestXml {
- version: "2019-12-16",
+ version: "2019-12-16"
operations: [
// Basic input and output tests
- NoInputAndNoOutput,
- NoInputAndOutput,
- EmptyInputAndEmptyOutput,
- XmlEmptyLists,
- XmlEmptyMaps,
- XmlEmptyStrings,
-
+ NoInputAndNoOutput
+ NoInputAndOutput
+ EmptyInputAndEmptyOutput
+ XmlEmptyLists
+ XmlEmptyMaps
+ XmlEmptyStrings
// @httpHeader tests
- InputAndOutputWithHeaders,
- NullAndEmptyHeadersClient,
- NullAndEmptyHeadersServer,
- TimestampFormatHeaders,
-
+ InputAndOutputWithHeaders
+ NullAndEmptyHeadersClient
+ NullAndEmptyHeadersServer
+ TimestampFormatHeaders
// @httpLabel tests
- HttpRequestWithLabels,
- HttpRequestWithLabelsAndTimestampFormat,
- HttpRequestWithGreedyLabelInPath,
- HttpRequestWithFloatLabels,
-
+ HttpRequestWithLabels
+ HttpRequestWithLabelsAndTimestampFormat
+ HttpRequestWithGreedyLabelInPath
+ HttpRequestWithFloatLabels
// @httpQuery and @httpQueryParams tests
- AllQueryStringTypes,
- ConstantQueryString,
- ConstantAndVariableQueryString,
- IgnoreQueryParamsInResponse,
- OmitsNullSerializesEmptyString,
- QueryIdempotencyTokenAutoFill,
- QueryPrecedence,
- QueryParamsAsStringListMap,
-
+ AllQueryStringTypes
+ ConstantQueryString
+ ConstantAndVariableQueryString
+ IgnoreQueryParamsInResponse
+ OmitsNullSerializesEmptyString
+ QueryIdempotencyTokenAutoFill
+ QueryPrecedence
+ QueryParamsAsStringListMap
// @httpPrefixHeaders tests
- HttpPrefixHeaders,
-
+ HttpPrefixHeaders
// @httpPayload tests
- HttpPayloadTraits,
- HttpPayloadTraitsWithMediaType,
- HttpPayloadWithStructure,
- HttpEnumPayload,
- HttpStringPayload,
- HttpPayloadWithUnion,
- HttpPayloadWithXmlName,
- BodyWithXmlName,
- HttpPayloadWithMemberXmlName,
- HttpPayloadWithXmlNamespace,
- HttpPayloadWithXmlNamespaceAndPrefix,
-
+ HttpPayloadTraits
+ HttpPayloadTraitsWithMediaType
+ HttpPayloadWithStructure
+ HttpEnumPayload
+ HttpStringPayload
+ HttpPayloadWithUnion
+ HttpPayloadWithXmlName
+ BodyWithXmlName
+ HttpPayloadWithMemberXmlName
+ HttpPayloadWithXmlNamespace
+ HttpPayloadWithXmlNamespaceAndPrefix
// @httpResponseCode tests
- HttpResponseCode,
-
+ HttpResponseCode
// Output tests
- XmlEmptyBlobs,
-
+ XmlEmptyBlobs
// Errors
- GreetingWithErrors,
-
+ GreetingWithErrors
// Synthesized XML document body tests
- SimpleScalarProperties,
- XmlUnions,
- XmlBlobs,
- XmlTimestamps,
- XmlEnums,
- XmlIntEnums,
- RecursiveShapes,
- XmlLists,
- XmlMaps,
- XmlMapsXmlName,
- NestedXmlMaps,
- FlattenedXmlMap,
- FlattenedXmlMapWithXmlName,
- FlattenedXmlMapWithXmlNamespace,
- XmlMapWithXmlNamespace,
-
+ SimpleScalarProperties
+ XmlUnions
+ XmlBlobs
+ XmlTimestamps
+ XmlEnums
+ XmlIntEnums
+ RecursiveShapes
+ XmlLists
+ XmlMaps
+ XmlMapsXmlName
+ NestedXmlMaps
+ FlattenedXmlMap
+ FlattenedXmlMapWithXmlName
+ FlattenedXmlMapWithXmlNamespace
+ XmlMapWithXmlNamespace
// @xmlAttribute tests
- XmlAttributes,
- XmlAttributesOnPayload,
-
+ XmlAttributes
+ XmlAttributesOnPayload
// @xmlNamespace trait tests
- XmlNamespaces,
-
+ XmlNamespaces
// @endpoint and @hostLabel trait tests
- EndpointOperation,
- EndpointWithHostLabelOperation,
- EndpointWithHostLabelHeaderOperation,
-
+ EndpointOperation
+ EndpointWithHostLabelOperation
+ EndpointWithHostLabelHeaderOperation
// client-only timestamp parsing tests
- DatetimeOffsets,
- FractionalSeconds,
-
+ DatetimeOffsets
+ FractionalSeconds
// requestCompression trait tests
PutWithContentEncoding
]
diff --git a/smithy-aws-protocol-tests/model/restXml/requestCompression.smithy b/smithy-aws-protocol-tests/model/restXml/requestCompression.smithy
index 6e8f177a253..8f482a2d300 100644
--- a/smithy-aws-protocol-tests/model/restXml/requestCompression.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/requestCompression.smithy
@@ -4,7 +4,6 @@ namespace aws.protocoltests.restxml
use aws.protocols#restXml
use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
apply PutWithContentEncoding @httpRequestTests([
{
@@ -12,296 +11,289 @@ apply PutWithContentEncoding @httpRequestTests([
documentation: "Compression algorithm encoding is appended to the Content-Encoding header."
protocol: restXml
params: {
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi
- gIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM
- Mb0cTUVqSVSM8bnFiF9SoX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1Cace9ZZLRxblFPSXcvsuHh
+ hvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/requestcompression/putcontentwithencoding"
- headers: {
- "Content-Encoding": "gzip"
- }
+ headers: { "Content-Encoding": "gzip" }
}
{
id: "SDKAppendedGzipAfterProvidedEncoding_restXml"
documentation: """
- Compression algorithm encoding is appended to the Content-Encoding header, and the
- user-provided content-encoding is in the Content-Encoding header before the
- request compression encoding from the HTTP binding.
- """
+ Compression algorithm encoding is appended to the Content-Encoding header, and the
+ user-provided content-encoding is in the Content-Encoding header before the
+ request compression encoding from the HTTP binding.
+ """
protocol: restXml
params: {
- "encoding": "custom"
- "data": """
- RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5
- 1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8
- 5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1
- 2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi
- gIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM
- Mb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0G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8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP
+ QvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe
+ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
+ """
}
method: "POST"
uri: "/requestcompression/putcontentwithencoding"
- headers: {
- "Content-Encoding": "custom, gzip"
- }
+ headers: { "Content-Encoding": "custom, gzip" }
}
])
-@http(
- method: "POST"
- uri: "/requestcompression/putcontentwithencoding"
-)
+@http(method: "POST", uri: "/requestcompression/putcontentwithencoding")
@requestCompression(
encodings: ["gzip"]
)
diff --git a/smithy-aws-protocol-tests/model/restXml/services/s3.smithy b/smithy-aws-protocol-tests/model/restXml/services/s3.smithy
index d841c7f2f1f..b352d110e65 100644
--- a/smithy-aws-protocol-tests/model/restXml/services/s3.smithy
+++ b/smithy-aws-protocol-tests/model/restXml/services/s3.smithy
@@ -2,12 +2,12 @@ $version: "2.0"
metadata suppressions = [
{
- id: "HttpMethodSemantics",
- namespace: "com.amazonaws.s3",
- },
+ id: "HttpMethodSemantics"
+ namespace: "com.amazonaws.s3"
+ }
{
- id: "EnumTrait",
- namespace: "com.amazonaws.s3",
+ id: "EnumTrait"
+ namespace: "com.amazonaws.s3"
}
]
@@ -17,328 +17,245 @@ use aws.api#service
use aws.auth#sigv4
use aws.customizations#s3UnwrappedXmlOutput
use aws.protocols#restXml
-use aws.protocols#httpChecksum
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
@service(
- sdkId: "S3",
- arnNamespace: "s3",
- cloudFormationName: "S3",
- cloudTrailEventSource: "s3.amazonaws.com",
- endpointPrefix: "s3",
-)
-@sigv4(
- name: "s3",
-)
-@restXml(
- noErrorWrapping: true
+ sdkId: "S3"
+ arnNamespace: "s3"
+ cloudFormationName: "S3"
+ cloudTrailEventSource: "s3.amazonaws.com"
+ endpointPrefix: "s3"
)
+@sigv4(name: "s3")
+@restXml(noErrorWrapping: true)
@title("Amazon Simple Storage Service")
-@xmlNamespace(
- uri: "http://s3.amazonaws.com/doc/2006-03-01/",
-)
+@xmlNamespace(uri: "http://s3.amazonaws.com/doc/2006-03-01/")
service AmazonS3 {
- version: "2006-03-01",
+ version: "2006-03-01"
operations: [
- ListObjectsV2,
- GetBucketLocation,
- DeleteObjectTagging,
+ ListObjectsV2
+ GetBucketLocation
+ DeleteObjectTagging
GetObject
- ],
+ ]
}
-
// TODO This needs more test cases to enforce the setting
// resolution of config options, ARN based addressing, and more.
@httpRequestTests([
{
- id: "S3DefaultAddressing",
- documentation: "S3 clients should map the default addressing style to virtual host.",
- protocol: restXml,
- method: "GET",
- uri: "/",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ id: "S3DefaultAddressing"
+ documentation: "S3 clients should map the default addressing style to virtual host."
+ protocol: restXml
+ method: "GET"
+ uri: "/"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
- client: {
- region: "us-west-2",
- },
- },
- },
- },
+ client: { region: "us-west-2" }
+ }
+ }
+ }
{
- id: "S3VirtualHostAddressing",
- documentation: "S3 clients should support the explicit virtual host addressing style.",
- protocol: restXml,
- method: "GET",
- uri: "/",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ id: "S3VirtualHostAddressing"
+ documentation: "S3 clients should support the explicit virtual host addressing style."
+ protocol: restXml
+ method: "GET"
+ uri: "/"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "virtual",
- },
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "virtual" }
+ }
+ }
+ }
+ }
{
- id: "S3PathAddressing",
- documentation: "S3 clients should support the explicit path addressing style.",
- protocol: restXml,
- method: "GET",
- uri: "/mybucket",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ id: "S3PathAddressing"
+ documentation: "S3 clients should support the explicit path addressing style."
+ protocol: restXml
+ method: "GET"
+ uri: "/mybucket"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "path",
- },
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "path" }
+ }
+ }
+ }
+ }
{
- id: "S3VirtualHostDualstackAddressing",
+ id: "S3VirtualHostDualstackAddressing"
documentation: """
S3 clients should support the explicit virtual host
- addressing style with Dualstack.""",
- protocol: restXml,
- method: "GET",
- uri: "/",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.dualstack.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ addressing style with Dualstack."""
+ protocol: restXml
+ method: "GET"
+ uri: "/"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.dualstack.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "virtual",
- use_dualstack_endpoint: true,
- },
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "virtual", use_dualstack_endpoint: true }
+ }
+ }
+ }
+ }
{
- id: "S3VirtualHostAccelerateAddressing",
+ id: "S3VirtualHostAccelerateAddressing"
documentation: """
S3 clients should support the explicit virtual host
- addressing style with S3 Accelerate.""",
- protocol: restXml,
- method: "GET",
- uri: "/",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3-accelerate.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ addressing style with S3 Accelerate."""
+ protocol: restXml
+ method: "GET"
+ uri: "/"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3-accelerate.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "virtual",
- use_accelerate_endpoint: true,
- },
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "virtual", use_accelerate_endpoint: true }
+ }
+ }
+ }
+ }
{
- id: "S3VirtualHostDualstackAccelerateAddressing",
+ id: "S3VirtualHostDualstackAccelerateAddressing"
documentation: """
S3 clients should support the explicit virtual host
- addressing style with Dualstack and S3 Accelerate.""",
- protocol: restXml,
- method: "GET",
- uri: "/",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3-accelerate.dualstack.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ addressing style with Dualstack and S3 Accelerate."""
+ protocol: restXml
+ method: "GET"
+ uri: "/"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3-accelerate.dualstack.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "virtual",
- use_dualstack_endpoint: true,
- use_accelerate_endpoint: true,
- },
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "virtual", use_dualstack_endpoint: true, use_accelerate_endpoint: true }
+ }
+ }
+ }
+ }
{
- id: "S3OperationAddressingPreferred",
+ id: "S3OperationAddressingPreferred"
documentation: """
S3 clients should resolve to the addressing style of the
- operation if defined on both the client and operation.""",
- protocol: restXml,
- method: "GET",
- uri: "/",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "list-type=2",
- ],
- params: {
- Bucket: "mybucket",
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ operation if defined on both the client and operation."""
+ protocol: restXml
+ method: "GET"
+ uri: "/"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["list-type=2"]
+ params: { Bucket: "mybucket" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "path",
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "path" }
+ }
operation: {
- s3: {
- addressing_style: "virtual",
- },
- },
- },
- },
- },
+ s3: { addressing_style: "virtual" }
+ }
+ }
+ }
+ }
])
-@http(
- method: "GET",
- uri: "/{Bucket}?list-type=2",
- code: 200,
-)
-@paginated(
- inputToken: "ContinuationToken",
- outputToken: "NextContinuationToken",
- pageSize: "MaxKeys",
-)
+@http(method: "GET", uri: "/{Bucket}?list-type=2", code: 200)
+@paginated(inputToken: "ContinuationToken", outputToken: "NextContinuationToken", pageSize: "MaxKeys")
operation ListObjectsV2 {
- input: ListObjectsV2Request,
- output: ListObjectsV2Output,
+ input: ListObjectsV2Request
+ output: ListObjectsV2Output
errors: [
- NoSuchBucket,
- ],
+ NoSuchBucket
+ ]
}
-
@httpRequestTests([
{
- id: "S3EscapeObjectKeyInUriLabel",
+ id: "S3EscapeObjectKeyInUriLabel"
documentation: """
- S3 clients should escape special characters in Object Keys
- when the Object Key is used as a URI label binding.
- """,
- protocol: restXml,
- method: "DELETE",
- uri: "/my%20key.txt",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "tagging"
- ],
- params: {
- Bucket: "mybucket",
- Key: "my key.txt"
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ S3 clients should escape special characters in Object Keys
+ when the Object Key is used as a URI label binding.
+ """
+ protocol: restXml
+ method: "DELETE"
+ uri: "/my%20key.txt"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["tagging"]
+ params: { Bucket: "mybucket", Key: "my key.txt" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
- client: {
- region: "us-west-2",
- },
- },
- },
- },
+ client: { region: "us-west-2" }
+ }
+ }
+ }
{
- id: "S3EscapePathObjectKeyInUriLabel",
+ id: "S3EscapePathObjectKeyInUriLabel"
documentation: """
- S3 clients should preserve an Object Key representing a path
- when the Object Key is used as a URI label binding, but still
- escape special characters.
- """,
- protocol: restXml,
- method: "DELETE",
- uri: "/foo/bar/my%20key.txt",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "tagging"
- ],
- params: {
- Bucket: "mybucket",
- Key: "foo/bar/my key.txt"
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ S3 clients should preserve an Object Key representing a path
+ when the Object Key is used as a URI label binding, but still
+ escape special characters.
+ """
+ protocol: restXml
+ method: "DELETE"
+ uri: "/foo/bar/my%20key.txt"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["tagging"]
+ params: { Bucket: "mybucket", Key: "foo/bar/my key.txt" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
- client: {
- region: "us-west-2",
- },
- },
- },
+ client: { region: "us-west-2" }
+ }
+ }
}
])
-@http(
- method: "DELETE",
- uri: "/{Bucket}/{Key+}?tagging",
- code: 204
-)
+@http(method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", code: 204)
operation DeleteObjectTagging {
input: DeleteObjectTaggingRequest
output: DeleteObjectTaggingOutput
@@ -346,179 +263,163 @@ operation DeleteObjectTagging {
@httpRequestTests([
{
- id: "S3PreservesLeadingDotSegmentInUriLabel",
+ id: "S3PreservesLeadingDotSegmentInUriLabel"
documentation: """
- S3 clients should not remove dot segments from request paths.
- """,
- protocol: restXml,
- method: "GET",
- uri: "/../key.txt",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "tagging"
- ],
- params: {
- Bucket: "mybucket",
- Key: "../key.txt"
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ S3 clients should not remove dot segments from request paths.
+ """
+ protocol: restXml
+ method: "GET"
+ uri: "/../key.txt"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["tagging"]
+ params: { Bucket: "mybucket", Key: "../key.txt" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "virtual",
- },
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "virtual" }
+ }
+ }
+ }
+ }
{
- id: "S3PreservesEmbeddedDotSegmentInUriLabel",
+ id: "S3PreservesEmbeddedDotSegmentInUriLabel"
documentation: """
- S3 clients should not remove dot segments from request paths.
- """,
- protocol: restXml,
- method: "GET",
- uri: "foo/../key.txt",
- host: "s3.us-west-2.amazonaws.com",
- resolvedHost: "mybucket.s3.us-west-2.amazonaws.com",
- body: "",
- queryParams: [
- "tagging"
- ],
- params: {
- Bucket: "mybucket",
- Key: "foo/../key.txt"
- },
- vendorParamsShape: aws.protocoltests.config#AwsConfig,
+ S3 clients should not remove dot segments from request paths.
+ """
+ protocol: restXml
+ method: "GET"
+ uri: "foo/../key.txt"
+ host: "s3.us-west-2.amazonaws.com"
+ resolvedHost: "mybucket.s3.us-west-2.amazonaws.com"
+ body: ""
+ queryParams: ["tagging"]
+ params: { Bucket: "mybucket", Key: "foo/../key.txt" }
+ vendorParamsShape: aws.protocoltests.config#AwsConfig
vendorParams: {
scopedConfig: {
client: {
- region: "us-west-2",
- s3: {
- addressing_style: "virtual",
- },
- },
- },
- },
+ region: "us-west-2"
+ s3: { addressing_style: "virtual" }
+ }
+ }
+ }
}
])
-@http(uri: "/{Bucket}/{Key+}",method: "GET")
+@http(uri: "/{Bucket}/{Key+}", method: "GET")
operation GetObject {
- input: GetObjectRequest,
- output: GetObjectOutput,
+ input: GetObjectRequest
+ output: GetObjectOutput
}
-
-@httpResponseTests([{
- id: "GetBucketLocationUnwrappedOutput",
+@httpResponseTests([
+ {
+ id: "GetBucketLocationUnwrappedOutput"
documentation: """
- S3 clients should use the @s3UnwrappedXmlOutput trait to determine
- that the response shape is not wrapped in a restxml operation-level XML node.
- """,
- code: 200,
- body: "\nus-west-2",
- params: {
- "LocationConstraint": "us-west-2"
- },
+ S3 clients should use the @s3UnwrappedXmlOutput trait to determine
+ that the response shape is not wrapped in a restxml operation-level XML node.
+ """
+ code: 200
+ body: "\nus-west-2"
+ params: { LocationConstraint: "us-west-2" }
protocol: restXml
-}])
+ }
+])
@http(uri: "/{Bucket}?location", method: "GET")
@s3UnwrappedXmlOutput
operation GetBucketLocation {
- input: GetBucketLocationRequest,
- output: GetBucketLocationOutput,
+ input: GetBucketLocationRequest
+ output: GetBucketLocationOutput
}
-
structure CommonPrefix {
- Prefix: Prefix,
+ Prefix: Prefix
}
structure GetBucketLocationRequest {
@httpLabel
@required
- Bucket: BucketName,
+ Bucket: BucketName
}
@xmlName("LocationConstraint")
structure GetBucketLocationOutput {
- LocationConstraint: BucketLocationConstraint,
+ LocationConstraint: BucketLocationConstraint
}
structure ListObjectsV2Request {
@httpLabel
@required
- Bucket: BucketName,
+ Bucket: BucketName
@httpQuery("delimiter")
- Delimiter: Delimiter,
+ Delimiter: Delimiter
@httpQuery("encoding-type")
- EncodingType: EncodingType,
+ EncodingType: EncodingType
@httpQuery("max-keys")
- MaxKeys: MaxKeys,
+ MaxKeys: MaxKeys
@httpQuery("prefix")
- Prefix: Prefix,
+ Prefix: Prefix
@httpQuery("continuation-token")
- ContinuationToken: Token,
+ ContinuationToken: Token
@httpQuery("fetch-owner")
- FetchOwner: FetchOwner,
+ FetchOwner: FetchOwner
@httpQuery("start-after")
- StartAfter: StartAfter,
+ StartAfter: StartAfter
@httpHeader("x-amz-request-payer")
- RequestPayer: RequestPayer,
+ RequestPayer: RequestPayer
@httpHeader("x-amz-expected-bucket-owner")
- ExpectedBucketOwner: AccountId,
+ ExpectedBucketOwner: AccountId
}
structure ListObjectsV2Output {
- IsTruncated: IsTruncated,
+ IsTruncated: IsTruncated
@xmlFlattened
- Contents: ObjectList,
+ Contents: ObjectList
- Name: BucketName,
+ Name: BucketName
- Prefix: Prefix,
+ Prefix: Prefix
- Delimiter: Delimiter,
+ Delimiter: Delimiter
- MaxKeys: MaxKeys,
+ MaxKeys: MaxKeys
@xmlFlattened
- CommonPrefixes: CommonPrefixList,
+ CommonPrefixes: CommonPrefixList
- EncodingType: EncodingType,
+ EncodingType: EncodingType
- KeyCount: KeyCount,
+ KeyCount: KeyCount
- ContinuationToken: Token,
+ ContinuationToken: Token
- NextContinuationToken: NextToken,
+ NextContinuationToken: NextToken
- StartAfter: StartAfter,
+ StartAfter: StartAfter
}
@input
structure GetObjectRequest {
@httpLabel
@required
- Bucket: BucketName,
+ Bucket: BucketName
@httpLabel
@required
- Key: ObjectKey,
+ Key: ObjectKey
}
@output
@@ -549,49 +450,41 @@ structure DeleteObjectTaggingOutput {
@httpResponseTests([
{
- id: "S3OperationNoErrorWrappingResponse",
+ id: "S3OperationNoErrorWrappingResponse"
documentation: """
- S3 operations return Error XML nodes unwrapped by
- the ErrorResponse XML node.
- """,
- protocol: restXml,
- code: 400,
- headers: {
- "Content-Type": "application/xml"
- },
- body: "\n\n\tSender\n\tNoSuchBucket
\n",
- bodyMediaType: "application/xml",
+ S3 operations return Error XML nodes unwrapped by
+ the ErrorResponse XML node.
+ """
+ protocol: restXml
+ code: 400
+ headers: { "Content-Type": "application/xml" }
+ body: "\n\n\tSender\n\tNoSuchBucket
\n"
+ bodyMediaType: "application/xml"
}
])
@error("client")
structure NoSuchBucket {}
structure Object {
- Key: ObjectKey,
-
- LastModified: LastModified,
-
- ETag: ETag,
-
- Size: Size,
-
- StorageClass: ObjectStorageClass,
-
- Owner: Owner,
+ Key: ObjectKey
+ LastModified: LastModified
+ ETag: ETag
+ Size: Size
+ StorageClass: ObjectStorageClass
+ Owner: Owner
}
structure Owner {
- DisplayName: DisplayName,
-
- ID: ID,
+ DisplayName: DisplayName
+ ID: ID
}
list CommonPrefixList {
- member: CommonPrefix,
+ member: CommonPrefix
}
list ObjectList {
- member: Object,
+ member: Object
}
string AccountId
@@ -623,9 +516,7 @@ integer MaxKeys
string NextToken
-@length(
- min: 1,
-)
+@length(min: 1)
string ObjectKey
enum ObjectStorageClass {
@@ -658,4 +549,3 @@ enum BucketLocationConstraint {
}
string ObjectVersionId
-
diff --git a/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy b/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy
index 7550899264a..0ce942f65c5 100644
--- a/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy
+++ b/smithy-aws-protocol-tests/model/restXmlWithNamespace/main.smithy
@@ -21,8 +21,10 @@ use smithy.test#httpResponseTests
@restXml
@title("Sample Rest Xml Protocol Service With Namespace")
service RestXmlWithNamespace {
- version: "2019-12-16",
- operations: [SimpleScalarProperties]
+ version: "2019-12-16"
+ operations: [
+ SimpleScalarProperties
+ ]
}
// This example serializes simple scalar types in the top level XML document.
@@ -33,119 +35,116 @@ service RestXmlWithNamespace {
@idempotent
@http(uri: "/SimpleScalarProperties", method: "PUT")
operation SimpleScalarProperties {
- input: SimpleScalarPropertiesInputOutput,
+ input: SimpleScalarPropertiesInputOutput
output: SimpleScalarPropertiesInputOutput
}
apply SimpleScalarProperties @httpRequestTests([
{
- id: "XmlNamespaceSimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- method: "PUT",
- uri: "/SimpleScalarProperties",
+ id: "XmlNamespaceSimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ method: "PUT"
+ uri: "/SimpleScalarProperties"
body: """
-
- string
- true
- false
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
+
+ string
+ true
+ false
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
params: {
- foo: "Foo",
- stringValue: "string",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- Nested: {
- attrField: "nestedAttrValue",
- },
+ foo: "Foo"
+ stringValue: "string"
+ trueBooleanValue: true
+ falseBooleanValue: false
+ byteValue: 1
+ shortValue: 2
+ integerValue: 3
+ longValue: 4
+ floatValue: 5.5
+ doubleValue: 6.5
+ Nested: { attrField: "nestedAttrValue" }
}
}
])
apply SimpleScalarProperties @httpResponseTests([
{
- id: "XmlNamespaceSimpleScalarProperties",
- documentation: "Serializes simple scalar properties",
- protocol: restXml,
- code: 200,
+ id: "XmlNamespaceSimpleScalarProperties"
+ documentation: "Serializes simple scalar properties"
+ protocol: restXml
+ code: 200
body: """
-
- string
- true
- false
- 1
- 2
- 3
- 4
- 5.5
- 6.5
-
-
- """,
- bodyMediaType: "application/xml",
- headers: {
- "Content-Type": "application/xml",
- "X-Foo": "Foo",
- },
+
+ string
+ true
+ false
+ 1
+ 2
+ 3
+ 4
+ 5.5
+ 6.5
+
+
+ """
+ bodyMediaType: "application/xml"
+ headers: { "Content-Type": "application/xml", "X-Foo": "Foo" }
params: {
- foo: "Foo",
- stringValue: "string",
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 1,
- shortValue: 2,
- integerValue: 3,
- longValue: 4,
- floatValue: 5.5,
- doubleValue: 6.5,
- Nested: {
- attrField: "nestedAttrValue",
- },
+ foo: "Foo"
+ stringValue: "string"
+ trueBooleanValue: true
+ falseBooleanValue: false
+ byteValue: 1
+ shortValue: 2
+ integerValue: 3
+ longValue: 4
+ floatValue: 5.5
+ doubleValue: 6.5
+ Nested: { attrField: "nestedAttrValue" }
}
}
])
structure SimpleScalarPropertiesInputOutput {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
- stringValue: String,
- trueBooleanValue: Boolean,
- falseBooleanValue: Boolean,
- byteValue: Byte,
- shortValue: Short,
- integerValue: Integer,
- longValue: Long,
- floatValue: Float,
+ stringValue: String
+
+ trueBooleanValue: Boolean
+
+ falseBooleanValue: Boolean
+
+ byteValue: Byte
+
+ shortValue: Short
+
+ integerValue: Integer
+
+ longValue: Long
+
+ floatValue: Float
@xmlNamespace(prefix: "xsi", uri: "https://example.com")
- Nested: NestedWithNamespace,
+ Nested: NestedWithNamespace
@xmlName("DoubleDribble")
- doubleValue: Double,
+ doubleValue: Double
}
structure NestedWithNamespace {
@xmlAttribute
@xmlName("xsi:someName")
- attrField: String,
+ attrField: String
}
diff --git a/smithy-aws-protocol-tests/model/shared-types.smithy b/smithy-aws-protocol-tests/model/shared-types.smithy
index b4e31ba4d69..0245e320b68 100644
--- a/smithy-aws-protocol-tests/model/shared-types.smithy
+++ b/smithy-aws-protocol-tests/model/shared-types.smithy
@@ -4,13 +4,12 @@
// should be defined in this file. However, things like input or output
// structures or other test-case specific shapes should be defined closer to
// the test case and in its same file.
-
$version: "2.0"
metadata suppressions = [
{
- id: "DeprecatedTrait",
- namespace: "*",
+ id: "DeprecatedTrait"
+ namespace: "*"
reason: """
Some of the AWS protocols make use of deprecated traits, and some are
themselves deprecated traits. As this package is intended to test those
@@ -21,7 +20,7 @@ metadata suppressions = [
namespace aws.protocoltests.shared
list StringList {
- member: String,
+ member: String
}
@sparse
@@ -31,113 +30,114 @@ list SparseStringList {
@uniqueItems
list StringSet {
- member: String,
+ member: String
}
map StringMap {
- key: String,
- value: String,
+ key: String
+ value: String
}
map StringListMap {
- key: String,
+ key: String
value: StringList
}
@sparse
map SparseStringMap {
- key: String,
- value: String,
+ key: String
+ value: String
}
/// A list of lists of strings.
list NestedStringList {
- member: StringList,
+ member: StringList
}
list ShortList {
- member: Short,
+ member: Short
}
list IntegerList {
- member: Integer,
+ member: Integer
}
@uniqueItems
list IntegerSet {
- member: Integer,
+ member: Integer
}
list FloatList {
- member: Float,
+ member: Float
}
list DoubleList {
- member: Double,
+ member: Double
}
list BooleanList {
- member: Boolean,
+ member: Boolean
}
@uniqueItems
list BooleanSet {
- member: Boolean,
+ member: Boolean
}
list TimestampList {
- member: Timestamp,
+ member: Timestamp
}
list BlobList {
- member: Blob,
+ member: Blob
}
@uniqueItems
list BlobSet {
- member: Blob,
+ member: Blob
}
list ByteList {
- member: Byte,
+ member: Byte
}
@uniqueItems
list ByteSet {
- member: Byte,
+ member: Byte
}
+
@uniqueItems
list ShortSet {
- member: Short,
+ member: Short
}
@uniqueItems
list LongList {
- member: Long,
+ member: Long
}
@uniqueItems
list LongSet {
- member: Long,
+ member: Long
}
@uniqueItems
list TimestampSet {
- member: Timestamp,
+ member: Timestamp
}
list DateTimeList {
- member: DateTime,
+ member: DateTime
}
@uniqueItems
list DateTimeSet {
- member: DateTime,
+ member: DateTime
}
@uniqueItems
list HttpDateSet {
- member: HttpDate,
+ member: HttpDate
}
@uniqueItems
@@ -169,17 +169,17 @@ enum FooEnum {
}
list FooEnumList {
- member: FooEnum,
+ member: FooEnum
}
@uniqueItems
list FooEnumSet {
- member: FooEnum,
+ member: FooEnum
}
map FooEnumMap {
- key: String,
- value: FooEnum,
+ key: String
+ value: FooEnum
}
@timestampFormat("date-time")
@@ -221,6 +221,6 @@ list IntegerEnumSet {
}
map IntegerEnumMap {
- key: String,
+ key: String
value: IntegerEnum
}
diff --git a/smithy-aws-smoke-test-model/src/main/resources/META-INF/smithy/aws.test.smithy b/smithy-aws-smoke-test-model/src/main/resources/META-INF/smithy/aws.test.smithy
index 2a1050de593..9bde48fd1fe 100644
--- a/smithy-aws-smoke-test-model/src/main/resources/META-INF/smithy/aws.test.smithy
+++ b/smithy-aws-smoke-test-model/src/main/resources/META-INF/smithy/aws.test.smithy
@@ -16,7 +16,7 @@ structure BaseAwsVendorParams {
/// A static endpoint to send the request to.
uri: String
- /// Whether to resolve a FIPS compliant endpoint or not.
+ // Whether to resolve a FIPS compliant endpoint or not.
useFips: Boolean = false
/// Whether to resolve a dualstack endpoint or not.
@@ -40,7 +40,7 @@ structure AwsVendorParams with [BaseAwsVendorParams] {}
/// Vendor params for S3.
@suppress(["UnreferencedShape"])
structure S3VendorParams with [BaseAwsVendorParams] {
- /// Whether to resolve an accelerate endpoint or not.
+ // Whether to resolve an accelerate endpoint or not.
useAccelerate: Boolean = false
/// Whether to use the global endpoint for us-east-1.
diff --git a/smithy-aws-smoke-test-model/src/test/resources/software/amazon/smithy/aws/smoketests/model/vendor-params.smithy b/smithy-aws-smoke-test-model/src/test/resources/software/amazon/smithy/aws/smoketests/model/vendor-params.smithy
index 2d3d7b78631..0de9241428c 100644
--- a/smithy-aws-smoke-test-model/src/test/resources/software/amazon/smithy/aws/smoketests/model/vendor-params.smithy
+++ b/smithy-aws-smoke-test-model/src/test/resources/software/amazon/smithy/aws/smoketests/model/vendor-params.smithy
@@ -2,9 +2,9 @@ $version: "2.0"
namespace com.foo
-use smithy.test#smokeTests
use aws.test#AwsVendorParams
use aws.test#S3VendorParams
+use smithy.test#smokeTests
@smokeTests([
{
diff --git a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.smithy b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.smithy
index baf9cb499f9..385e4902119 100644
--- a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.smithy
+++ b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.smithy
@@ -3,9 +3,7 @@ $version: "2.0"
namespace aws.api
/// Specifies an ARN template for the resource.
-@externalDocumentation(
- Reference: "https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"
-)
+@externalDocumentation(Reference: "https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html")
@trait(selector: "resource")
structure arn {
/// Defines the ARN template. The provided string contains URI-template
@@ -80,10 +78,7 @@ structure clientDiscoveredEndpoint {
structure clientEndpointDiscovery {
/// Indicates the operation that clients should use to discover endpoints
/// for the service.
- @idRef(
- failWhenMissing: true
- selector: "operation"
- )
+ @idRef(failWhenMissing: true, selector: "operation")
@required
operation: String
@@ -91,10 +86,7 @@ structure clientEndpointDiscovery {
/// is no longer valid. This error MUST be bound to any operation bound to
/// the service which is marked with the aws.api#clientDiscoveredEndpoint
/// trait.
- @idRef(
- failWhenMissing: true
- selector: "structure[trait|error]"
- )
+ @idRef(failWhenMissing: true, selector: "structure[trait|error]")
@recommended
error: String
}
@@ -111,9 +103,7 @@ structure clientEndpointDiscoveryId {}
/// Defines a service, resource, or operation as operating on the control plane.
@trait(
selector: ":test(service, resource, operation)"
- conflicts: [
- "aws.api#dataPlane"
- ]
+ conflicts: ["aws.api#dataPlane"]
)
structure controlPlane {}
@@ -150,9 +140,7 @@ enum data {
/// Defines a service, resource, or operation as operating on the data plane.
@trait(
selector: ":test(service, resource, operation)"
- conflicts: [
- "aws.api#controlPlane"
- ]
+ conflicts: ["aws.api#controlPlane"]
)
structure dataPlane {}
@@ -219,10 +207,7 @@ structure tagEnabled {
}
/// Points to an operation designated for a tagging APi
-@idRef(
- failWhenMissing: true
- selector: "resource > operation"
-)
+@idRef(failWhenMissing: true, selector: "resource > operation")
string TagOperationReference
/// Structure representing the configuration of resource specific tagging APIs
diff --git a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.smithy b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.smithy
index ceb88995c34..96654ef1016 100644
--- a/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.smithy
+++ b/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.smithy
@@ -5,12 +5,7 @@ namespace aws.protocols
/// An RPC-based protocol that sends JSON payloads. This protocol does not use
/// HTTP binding traits.
@protocolDefinition(
- traits: [
- timestampFormat
- cors
- endpoint
- hostLabel
- ]
+ traits: [timestampFormat, cors, endpoint, hostLabel]
)
@trait(selector: "service")
structure awsJson1_0 with [HttpConfiguration] {}
@@ -18,21 +13,16 @@ structure awsJson1_0 with [HttpConfiguration] {}
/// An RPC-based protocol that sends JSON payloads. This protocol does not use
/// HTTP binding traits.
@protocolDefinition(
- traits: [
- timestampFormat
- cors
- endpoint
- hostLabel
- ]
-)
-@trait(
- selector: "service"
+ traits: [timestampFormat, cors, endpoint, hostLabel]
)
+@trait(selector: "service")
structure awsJson1_1 with [HttpConfiguration] {}
/// Contains HTTP protocol configuration for HTTP-based protocols.
@private
-@mixin(localTraits: [private])
+@mixin(
+ localTraits: [private]
+)
structure HttpConfiguration {
/// The priority ordered list of supported HTTP protocol versions.
http: StringList
@@ -73,8 +63,12 @@ structure awsQuery {}
/// Provides the value in the 'Code' distinguishing field and HTTP response
/// code for an operation error.
@trait(
- selector: "structure [trait|error]",
- breakingChanges: [{change: "any"}]
+ selector: "structure [trait|error]"
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
structure awsQueryError {
/// The value used to distinguish this error shape during serialization.
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-empty-name.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-empty-name.smithy
index 041352cbabf..defc4160cc1 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-empty-name.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-empty-name.smithy
@@ -5,6 +5,4 @@ namespace smithy.example
use aws.auth#sigv4
@sigv4(name: "")
-service InvalidService {
- version: "2020-07-02"
-}
+service InvalidService { version: "2020-07-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-service-mismatch.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-service-mismatch.smithy
index 50b9e51b616..88ee40d0daf 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-service-mismatch.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-service-mismatch.smithy
@@ -7,6 +7,4 @@ use aws.auth#sigv4
@service(sdkId: "servicename")
@sigv4(name: "signingname")
-service InvalidService {
- version: "2020-07-02"
-}
+service InvalidService { version: "2020-07-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-sigv4a-mismatch.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-sigv4a-mismatch.smithy
index 803527de31c..6cb2c7965d9 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-sigv4a-mismatch.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4-sigv4a-mismatch.smithy
@@ -8,6 +8,4 @@ use aws.auth#sigv4a
@auth([sigv4a, sigv4])
@sigv4(name: "sigv4signingname")
@sigv4a(name: "sigv4asigningname")
-service InvalidService {
- version: "2020-07-02"
-}
+service InvalidService { version: "2020-07-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-empty-name.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-empty-name.smithy
index ef73c04f024..41fc57b27c3 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-empty-name.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-empty-name.smithy
@@ -8,6 +8,4 @@ use aws.auth#sigv4a
@auth([sigv4a, sigv4])
@sigv4(name: "signingname")
@sigv4a(name: "")
-service InvalidService {
- version: "2020-07-02"
-}
+service InvalidService { version: "2020-07-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-no-sigv4.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-no-sigv4.smithy
index 13b5f3644a4..d7bf9064303 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-no-sigv4.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-no-sigv4.smithy
@@ -5,6 +5,4 @@ namespace smithy.example
use aws.auth#sigv4a
@sigv4a(name: "signingname")
-service InvalidService {
- version: "2020-07-02"
-}
+service InvalidService { version: "2020-07-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-service-mismatch.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-service-mismatch.smithy
index 1c7c3a864b7..6c2e4ac8de2 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-service-mismatch.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/auth/sigv4a-service-mismatch.smithy
@@ -10,6 +10,4 @@ use aws.auth#sigv4a
@auth([sigv4a, sigv4])
@sigv4(name: "invalidservice")
@sigv4a(name: "signingname")
-service InvalidService {
- version: "2020-07-02"
-}
+service InvalidService { version: "2020-07-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/aws-query-compatible.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/aws-query-compatible.smithy
index a748c687ef5..685e6748de8 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/aws-query-compatible.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/aws-query-compatible.smithy
@@ -2,21 +2,20 @@ $version: "2.0"
namespace smithy.example
+use aws.protocols#awsJson1_0
use aws.protocols#awsQueryCompatible
use aws.protocols#awsQueryError
-use aws.protocols#awsJson1_0
@awsQueryCompatible
@awsJson1_0
service MyService {
- version: "2020-02-05",
- errors: [InvalidThingException]
+ version: "2020-02-05"
+ errors: [
+ InvalidThingException
+ ]
}
-@awsQueryError(
- code: "InvalidThing",
- httpResponseCode: 400,
-)
+@awsQueryError(code: "InvalidThing", httpResponseCode: 400)
@error("client")
structure InvalidThingException {
message: String
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/endpoint-error.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/endpoint-error.smithy
index f7bd9e9cda2..459b96d6218 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/endpoint-error.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/endpoint-error.smithy
@@ -2,102 +2,107 @@ $version: "2.0"
namespace ns.foo
-use aws.api#clientEndpointDiscovery
use aws.api#clientDiscoveredEndpoint
+use aws.api#clientEndpointDiscovery
// This deliberately doesn't have an endpoint error. This should result in
// a DANGER.
@clientEndpointDiscovery(operation: DescribeEndpoints)
service FooService {
- version: "2021-06-29",
- operations: [DescribeEndpoints, GetObject],
+ version: "2021-06-29"
+ operations: [
+ DescribeEndpoints
+ GetObject
+ ]
}
// This DOES have an error, but it's not bound to the operations. This should
// result in an ERROR.
-@clientEndpointDiscovery(
- operation: DescribeEndpoints,
- error: InvalidEndpointError,
-)
+@clientEndpointDiscovery(operation: DescribeEndpoints, error: InvalidEndpointError)
service BarService {
- version: "2021-06-29",
- operations: [DescribeEndpoints, GetObject],
+ version: "2021-06-29"
+ operations: [
+ DescribeEndpoints
+ GetObject
+ ]
}
// This DOES have an error, and it IS bound to the operations. This should
// not produce any validation events.
-@clientEndpointDiscovery(
- operation: DescribeEndpoints,
- error: InvalidEndpointError,
-)
+@clientEndpointDiscovery(operation: DescribeEndpoints, error: InvalidEndpointError)
service BazService {
- version: "2021-06-29",
- operations: [DescribeEndpoints, GetObjectWithEndpointError],
+ version: "2021-06-29"
+ operations: [
+ DescribeEndpoints
+ GetObjectWithEndpointError
+ ]
}
operation DescribeEndpoints {
- input: DescribeEndpointsInput,
- output: DescribeEndpointsOutput,
+ input: DescribeEndpointsInput
+ output: DescribeEndpointsOutput
}
@input
structure DescribeEndpointsInput {
- Operation: String,
- Identifiers: Identifiers,
+ Operation: String
+ Identifiers: Identifiers
}
map Identifiers {
- key: String,
- value: String,
+ key: String
+ value: String
}
@output
structure DescribeEndpointsOutput {
- Endpoints: Endpoints,
+ Endpoints: Endpoints
}
list Endpoints {
- member: Endpoint,
+ member: Endpoint
}
structure Endpoint {
- Address: String,
- CachePeriodInMinutes: Long,
+ Address: String
+ CachePeriodInMinutes: Long
}
@clientDiscoveredEndpoint(required: true)
operation GetObject {
- input: GetObjectInput,
- output: GetObjectOutput,
+ input: GetObjectInput
+ output: GetObjectOutput
}
@input
structure GetObjectInput {
@required
- Id: String,
+ Id: String
}
@output
structure GetObjectOutput {
- Object: Blob,
+ Object: Blob
}
@clientDiscoveredEndpoint(required: true)
operation GetObjectWithEndpointError {
- input: GetObjectWithEndpointErrorInput,
- output: GetObjectWithEndpointErrorOutput,
- errors: [InvalidEndpointError],
+ input: GetObjectWithEndpointErrorInput
+ output: GetObjectWithEndpointErrorOutput
+ errors: [
+ InvalidEndpointError
+ ]
}
@input
structure GetObjectWithEndpointErrorInput {
@required
- Id: String,
+ Id: String
}
@output
structure GetObjectWithEndpointErrorOutput {
- Object: Blob,
+ Object: Blob
}
@error("client")
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-operations.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-operations.smithy
index ba6dc7936fb..c327d5ab72d 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-operations.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-operations.smithy
@@ -3,62 +3,63 @@ $version: "2.0"
namespace ns.foo
use aws.api#clientEndpointDiscovery
-use aws.api#clientDiscoveredEndpoint
-@clientEndpointDiscovery(
- operation: DescribeEndpoints,
- error: InvalidEndpointError,
-)
+@clientEndpointDiscovery(operation: DescribeEndpoints, error: InvalidEndpointError)
service BazService {
- version: "2021-06-29",
- operations: [DescribeEndpoints, GetObjectWithEndpointError],
+ version: "2021-06-29"
+ operations: [
+ DescribeEndpoints
+ GetObjectWithEndpointError
+ ]
}
operation DescribeEndpoints {
- input: DescribeEndpointsInput,
- output: DescribeEndpointsOutput,
+ input: DescribeEndpointsInput
+ output: DescribeEndpointsOutput
}
@input
structure DescribeEndpointsInput {
- Operation: String,
- Identifiers: Identifiers,
+ Operation: String
+ Identifiers: Identifiers
}
map Identifiers {
- key: String,
- value: String,
+ key: String
+ value: String
}
@output
structure DescribeEndpointsOutput {
- Endpoints: Endpoints,
+ Endpoints: Endpoints
}
list Endpoints {
- member: Endpoint,
+ member: Endpoint
}
structure Endpoint {
- Address: String,
- CachePeriodInMinutes: Long,
+ Address: String
+ CachePeriodInMinutes: Long
}
operation GetObjectWithEndpointError {
- input: GetObjectWithEndpointErrorInput,
- output: GetObjectWithEndpointErrorOutput,
- errors: [InvalidEndpointError],
+ input: GetObjectWithEndpointErrorInput
+ output: GetObjectWithEndpointErrorOutput
+ errors: [
+ InvalidEndpointError
+ ]
}
@input
structure GetObjectWithEndpointErrorInput {
@required
- Id: String,
+ Id: String
}
@output
structure GetObjectWithEndpointErrorOutput {
- Object: Blob,
+ Object: Blob
}
@error("client")
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/unbound-operations.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/unbound-operations.smithy
index 083ca4fded5..a88a2acce1a 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/unbound-operations.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/unbound-operations.smithy
@@ -2,94 +2,95 @@ $version: "2.0"
namespace ns.foo
-use aws.api#clientEndpointDiscovery
use aws.api#clientDiscoveredEndpoint
+use aws.api#clientEndpointDiscovery
// This DOES have an error, but it's not bound to the operations. This should
// result in an ERROR.
-@clientEndpointDiscovery(
- operation: DescribeEndpoints,
- error: InvalidEndpointError,
-)
+@clientEndpointDiscovery(operation: DescribeEndpoints, error: InvalidEndpointError)
service BarService {
- version: "2021-06-29",
- operations: [GetObject],
+ version: "2021-06-29"
+ operations: [
+ GetObject
+ ]
}
// This DOES have an error, and it IS bound to the operations. This should
// not produce any validation events.
-@clientEndpointDiscovery(
- operation: DescribeEndpoints,
- error: InvalidEndpointError,
-)
+@clientEndpointDiscovery(operation: DescribeEndpoints, error: InvalidEndpointError)
service BazService {
- version: "2021-06-29",
- operations: [DescribeEndpoints, GetObjectWithEndpointError],
+ version: "2021-06-29"
+ operations: [
+ DescribeEndpoints
+ GetObjectWithEndpointError
+ ]
}
operation DescribeEndpoints {
- input: DescribeEndpointsInput,
- output: DescribeEndpointsOutput,
+ input: DescribeEndpointsInput
+ output: DescribeEndpointsOutput
}
@input
structure DescribeEndpointsInput {
- Operation: String,
- Identifiers: Identifiers,
+ Operation: String
+ Identifiers: Identifiers
}
map Identifiers {
- key: String,
- value: String,
+ key: String
+ value: String
}
@output
structure DescribeEndpointsOutput {
- Endpoints: Endpoints,
+ Endpoints: Endpoints
}
list Endpoints {
- member: Endpoint,
+ member: Endpoint
}
structure Endpoint {
- Address: String,
- CachePeriodInMinutes: Long,
+ Address: String
+ CachePeriodInMinutes: Long
}
@clientDiscoveredEndpoint(required: true)
operation GetObject {
- input: GetObjectInput,
- output: GetObjectOutput,
+ input: GetObjectInput
+ output: GetObjectOutput
}
@input
structure GetObjectInput {
@required
- Id: String,
+ Id: String
}
@output
structure GetObjectOutput {
- Object: Blob,
+ Object: Blob
}
@clientDiscoveredEndpoint(required: true)
operation GetObjectWithEndpointError {
- input: GetObjectWithEndpointErrorInput,
- output: GetObjectWithEndpointErrorOutput,
- errors: [InvalidEndpointError],
+ input: GetObjectWithEndpointErrorInput
+ output: GetObjectWithEndpointErrorOutput
+ errors: [
+ InvalidEndpointError
+ ]
}
@input
structure GetObjectWithEndpointErrorInput {
@required
- Id: String,
+ Id: String
}
@output
structure GetObjectWithEndpointErrorOutput {
- Object: Blob,
+ Object: Blob
}
@error("client")
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/error-rename.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/error-rename.smithy
index 5ea61919be5..bcea895f1c5 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/error-rename.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/error-rename.smithy
@@ -8,10 +8,10 @@ use aws.protocols#restXml
@awsJson1_1
@restXml
service MyService {
- version: "1",
+ version: "1"
operations: [
- SayHello,
- ],
+ SayHello
+ ]
rename: {
"smithy.example#BadGreeting": "ThisDoesNotWork"
"smithy.example#ServerError": "ServerDown"
@@ -20,9 +20,12 @@ service MyService {
}
operation SayHello {
- input: SayHelloInput,
- output: SayHelloOutput,
- errors: [BadGreeting, ServerError]
+ input: SayHelloInput
+ output: SayHelloOutput
+ errors: [
+ BadGreeting
+ ServerError
+ ]
}
@input
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-header-conflicts.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-header-conflicts.smithy
index 8ec5b700ff6..88d17521273 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-header-conflicts.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-header-conflicts.smithy
@@ -5,130 +5,135 @@ namespace smithy.example
use aws.protocols#httpChecksum
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@http(method: "GET", uri: "/headerconflict")
@readonly
@suppress(["UnstableTrait"])
operation HeaderConflicts {
- input: HeaderConflictsInput,
- output: HeaderConflictsOutput,
- errors: [HeaderConflictError,]
+ input: HeaderConflictsInput
+ output: HeaderConflictsOutput
+ errors: [
+ HeaderConflictError
+ ]
}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@http(method: "GET", uri: "/headersconflict")
@readonly
@suppress(["UnstableTrait"])
operation HeadersConflicts {
- input: HeadersConflictsInput,
- output: HeadersConflictsOutput,
- errors: [HeadersConflictError,]
+ input: HeadersConflictsInput
+ output: HeadersConflictsOutput
+ errors: [
+ HeadersConflictError
+ ]
}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@http(method: "GET", uri: "/noconflict")
@readonly
@suppress(["UnstableTrait"])
operation NoConflicts {
- input: NoConflictsInput,
- output: NoConflictsOutput,
- errors: [NoConflictError,]
-
+ input: NoConflictsInput
+ output: NoConflictsOutput
+ errors: [
+ NoConflictError
+ ]
}
@input
structure HeaderConflictsInput {
@httpHeader("x-amz-checksum-crc32")
- warningConflictHeader: String,
+ warningConflictHeader: String
@httpQuery("requestAlgorithm")
- requestAlgorithm: ChecksumAlgorithm,
+ requestAlgorithm: ChecksumAlgorithm
@httpQuery("validationMode")
- validationMode: ValidationMode,
+ validationMode: ValidationMode
}
@output
structure HeaderConflictsOutput {
@httpHeader("x-amz-checksum-CRC32")
- warningConflictHeader: String,
+ warningConflictHeader: String
}
@input
structure HeadersConflictsInput {
@httpPrefixHeaders("x-amz-checksum-")
- dangerConflictHeaders: StringMap,
+ dangerConflictHeaders: StringMap
@httpQuery("requestAlgorithm")
- requestAlgorithm: ChecksumAlgorithm,
+ requestAlgorithm: ChecksumAlgorithm
@httpQuery("validationMode")
- validationMode: ValidationMode,
+ validationMode: ValidationMode
}
@output
structure HeadersConflictsOutput {
@httpPrefixHeaders("x-amz-checksum-")
- dangerConflictHeaders: StringMap,
+ dangerConflictHeaders: StringMap
}
@input
structure NoConflictsInput {
@httpHeader("x-safe-header")
- noConflictHeader: String,
+ noConflictHeader: String
@httpPrefixHeaders("x-foo")
- noConflictHeaders: StringMap,
+ noConflictHeaders: StringMap
@httpQuery("requestAlgorithm")
- requestAlgorithm: ChecksumAlgorithm,
+ requestAlgorithm: ChecksumAlgorithm
@httpQuery("validationMode")
- validationMode: ValidationMode,
+ validationMode: ValidationMode
}
@output
structure NoConflictsOutput {
@httpHeader("x-safe-header")
- noConflictHeader: String,
+ noConflictHeader: String
@httpPrefixHeaders("x-foo")
- noConflictHeaders: StringMap,
+ noConflictHeaders: StringMap
}
@error("client")
@httpError(400)
structure HeaderConflictError {
@httpHeader("x-amz-checksum-CRC32")
- warningConflictHeader: String,
+ warningConflictHeader: String
}
@error("client")
@httpError(400)
structure HeadersConflictError {
@httpPrefixHeaders("x-amz-checksum-")
- dangerConflictHeaders: StringMap,
+ dangerConflictHeaders: StringMap
}
@error("client")
@httpError(401)
structure NoConflictError {
@httpHeader("x-safe-header")
- noConflictHeader: String,
+ noConflictHeader: String
@httpPrefixHeaders("x-foo")
- noConflictHeaders: StringMap,
+ noConflictHeaders: StringMap
}
enum ChecksumAlgorithm {
@@ -143,6 +148,6 @@ enum ValidationMode {
}
map StringMap {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-member-enums.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-member-enums.smithy
index 046d016f255..76f52af05c7 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-member-enums.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-member-enums.smithy
@@ -5,75 +5,74 @@ namespace smithy.example
use aws.protocols#httpChecksum
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@suppress(["UnstableTrait"])
operation ValidEnums {
- input: ValidEnumsInput,
- output: ValidEnumsOutput,
-
+ input: ValidEnumsInput
+ output: ValidEnumsOutput
}
@input
structure ValidEnumsInput {
- requestAlgorithm: ChecksumAlgorithm,
- validationMode: ValidationMode,
+ requestAlgorithm: ChecksumAlgorithm
+ validationMode: ValidationMode
}
@output
structure ValidEnumsOutput {}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@suppress(["UnstableTrait"])
operation InvalidEnums {
- input: InvalidEnumsInput,
- output: InvalidEnumsOutput,
+ input: InvalidEnumsInput
+ output: InvalidEnumsOutput
}
@input
structure InvalidEnumsInput {
- requestAlgorithm: BadChecksumAlgorithm,
- validationMode: BadValidationMode,
+ requestAlgorithm: BadChecksumAlgorithm
+ validationMode: BadValidationMode
}
@output
structure InvalidEnumsOutput {}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@suppress(["UnstableTrait"])
operation NoEnums {
- input: NoEnumsInput,
- output: NoEnumsOutput,
+ input: NoEnumsInput
+ output: NoEnumsOutput
}
@input
structure NoEnumsInput {
- requestAlgorithm: String,
- validationMode: String,
+ requestAlgorithm: String
+ validationMode: String
}
@output
structure NoEnumsOutput {}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@suppress(["UnstableTrait"])
operation NoMember {
- input: NoMemberInput,
- output: NoMemberOutput,
+ input: NoMemberInput
+ output: NoMemberOutput
}
@input
@@ -93,7 +92,6 @@ enum ValidationMode {
ENABLED
}
-
enum BadChecksumAlgorithm {
SHA2
}
@@ -103,6 +101,6 @@ enum BadValidationMode {
}
map StringMap {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy
index 800cb375ace..bdb37151278 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/http-checksum-trait.smithy
@@ -4,19 +4,17 @@ namespace smithy.example
use aws.protocols#httpChecksum
-@httpChecksum()
+@httpChecksum
@suppress(["UnstableTrait"])
operation NoBehavior {
- input: NoBehaviorInput,
+ input: NoBehaviorInput
output: Unit
}
@input
structure NoBehaviorInput {}
-@httpChecksum(
- requestChecksumRequired: true,
-)
+@httpChecksum(requestChecksumRequired: true)
@suppress(["UnstableTrait"])
operation NoInput {
output: Unit
@@ -27,8 +25,8 @@ operation NoInput {
)
@suppress(["UnstableTrait"])
operation NoModeForResponse {
- input: NoModeForResponseInput,
- output: NoModeForResponseOutput,
+ input: NoModeForResponseInput
+ output: NoModeForResponseOutput
}
@input
@@ -38,20 +36,20 @@ structure NoModeForResponseInput {}
structure NoModeForResponseOutput {}
@httpChecksum(
- requestAlgorithmMember: "requestAlgorithm",
- requestValidationModeMember: "validationMode",
+ requestAlgorithmMember: "requestAlgorithm"
+ requestValidationModeMember: "validationMode"
responseAlgorithms: ["CRC32C"]
)
@suppress(["UnstableTrait"])
operation NoOutputForResponse {
- input: NoOutputForResponseInput,
+ input: NoOutputForResponseInput
output: Unit
}
@input
structure NoOutputForResponseInput {
- requestAlgorithm: ChecksumAlgorithm,
- validationMode: ValidationMode,
+ requestAlgorithm: ChecksumAlgorithm
+ validationMode: ValidationMode
}
enum ChecksumAlgorithm {
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-protocols-do-not-support-list-set-map-payloads.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-protocols-do-not-support-list-set-map-payloads.smithy
index 0659896e205..26a4a6f8574 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-protocols-do-not-support-list-set-map-payloads.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-protocols-do-not-support-list-set-map-payloads.smithy
@@ -12,30 +12,32 @@ use smithy.api#httpPayload
@restJson1
service InvalidExample {
- version: "2020-12-29",
+ version: "2020-12-29"
operations: [
- InvalidBindingOperation,
+ InvalidBindingOperation
InvalidSimpleBindingOperation
- ],
+ ]
}
@http(method: "POST", uri: "/invalid-payload")
operation InvalidBindingOperation {
- input: InvalidBindingOperationInput,
- output: InvalidBindingOperationOutput,
- errors: [InvalidBindingError],
+ input: InvalidBindingOperationInput
+ output: InvalidBindingOperationOutput
+ errors: [
+ InvalidBindingError
+ ]
}
@input
structure InvalidBindingOperationInput {
@httpPayload
- listBinding: StringList,
+ listBinding: StringList
}
@output
structure InvalidBindingOperationOutput {
@httpPayload
- mapBinding: StringMap,
+ mapBinding: StringMap
}
@error("client")
@@ -46,21 +48,23 @@ structure InvalidBindingError {
@http(method: "POST", uri: "/invalid-simple-payload")
operation InvalidSimpleBindingOperation {
- input: InvalidSimpleBindingOperationInput,
- output: InvalidSimpleBindingOperationOutput,
- errors: [InvalidSimpleBindingError],
+ input: InvalidSimpleBindingOperationInput
+ output: InvalidSimpleBindingOperationOutput
+ errors: [
+ InvalidSimpleBindingError
+ ]
}
@input
structure InvalidSimpleBindingOperationInput {
@httpPayload
- booleanBinding: Boolean,
+ booleanBinding: Boolean
}
@output
structure InvalidSimpleBindingOperationOutput {
@httpPayload
- integerBinding: Integer,
+ integerBinding: Integer
}
@error("client")
@@ -78,6 +82,6 @@ set StringSet {
}
map StringMap {
- key: String,
- value: String,
+ key: String
+ value: String
}
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-query-compatible-does-not-support-non-aws-json.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-query-compatible-does-not-support-non-aws-json.smithy
index 110bff6c730..303049057b9 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-query-compatible-does-not-support-non-aws-json.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/aws-query-compatible-does-not-support-non-aws-json.smithy
@@ -2,22 +2,21 @@ $version: "2.0"
namespace smithy.example
+use aws.protocols#awsQuery
use aws.protocols#awsQueryCompatible
use aws.protocols#awsQueryError
-use aws.protocols#awsQuery
@awsQueryCompatible
@awsQuery
@xmlNamespace(uri: "https://example.com")
service MyService {
- version: "2020-02-05",
- errors: [InvalidThingException]
+ version: "2020-02-05"
+ errors: [
+ InvalidThingException
+ ]
}
-@awsQueryError(
- code: "InvalidThing",
- httpResponseCode: 400,
-)
+@awsQueryError(code: "InvalidThing", httpResponseCode: 400)
@error("client")
structure InvalidThingException {
message: String
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/eventStreamHttp-matches-http.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/eventStreamHttp-matches-http.smithy
index 20de76f8cc8..4fa04837fff 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/eventStreamHttp-matches-http.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/eventStreamHttp-matches-http.smithy
@@ -4,37 +4,43 @@ namespace smithy.example
use aws.protocols#restJson1
-@restJson1(http: ["h2", "http/1.1"], eventStreamHttp: ["h2"])
-service ValidService1 {
- version: "2020-04-02"
-}
-
-@restJson1(http: ["h2"], eventStreamHttp: ["h2"])
-service ValidService2 {
- version: "2020-04-02"
-}
-
-@restJson1(http: [], eventStreamHttp: [])
-service ValidService3 {
- version: "2020-04-02"
-}
-
-@restJson1(http: ["http/1.1"], eventStreamHttp: [])
-service ValidService4 {
- version: "2020-04-02"
-}
-
-@restJson1(eventStreamHttp: ["http/1.1"])
-service InvalidService1 {
- version: "2020-04-02"
-}
-
-@restJson1(http: ["h2"], eventStreamHttp: ["http/1.1"])
-service InvalidService2 {
- version: "2020-04-02"
-}
-
-@restJson1(http: ["h2"], eventStreamHttp: ["h2", "http/1.1", "h2c"])
-service InvalidService3 {
- version: "2020-04-02"
-}
+@restJson1(
+ http: ["h2", "http/1.1"]
+ eventStreamHttp: ["h2"]
+)
+service ValidService1 { version: "2020-04-02" }
+
+@restJson1(
+ http: ["h2"]
+ eventStreamHttp: ["h2"]
+)
+service ValidService2 { version: "2020-04-02" }
+
+@restJson1(
+ http: []
+ eventStreamHttp: []
+)
+service ValidService3 { version: "2020-04-02" }
+
+@restJson1(
+ http: ["http/1.1"]
+ eventStreamHttp: []
+)
+service ValidService4 { version: "2020-04-02" }
+
+@restJson1(
+ eventStreamHttp: ["http/1.1"]
+)
+service InvalidService1 { version: "2020-04-02" }
+
+@restJson1(
+ http: ["h2"]
+ eventStreamHttp: ["http/1.1"]
+)
+service InvalidService2 { version: "2020-04-02" }
+
+@restJson1(
+ http: ["h2"]
+ eventStreamHttp: ["h2", "http/1.1", "h2c"]
+)
+service InvalidService3 { version: "2020-04-02" }
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/xml-protocols-do-not-support-documents.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/xml-protocols-do-not-support-documents.smithy
index a6c68fedc09..878a6199afc 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/xml-protocols-do-not-support-documents.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/protocols/xml-protocols-do-not-support-documents.smithy
@@ -7,21 +7,24 @@ namespace smithy.example
use aws.protocols#awsQuery
@awsQuery
-@suppress(["DeprecatedTrait"]) // ignore the fact that the awsQuery trait is deprecated
+@suppress(["DeprecatedTrait"])
+// ignore the fact that the awsQuery trait is deprecated
@xmlNamespace(uri: "https://example.com")
service InvalidExample {
- version: "2020-06-15",
- operations: [Operation1]
+ version: "2020-06-15"
+ operations: [
+ Operation1
+ ]
}
operation Operation1 {
- input: Operation1Input,
+ input: Operation1Input
output: Operation1Output
}
@input
structure Operation1Input {
- foo: InlineDocument,
+ foo: InlineDocument
}
document InlineDocument
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-resource-tag-service-wide.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-resource-tag-service-wide.smithy
index da38422a80b..d60923deae0 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-resource-tag-service-wide.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-resource-tag-service-wide.smithy
@@ -2,7 +2,7 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
@@ -10,14 +10,21 @@ metadata suppressions = [
namespace example.weather
use aws.api#arn
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime, TagResource, UntagResource, ListTagsForResource]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ TagResource
+ UntagResource
+ ListTagsForResource
+ ]
}
structure Tag {
@@ -37,20 +44,24 @@ operation TagResource {
input := {
@required
arn: String
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagResource {
input := {
@required
arn: String
+
@required
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForResource {
@@ -58,31 +69,26 @@ operation ListTagsForResource {
@required
arn: String
}
+
output := {
@length(max: 128)
tags: TagList
}
}
-@arn(
- template: "city/{cityId}/forecast/{forecastId}"
-)
+@arn(template: "city/{cityId}/forecast/{forecastId}")
resource Forecast {
- identifiers: {
- cityId: CityId
- forecastId: ForecastId
- }
+ identifiers: { cityId: CityId, forecastId: ForecastId }
}
@taggable
resource City {
identifiers: { cityId: CityId }
- properties: {
- name: String
- coordinates: CityCoordinates
- }
+ properties: { name: String, coordinates: CityCoordinates }
read: GetCity
- resources: [Forecast]
+ resources: [
+ Forecast
+ ]
}
@pattern("^[A-Za-z0-9 ]+$")
@@ -95,7 +101,9 @@ string CityId
operation GetCity {
input: GetCityInput
output: GetCityOutput
- errors: [NoSuchResource]
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -111,7 +119,7 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
coordinates: CityCoordinates
@@ -120,10 +128,10 @@ structure GetCityOutput {
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -148,4 +156,3 @@ structure GetCurrentTimeOutput {
@required
time: Timestamp
}
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-list-broken.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-list-broken.smithy
index c94d6cc12d2..b2d2857b696 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-list-broken.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-list-broken.smithy
@@ -2,21 +2,27 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [TagResource, UntagResource, ListTagsForResource]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ TagResource
+ UntagResource
+ ListTagsForResource
+ ]
}
structure Tag {
@@ -37,20 +43,24 @@ operation TagResource {
input := {
@required
arn: String
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagResource {
input := {
@required
arn: String
+
@required
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForResource {
@@ -70,9 +80,8 @@ structure ListTagsForResourceOutput {
@taggable
resource City {
- identifiers: { cityId: CityId },
+ identifiers: { cityId: CityId }
}
@pattern("^[A-Za-z0-9 ]+$")
string CityId
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-no-taggable-resource.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-no-taggable-resource.smithy
index 23a13e3855e..b62c3deb3d8 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-no-taggable-resource.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-enabled-service-no-taggable-resource.smithy
@@ -2,20 +2,21 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
}
structure Tag {
@@ -28,12 +29,8 @@ list TagList {
}
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tags: TagList
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tags: TagList }
create: CreateCity
}
@@ -43,6 +40,7 @@ operation CreateCity {
coordinates: CityCoordinates
tags: TagList
}
+
output := {
@required
cityId: CityId
@@ -55,9 +53,8 @@ string CityId
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-on-create.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-on-create.smithy
index b18fa828584..38658e86686 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-on-create.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-on-create.smithy
@@ -2,20 +2,22 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
}
structure Tag {
@@ -30,12 +32,8 @@ list TagList {
/// Tag-on-create, not defined as a resource property
@taggable(property: "tags")
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tags: TagList
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tags: TagList }
create: CreateCity
}
@@ -45,6 +43,7 @@ operation CreateCity {
coordinates: CityCoordinates
tags: TagList
}
+
output := {
@required
cityId: CityId
@@ -57,9 +56,8 @@ string CityId
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-types.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-types.smithy
index 44aeb1e8cb8..8f895a5024a 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-types.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/invalid-tag-types.smithy
@@ -2,21 +2,25 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ ]
}
structure Tag {
@@ -36,21 +40,25 @@ operation TagCity {
input := {
@required
cityId: CityId
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagCity {
input := {
@required
cityId: CityId
+
@required
@notProperty
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForCity {
@@ -58,23 +66,27 @@ operation ListTagsForCity {
@required
cityId: CityId
}
- output := {
+
+ output := {
@length(max: 128)
tags: TagList
}
}
-@taggable(property: "tags", apiConfig: {tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity})
+@taggable(
+ property: "tags"
+ apiConfig: { tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity }
+)
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tags: TagList
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tags: TagList }
create: CreateCity
- read: GetCity,
- operations: [TagCity, UntagCity, ListTagsForCity],
+ read: GetCity
+ operations: [
+ TagCity
+ UntagCity
+ ListTagsForCity
+ ]
}
operation CreateCity {
@@ -82,6 +94,7 @@ operation CreateCity {
name: String
coordinates: CityCoordinates
}
+
output := {
@required
cityId: CityId
@@ -93,9 +106,11 @@ string CityId
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -111,19 +126,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -136,7 +151,7 @@ structure NoSuchResource {
@readonly
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
@@ -148,4 +163,3 @@ structure GetCurrentTimeOutput {
@required
time: Timestamp
}
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/tagging-warnings.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/tagging-warnings.smithy
index b15aeecee53..a034aacef1a 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/tagging-warnings.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/tagging-warnings.smithy
@@ -2,21 +2,25 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled(disableDefaultOperations: true)
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ ]
}
structure Tag {
@@ -36,22 +40,26 @@ operation TagCity {
input := {
@required
cityId: CityId
+
@length(max: 128)
@property(name: "tagz")
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagCity {
input := {
@required
cityId: CityId
+
@required
@notProperty
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForCity {
@@ -59,25 +67,29 @@ operation ListTagsForCity {
@required
cityId: CityId
}
- output := {
+
+ output := {
@length(max: 128)
@property(name: "tagz")
tags: TagList
}
}
-@taggable(property: "tagz", apiConfig: {tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity})
+@taggable(
+ property: "tagz"
+ apiConfig: { tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity }
+)
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tagz: TagList
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tagz: TagList }
create: CreateCity
- read: GetCity,
+ read: GetCity
update: UpdateCity
- operations: [TagCity, UntagCity, ListTagsForCity],
+ operations: [
+ TagCity
+ UntagCity
+ ListTagsForCity
+ ]
}
operation CreateCity {
@@ -85,6 +97,7 @@ operation CreateCity {
name: String
coordinates: CityCoordinates
}
+
output := {
@required
cityId: CityId
@@ -98,16 +111,20 @@ operation UpdateCity {
input := {
@required
cityId: CityId
+
tagz: TagList
}
+
output := {}
}
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -123,19 +140,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -148,7 +165,7 @@ structure NoSuchResource {
@readonly
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-all-modes.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-all-modes.smithy
index da2144834f7..dc821d4ff0d 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-all-modes.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-all-modes.smithy
@@ -2,21 +2,28 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime, TagResource, UntagResource, ListTagsForResource]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ TagResource
+ UntagResource
+ ListTagsForResource
+ ]
}
structure Tag {
@@ -36,20 +43,24 @@ operation TagResource {
input := {
@required
arn: String
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagResource {
input := {
@required
arn: String
+
@required
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForResource {
@@ -57,6 +68,7 @@ operation ListTagsForResource {
@required
arn: String
}
+
output := {
@length(max: 128)
tags: TagList
@@ -67,21 +79,25 @@ operation TagCity {
input := {
@required
cityId: CityId
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagCity {
input := {
@required
cityId: CityId
+
@required
@notProperty
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForCity {
@@ -89,22 +105,26 @@ operation ListTagsForCity {
@required
cityId: CityId
}
- output := {
+
+ output := {
@length(max: 128)
tags: TagList
}
}
-@taggable(property: "tags", apiConfig: {tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity})
+@taggable(
+ property: "tags"
+ apiConfig: { tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity }
+)
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tags: TagList
- }
- read: GetCity,
- operations: [TagCity, UntagCity, ListTagsForCity],
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tags: TagList }
+ read: GetCity
+ operations: [
+ TagCity
+ UntagCity
+ ListTagsForCity
+ ]
}
@pattern("^[A-Za-z0-9 ]+$")
@@ -112,9 +132,11 @@ string CityId
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -130,19 +152,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -155,7 +177,7 @@ structure NoSuchResource {
@readonly
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
@@ -167,4 +189,3 @@ structure GetCurrentTimeOutput {
@required
time: Timestamp
}
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-service-wide.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-service-wide.smithy
index 5e77b39fa73..971e0decd5a 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-service-wide.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-service-wide.smithy
@@ -2,7 +2,7 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
@@ -10,14 +10,21 @@ metadata suppressions = [
namespace example.weather
use aws.api#arn
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime, TagResource, UntagResource, ListTagsForResource]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ TagResource
+ UntagResource
+ ListTagsForResource
+ ]
}
structure Tag {
@@ -37,20 +44,24 @@ operation TagResource {
input := {
@required
arn: String
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagResource {
input := {
@required
arn: String
+
@required
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForResource {
@@ -58,32 +69,27 @@ operation ListTagsForResource {
@required
arn: String
}
+
output := {
@length(max: 128)
tags: TagList
}
}
-@arn(
- template: "city/{cityId}/forecast/{forecastId}"
-)
+@arn(template: "city/{cityId}/forecast/{forecastId}")
resource Forecast {
- identifiers: {
- cityId: CityId
- forecastId: ForecastId
- }
+ identifiers: { cityId: CityId, forecastId: ForecastId }
}
@taggable
@arn(template: "city/{CityId}")
resource City {
identifiers: { cityId: CityId }
- properties: {
- name: String
- coordinates: CityCoordinates
- }
+ properties: { name: String, coordinates: CityCoordinates }
read: GetCity
- resources: [Forecast]
+ resources: [
+ Forecast
+ ]
}
@pattern("^[A-Za-z0-9 ]+$")
@@ -96,7 +102,9 @@ string CityId
operation GetCity {
input: GetCityInput
output: GetCityOutput
- errors: [NoSuchResource]
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -112,7 +120,7 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
coordinates: CityCoordinates
@@ -121,10 +129,10 @@ structure GetCityOutput {
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -149,4 +157,3 @@ structure GetCurrentTimeOutput {
@required
time: Timestamp
}
-
diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-specified-apis.smithy b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-specified-apis.smithy
index d0b771b48cd..068fbd49beb 100644
--- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-specified-apis.smithy
+++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/tagging/valid-tag-specified-apis.smithy
@@ -2,21 +2,25 @@ $version: "2.0"
metadata suppressions = [
{
- id: "UnstableTrait",
+ id: "UnstableTrait"
namespace: "example.weather"
}
]
namespace example.weather
-use aws.api#taggable
use aws.api#tagEnabled
+use aws.api#taggable
@tagEnabled(disableDefaultOperations: true)
service Weather {
- version: "2006-03-01",
- resources: [City]
- operations: [GetCurrentTime]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ ]
}
structure Tag {
@@ -36,21 +40,25 @@ operation TagCity {
input := {
@required
cityId: CityId
+
@length(max: 128)
tags: TagList
}
- output := { }
+
+ output := {}
}
operation UntagCity {
input := {
@required
cityId: CityId
+
@required
@notProperty
tagKeys: TagKeys
}
- output := { }
+
+ output := {}
}
operation ListTagsForCity {
@@ -58,23 +66,27 @@ operation ListTagsForCity {
@required
cityId: CityId
}
- output := {
+
+ output := {
@length(max: 128)
tags: TagList
}
}
-@taggable(property: "tags", apiConfig: {tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity})
+@taggable(
+ property: "tags"
+ apiConfig: { tagApi: TagCity, untagApi: UntagCity, listTagsApi: ListTagsForCity }
+)
resource City {
- identifiers: { cityId: CityId },
- properties: {
- name: String
- coordinates: CityCoordinates
- tags: TagList
- }
+ identifiers: { cityId: CityId }
+ properties: { name: String, coordinates: CityCoordinates, tags: TagList }
create: CreateCity
- read: GetCity,
- operations: [TagCity, UntagCity, ListTagsForCity],
+ read: GetCity
+ operations: [
+ TagCity
+ UntagCity
+ ListTagsForCity
+ ]
}
operation CreateCity {
@@ -82,6 +94,7 @@ operation CreateCity {
name: String
coordinates: CityCoordinates
}
+
output := {
@required
cityId: CityId
@@ -93,9 +106,11 @@ string CityId
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
@input
@@ -111,19 +126,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -136,7 +151,7 @@ structure NoSuchResource {
@readonly
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
@@ -148,4 +163,3 @@ structure GetCurrentTimeOutput {
@required
time: Timestamp
}
-
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/plugins/nullability/example.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/plugins/nullability/example.smithy
index 1e0b6eef08e..b287e430298 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/plugins/nullability/example.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/plugins/nullability/example.smithy
@@ -3,15 +3,20 @@ $version: "1.0"
namespace smithy.example
structure Foo {
- nullableIntegerBoxedTarget: Integer,
- nullableIntegerBoxedNonPreludeTarget: MyInteger,
+ nullableIntegerBoxedTarget: Integer
+
+ nullableIntegerBoxedNonPreludeTarget: MyInteger
+
@required
- nullableIntegerInV1BoxedTargetRequired: Integer,
- nonNullableIntegerUnboxedTarget: MyPrimitiveInteger,
+ nullableIntegerInV1BoxedTargetRequired: Integer
+
+ nonNullableIntegerUnboxedTarget: MyPrimitiveInteger
+
@box
- nullableIntegerBoxedMember: MyPrimitiveInteger,
+ nullableIntegerBoxedMember: MyPrimitiveInteger
+
@required
- nonNullableIntegerUnboxedCustomTarget: MyPrimitiveInteger,
+ nonNullableIntegerUnboxedCustomTarget: MyPrimitiveInteger
}
@box
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.removeUnused.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.removeUnused.smithy
index 656bd35137f..9d1e10d8f4f 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.removeUnused.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.removeUnused.smithy
@@ -2,20 +2,16 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "A.B",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
- },
+ name: "EmitEachSelector"
+ id: "A.B"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
+ }
{
- name: "EmitEachSelector",
- id: "B.C.D",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "B.C.D"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.smithy
index 656bd35137f..9d1e10d8f4f 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/eventHierarchy.smithy
@@ -2,20 +2,16 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "A.B",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
- },
+ name: "EmitEachSelector"
+ id: "A.B"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
+ }
{
- name: "EmitEachSelector",
- id: "B.C.D",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "B.C.D"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterByNamespaceAllowList.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterByNamespaceAllowList.smithy
index 82890c44651..c2ba18c41e2 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterByNamespaceAllowList.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterByNamespaceAllowList.smithy
@@ -2,24 +2,22 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
}
]
metadata suppressions = [
{
- "id": "Test",
- "namespace": "smithy.example",
- "reason": "reason..."
- },
+ id: "Test"
+ namespace: "smithy.example"
+ reason: "reason..."
+ }
{
- "id": "Ipsum",
- "namespace": "*"
+ id: "Ipsum"
+ namespace: "*"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.2.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.2.smithy
index da2a2675dfc..e0ec2513f12 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.2.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.2.smithy
@@ -2,16 +2,15 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test2",
- severity: "WARNING",
- configuration: {
- selector: ":is([id|name^=Foo])"
- }
+ name: "EmitEachSelector"
+ id: "Test2"
+ severity: "WARNING"
+ configuration: { selector: ":is([id|name^=Foo])" }
}
]
namespace smithy.example
-@suppress(["Test"]) // unused
+@suppress(["Test"])
+// unused
structure Foo2 {}
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.smithy
index 5e35d1f8a38..4993aabadad 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithProjectionImports.smithy
@@ -2,27 +2,23 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
- },
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
+ }
{
- name: "EmitEachSelector",
- id: "Test2",
- severity: "WARNING",
- configuration: {
- selector: ":is([id|name^=Foo])"
- }
+ name: "EmitEachSelector"
+ id: "Test2"
+ severity: "WARNING"
+ configuration: { selector: ":is([id|name^=Foo])" }
}
]
metadata suppressions = [
{
- id: "Test",
- reason: "reason...",
+ id: "Test"
+ reason: "reason..."
namespace: "smithy.example"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.2.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.2.smithy
index da2a2675dfc..e0ec2513f12 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.2.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.2.smithy
@@ -2,16 +2,15 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test2",
- severity: "WARNING",
- configuration: {
- selector: ":is([id|name^=Foo])"
- }
+ name: "EmitEachSelector"
+ id: "Test2"
+ severity: "WARNING"
+ configuration: { selector: ":is([id|name^=Foo])" }
}
]
namespace smithy.example
-@suppress(["Test"]) // unused
+@suppress(["Test"])
+// unused
structure Foo2 {}
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.smithy
index 5e35d1f8a38..4993aabadad 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.filterWithTopLevelImports.smithy
@@ -2,27 +2,23 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
- },
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
+ }
{
- name: "EmitEachSelector",
- id: "Test2",
- severity: "WARNING",
- configuration: {
- selector: ":is([id|name^=Foo])"
- }
+ name: "EmitEachSelector"
+ id: "Test2"
+ severity: "WARNING"
+ configuration: { selector: ":is([id|name^=Foo])" }
}
]
metadata suppressions = [
{
- id: "Test",
- reason: "reason...",
+ id: "Test"
+ reason: "reason..."
namespace: "smithy.example"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.namespaceDenyList.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.namespaceDenyList.smithy
index 3973d3a0ac8..de8065bc991 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.namespaceDenyList.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.namespaceDenyList.smithy
@@ -2,24 +2,22 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
}
]
metadata suppressions = [
{
- id: "Test",
- reason: "reason...",
+ id: "Test"
+ reason: "reason..."
namespace: "smithy.example"
- },
+ }
{
- id: "Test",
- namespace: "smithy.example.nested",
+ id: "Test"
+ namespace: "smithy.example.nested"
reason: "reason..."
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeReasons.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeReasons.smithy
index e176a61ce3d..3e1e589872d 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeReasons.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeReasons.smithy
@@ -2,30 +2,28 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
}
]
metadata suppressions = [
{
- id: "Test",
+ id: "Test"
namespace: "smithy.example"
- },
+ }
{
- id: "Lorem",
+ id: "Lorem"
namespace: "smithy.foo"
- },
+ }
{
- id: "Test",
+ id: "Test"
namespace: "smithy.example.nested"
- },
+ }
{
- id: "Ipsum",
+ id: "Ipsum"
namespace: "*"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeUnused.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeUnused.smithy
index 0a1a8756c86..dc797c59ef7 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeUnused.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.removeUnused.smithy
@@ -2,19 +2,17 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
}
]
metadata suppressions = [
{
- id: "Test",
- reason: "reason...",
+ id: "Test"
+ reason: "reason..."
namespace: "smithy.example"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.smithy
index e014fd7ec8a..e66a5babe99 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.smithy
@@ -2,32 +2,30 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
}
]
metadata suppressions = [
{
- id: "Test",
- reason: "reason...",
+ id: "Test"
+ reason: "reason..."
namespace: "smithy.example"
- },
+ }
{
- id: "Lorem",
+ id: "Lorem"
namespace: "smithy.foo"
- },
+ }
{
- id: "Test",
- namespace: "smithy.example.nested",
+ id: "Test"
+ namespace: "smithy.example.nested"
reason: "reason..."
- },
+ }
{
- id: "Ipsum",
+ id: "Ipsum"
namespace: "*"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.unchanged.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.unchanged.smithy
index e014fd7ec8a..e66a5babe99 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.unchanged.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/namespaces.unchanged.smithy
@@ -2,32 +2,30 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":is([id=smithy.example#Foo], [id=smithy.example#Baz])" }
}
]
metadata suppressions = [
{
- id: "Test",
- reason: "reason...",
+ id: "Test"
+ reason: "reason..."
namespace: "smithy.example"
- },
+ }
{
- id: "Lorem",
+ id: "Lorem"
namespace: "smithy.foo"
- },
+ }
{
- id: "Test",
- namespace: "smithy.example.nested",
+ id: "Test"
+ namespace: "smithy.example.nested"
reason: "reason..."
- },
+ }
{
- id: "Ipsum",
+ id: "Ipsum"
namespace: "*"
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.removeUnused.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.removeUnused.smithy
index 71e51e2cf94..f8d56a537b9 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.removeUnused.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.removeUnused.smithy
@@ -2,12 +2,10 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.smithy
index 71e51e2cf94..f8d56a537b9 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/noSuppressions.smithy
@@ -2,12 +2,10 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdAllowList.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdAllowList.smithy
index 02d7bae45b0..757957a5337 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdAllowList.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdAllowList.smithy
@@ -2,12 +2,10 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
@@ -23,5 +21,5 @@ structure Foo {
}
structure Baz {
- baz:String
+ baz: String
}
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdDenyList.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdDenyList.smithy
index c3826f5bc37..3f4d2ef05d8 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdDenyList.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.eventIdDenyList.smithy
@@ -2,12 +2,10 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
@@ -25,5 +23,5 @@ structure Foo {
@suppress(["NeverUsed"])
structure Baz {
@suppress(["NeverUsed"])
- baz:String
+ baz: String
}
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.removeUnused.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.removeUnused.smithy
index 9faeb596f40..9c0cc06fdb8 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.removeUnused.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.removeUnused.smithy
@@ -2,12 +2,10 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.smithy
index fbee94551d6..7aedf1c6268 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/filtersuppressions/traits.smithy
@@ -2,12 +2,10 @@ $version: "2.0"
metadata validators = [
{
- name: "EmitEachSelector",
- id: "Test",
- severity: "WARNING",
- configuration: {
- selector: ":not([id='smithy.example#NoMatches'])"
- }
+ name: "EmitEachSelector"
+ id: "Test"
+ severity: "WARNING"
+ configuration: { selector: ":not([id='smithy.example#NoMatches'])" }
}
]
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/internal-shapes.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/internal-shapes.smithy
index ae5a8060ee6..84502b7229c 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/internal-shapes.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/internal-shapes.smithy
@@ -2,12 +2,12 @@ namespace smithy.example
@internal
structure InternalStructure {
- foo: String,
+ foo: String
}
structure ExternalStructure {
@internal
- internal: String,
+ internal: String
- external: String,
+ external: String
}
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/mixin-cycle-test.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/mixin-cycle-test.smithy
index c1c2b8a30dd..858796e28ef 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/mixin-cycle-test.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/mixin-cycle-test.smithy
@@ -2,8 +2,6 @@ $version: "2.0"
namespace smithy.example
-use smithy.example1#trait1
-
@trait
@tags(["filter"])
structure filteredTrait {}
@@ -18,7 +16,7 @@ structure resourceTrait {}
// RESOURCES
@filteredTrait
@unfilteredTrait
-resource ResourceWithMixin with [ ResourceMixin ] {}
+resource ResourceWithMixin with [ResourceMixin] {}
@mixin
@resourceTrait
@@ -27,11 +25,12 @@ resource ResourceMixin {}
// OPERATIONS
@filteredTrait
@unfilteredTrait
-operation OperationWithMixin with [ OperationMixin ] {
+operation OperationWithMixin with [OperationMixin] {
input := {
@required
@httpLabel
- myInputField: String,
+ myInputField: String
+
other: String
}
}
@@ -51,7 +50,7 @@ structure ThrottlingException {
}
@error("client")
-structure ValidationException{
+structure ValidationException {
@required
message: String
}
@@ -59,7 +58,7 @@ structure ValidationException{
// STRUCTURES
@filteredTrait
@unfilteredTrait
-structure StructureWithMixin with [ StructureMixin ] {
+structure StructureWithMixin with [StructureMixin] {
data: String
}
@@ -71,7 +70,7 @@ structure StructureMixin {
// UNIONS
@filteredTrait
@unfilteredTrait
-union UnionWithMixin with [ UnionMixin ] {
+union UnionWithMixin with [UnionMixin] {
data: String
}
@@ -83,7 +82,7 @@ union UnionMixin {
// MAPS
@filteredTrait
@unfilteredTrait
-map MapWithMixin with [MapMixin]{
+map MapWithMixin with [MapMixin] {
key: String
value: String
}
@@ -98,7 +97,7 @@ map MapMixin {
// LISTS
@filteredTrait
@unfilteredTrait
-list ListWithMixin with [ListMixin]{
+list ListWithMixin with [ListMixin] {
member: String
}
@@ -111,9 +110,8 @@ list ListMixin {
// STRINGS
@filteredTrait
@unfilteredTrait
-string StringWithMixin with [ StringMixin ]
+string StringWithMixin with [StringMixin]
@pattern("^$")
@mixin
string StringMixin
-
diff --git a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/transform-by-selector.smithy b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/transform-by-selector.smithy
index 1315e00d906..32459988b62 100644
--- a/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/transform-by-selector.smithy
+++ b/smithy-build/src/test/resources/software/amazon/smithy/build/transforms/transform-by-selector.smithy
@@ -3,8 +3,11 @@ $version: "2.0"
namespace smithy.example
service FooService {
- version: "2017-02-11"
- operations: [GetFoo PublishMessages ]
+ version: "2017-02-11"
+ operations: [
+ GetFoo
+ PublishMessages
+ ]
}
operation PublishMessages {
@@ -13,104 +16,109 @@ operation PublishMessages {
@input
structure PublishMessagesInput {
- room: String,
- messages: PublishEvents,
+ room: String
+ messages: PublishEvents
}
@streaming
union PublishEvents {
- message: Message,
- leave: LeaveEvent,
+ message: Message
+ leave: LeaveEvent
}
structure Message {
- message: String,
+ message: String
}
structure LeaveEvent {}
-
operation GetFoo {
- input: FooStructInput
- output: FooStructOutput
+ input: FooStructInput
+ output: FooStructOutput
}
enum FooEnum {
- @tags(["alpha"])
- FOO
- @tags(["beta"])
- BAR
- @tags(["gamma"])
- BAZ
+ @tags(["alpha"])
+ FOO
+
+ @tags(["beta"])
+ BAR
+
+ @tags(["gamma"])
+ BAZ
}
union FooUnion {
- fooString: String
- fooInteger: Integer
- fooEnum: FooEnum
+ fooString: String
+ fooInteger: Integer
+ fooEnum: FooEnum
}
@range(min: 10, max: 30)
integer FooInteger
structure FooStructInput {
- stringVal: String
- intVal: Integer
+ stringVal: String
+ intVal: Integer
}
structure FooStruct {
- stringVal: String
- intVal: Integer
- unionVal: FooUnion
+ stringVal: String
+ intVal: Integer
+ unionVal: FooUnion
}
structure FooStructOutput {
- stringVal: String
- intVal: FooInteger
- unionVal: FooUnion
+ stringVal: String
+ intVal: FooInteger
+ unionVal: FooUnion
}
service BarService {
- version: "2017-02-11"
- operations: [GetBar]
+ version: "2017-02-11"
+ operations: [
+ GetBar
+ ]
}
operation GetBar {
- input: BarStructInput
- output: BarStructOutput
+ input: BarStructInput
+ output: BarStructOutput
}
enum BarEnum {
- @tags(["alpha"])
- FOO
- @tags(["beta"])
- BAR
- @tags(["gamma"])
- BAZ
+ @tags(["alpha"])
+ FOO
+
+ @tags(["beta"])
+ BAR
+
+ @tags(["gamma"])
+ BAZ
}
union BarUnion {
- fooString: String
- fooInteger: Integer
- fooEnum: BarEnum
+ fooString: String
+ fooInteger: Integer
+ fooEnum: BarEnum
}
@range(min: 10, max: 30)
integer BarInteger
structure BarStructInput {
- stringVal: String
- intVal: Integer
+ stringVal: String
+ intVal: Integer
}
structure BarStruct {
- stringVal: String
- intVal: Integer
- unionVal: BarUnion
+ stringVal: String
+ intVal: Integer
+ unionVal: BarUnion
}
structure BarStructOutput {
- stringVal: String
- intVal: BarInteger
- unionVal: BarUnion
+ stringVal: String
+ intVal: BarInteger
+ unionVal: BarUnion
}
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directed-model.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directed-model.smithy
index 48d6c51fc39..cdb43da7b9c 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directed-model.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directed-model.smithy
@@ -4,22 +4,24 @@ namespace smithy.example
@paginated(inputToken: "nextToken", outputToken: "nextToken", items: "items", pageSize: "maxResults")
service Foo {
- resources: [TheFoo]
+ resources: [
+ TheFoo
+ ]
}
resource TheFoo {
- identifiers: {id: String},
+ identifiers: { id: String }
list: ListFoo
}
@readonly
@paginated
operation ListFoo {
- input:= {
+ input := {
maxResults: Integer
nextToken: String
}
- output:= with [Paginated] {
+ output := with [Paginated] {
status: Status
items: StringList
instruction: Instruction
@@ -32,8 +34,14 @@ list StringList {
}
@enum([
- {name: "GOOD", value: "GOOD"},
- {name: "BAD", value: "BAD"}
+ {
+ name: "GOOD"
+ value: "GOOD"
+ }
+ {
+ name: "BAD"
+ value: "BAD"
+ }
])
string Status
@@ -44,7 +52,7 @@ intEnum FaceCard {
}
union Instruction {
- continueIteration: Unit,
+ continueIteration: Unit
stopIteration: Unit
}
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directive-operations.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directive-operations.smithy
index 206b052268c..0b95187837a 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directive-operations.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/directive-operations.smithy
@@ -3,7 +3,10 @@ $version: "1.0"
namespace smithy.example
service Foo {
- operations: [GetA, DeleteA]
+ operations: [
+ GetA
+ DeleteA
+ ]
}
@readonly
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/needs-sorting.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/needs-sorting.smithy
index 354c08fa32c..efaf10ad916 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/needs-sorting.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/needs-sorting.smithy
@@ -3,11 +3,13 @@ $version: "1.0"
namespace smithy.example
service Foo {
- operations: [FooOperation]
+ operations: [
+ FooOperation
+ ]
}
operation FooOperation {
- input: FooOperationInput,
+ input: FooOperationInput
output: FooOperationOutput
}
@@ -38,11 +40,11 @@ structure A {
}
structure RecursiveA {
- a: A,
+ a: A
b: RecursiveB
}
structure RecursiveB {
- a: RecursiveA,
+ a: RecursiveA
b: B
}
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-eventstream.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-eventstream.smithy
index fee74a50644..f023a82728d 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-eventstream.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-eventstream.smithy
@@ -3,11 +3,13 @@ $version: "1.0"
namespace smithy.example
service Foo {
- operations: [GetAndSendMovements]
+ operations: [
+ GetAndSendMovements
+ ]
}
operation GetAndSendMovements {
- input: GetAndSendMovementsInput,
+ input: GetAndSendMovementsInput
output: GetAndSendMovementsOutput
}
@@ -23,7 +25,7 @@ structure GetAndSendMovementsOutput {
@streaming
union MovementEvents {
- stop: Movement,
+ stop: Movement
go: Movement
}
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-paginated.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-paginated.smithy
index a3309d76b70..9c49db6edfc 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-paginated.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/directed/service-paginated.smithy
@@ -4,25 +4,28 @@ namespace smithy.example
@paginated(inputToken: "nextToken", outputToken: "nextToken", items: "items", pageSize: "maxResults")
service Foo {
- operations: [ListA, ListB]
+ operations: [
+ ListA
+ ListB
+ ]
}
@readonly
@paginated
operation ListA {
- input: ListAInput,
+ input: ListAInput
output: ListAOutput
}
@input
structure ListAInput {
- maxResults: Integer,
+ maxResults: Integer
nextToken: String
}
@output
structure ListAOutput {
- nextToken: String,
+ nextToken: String
items: StringList
}
@@ -33,18 +36,18 @@ list StringList {
@readonly
@paginated
operation ListB {
- input: ListBInput,
+ input: ListBInput
output: ListBOutput
}
@input
structure ListBInput {
- maxResults: Integer,
+ maxResults: Integer
nextToken: String
}
@output
structure ListBOutput {
- nextToken: String,
+ nextToken: String
items: StringList
}
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-recursion.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-recursion.smithy
index 05a04e1d597..35c0f2d3935 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-recursion.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-recursion.smithy
@@ -3,8 +3,10 @@ $version: "2.0"
namespace smithy.example
service Example {
- version: "1.0.0",
- operations: [GetFoo]
+ version: "1.0.0"
+ operations: [
+ GetFoo
+ ]
}
operation GetFoo {
@@ -16,10 +18,10 @@ structure GetFooInput {
}
structure User {
- recursiveUser: User,
- recursiveList: UsersList,
- recursiveMap: UsersMap,
- notRecursive: NonRecursiveList,
+ recursiveUser: User
+ recursiveList: UsersList
+ recursiveMap: UsersMap
+ notRecursive: NonRecursiveList
}
list UsersList {
@@ -27,12 +29,12 @@ list UsersList {
}
map UsersMap {
- key: MyString,
+ key: MyString
value: User
}
list NonRecursiveList {
- member: NonRecursive,
+ member: NonRecursive
}
structure NonRecursive {
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-sort.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-sort.smithy
index 1b07cec632d..5e15060f8a3 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-sort.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/topological-sort.smithy
@@ -5,13 +5,13 @@ namespace smithy.example
string MyString
structure Foo {
- foo: MyString,
- bar: Bar,
+ foo: MyString
+ bar: Bar
}
structure Bar {
- baz: Integer,
- bam: BamList,
+ baz: Integer
+ bam: BamList
}
list BamList {
@@ -19,10 +19,10 @@ list BamList {
}
structure Recursive {
- a: RecursiveList,
- b: Recursive,
+ a: RecursiveList
+ b: Recursive
}
list RecursiveList {
- member: Recursive,
+ member: Recursive
}
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/service-with-shapeids.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/service-with-shapeids.smithy
index 8989afea83a..9425995caad 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/service-with-shapeids.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/service-with-shapeids.smithy
@@ -3,24 +3,29 @@ $version: "2.0"
namespace example.weather
/// Provides weather forecasts.
-@paginated(inputToken: "nextToken", outputToken: "nextToken",
- pageSize: "pageSize")
+@paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize")
service Weather {
- version: "2006-03-01",
- resources: [City],
- operations: [GetCurrentTime]
+ version: "2006-03-01"
+ resources: [
+ City
+ ]
+ operations: [
+ GetCurrentTime
+ ]
}
resource City {
- identifiers: { cityId: CityId },
- read: GetCity,
- list: ListCities,
- resources: [Forecast],
+ identifiers: { cityId: CityId }
+ read: GetCity
+ list: ListCities
+ resources: [
+ Forecast
+ ]
}
resource Forecast {
- identifiers: { cityId: CityId },
- read: GetForecast,
+ identifiers: { cityId: CityId }
+ read: GetForecast
}
// "pattern" is a trait.
@@ -29,9 +34,11 @@ string CityId
@readonly
operation GetCity {
- input: GetCityInput,
- output: GetCityOutput,
- errors: [NoSuchResource]
+ input: GetCityInput
+ output: GetCityOutput
+ errors: [
+ NoSuchResource
+ ]
}
structure GetCityInput {
@@ -45,19 +52,19 @@ structure GetCityOutput {
// "required" is used on output to indicate if the service
// will always provide a value for the member.
@required
- name: String,
+ name: String
@required
- coordinates: CityCoordinates,
+ coordinates: CityCoordinates
}
// This structure is nested within GetCityOutput.
structure CityCoordinates {
@required
- latitude: Float,
+ latitude: Float
@required
- longitude: Float,
+ longitude: Float
}
// "error" is a trait that is used to specialize
@@ -73,20 +80,20 @@ structure NoSuchResource {
@readonly
@paginated(items: "items")
operation ListCities {
- input: ListCitiesInput,
+ input: ListCitiesInput
output: ListCitiesOutput
}
structure ListCitiesInput {
- nextToken: String,
+ nextToken: String
pageSize: Integer
}
structure ListCitiesOutput {
- nextToken: String,
+ nextToken: String
@required
- items: CitySummaries,
+ items: CitySummaries
}
// CitySummaries is a list of CitySummary structures.
@@ -95,13 +102,17 @@ list CitySummaries {
}
// CitySummary contains a reference to a City.
-@references([{resource: City}])
+@references([
+ {
+ resource: City
+ }
+])
structure CitySummary {
@required
- cityId: CityId,
+ cityId: CityId
@required
- name: String,
+ name: String
}
@readonly
@@ -116,7 +127,7 @@ structure GetCurrentTimeOutput {
@readonly
operation GetForecast {
- input: GetForecastInput,
+ input: GetForecastInput
output: GetForecastOutput
}
@@ -124,7 +135,7 @@ operation GetForecast {
// a Forecast doesn't have its own.
structure GetForecastInput {
@required
- cityId: CityId,
+ cityId: CityId
}
structure GetForecastOutput {
diff --git a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/simple-service.smithy b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/simple-service.smithy
index b4c66a00292..065c33f594d 100644
--- a/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/simple-service.smithy
+++ b/smithy-codegen-core/src/test/resources/software/amazon/smithy/codegen/core/trace/simple-service.smithy
@@ -2,6 +2,4 @@ $version: "2.0"
namespace smithy.example
-service Example {
- version: "1.0.0"
-}
+service Example { version: "1.0.0" }
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/paginated-trait-tests.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/paginated-trait-tests.smithy
index b306354fab0..ba9dac076b6 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/paginated-trait-tests.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/paginated-trait-tests.smithy
@@ -4,26 +4,26 @@ namespace smithy.example
@paginated(inputToken: "token", outputToken: "token", items: "things", pageSize: "maxResults")
operation ListThings {
- input: ListThingsInput,
- output: ListThingsOutput,
+ input: ListThingsInput
+ output: ListThingsOutput
}
structure ListThingsInput {
- token: String,
- otherToken: String,
- maxResults: Integer,
- otherMaxResults: Integer,
+ token: String
+ otherToken: String
+ maxResults: Integer
+ otherMaxResults: Integer
}
structure ListThingsOutput {
- token: String,
- otherToken: String,
- things: ThingList,
- otherThings: ThingList,
+ token: String
+ otherToken: String
+ things: ThingList
+ otherThings: ThingList
}
list ThingList {
- member: Thing,
+ member: Thing
}
structure Thing {}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-added.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-added.smithy
index c6af2763886..abd6afd17a6 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-added.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-added.smithy
@@ -2,7 +2,13 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "add"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "add"
+ }
+ ]
+)
structure exampleTrait {}
string Example
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-any.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-any.smithy
index 72a29b4d9dc..8dc651d2972 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-any.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-any.smithy
@@ -2,7 +2,13 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "any"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
+)
structure exampleTrait {}
@exampleTrait
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-list-members.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-list-members.smithy
index 383d4a722e2..1fffdb74038 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-list-members.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-list-members.smithy
@@ -2,7 +2,14 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "update", path: "/member"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "update"
+ path: "/member"
+ }
+ ]
+)
list exampleTrait {
member: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-keys.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-keys.smithy
index cb941897cd2..d00ee995bee 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-keys.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-keys.smithy
@@ -2,9 +2,16 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "remove", path: "/key"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "remove"
+ path: "/key"
+ }
+ ]
+)
map exampleTrait {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-values.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-values.smithy
index a32aaa037fa..84ac4cc49df 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-values.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-map-values.smithy
@@ -2,9 +2,16 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "update", path: "/value"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "update"
+ path: "/value"
+ }
+ ]
+)
map exampleTrait {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-message.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-message.smithy
index aa921506b16..a57e9f9ab3c 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-message.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-message.smithy
@@ -2,7 +2,14 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "presence", message: "This is bad!"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "presence"
+ message: "This is bad!"
+ }
+ ]
+)
structure exampleTrait {}
@exampleTrait
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-presence.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-presence.smithy
index 4fbf3ecc5ca..78a8065f08c 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-presence.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-presence.smithy
@@ -2,7 +2,13 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "presence"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "presence"
+ }
+ ]
+)
structure exampleTrait {}
@exampleTrait
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-removed.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-removed.smithy
index cbca24d5fd0..6a4b02bace5 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-removed.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-removed.smithy
@@ -2,7 +2,13 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "remove"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "remove"
+ }
+ ]
+)
structure exampleTrait {}
@exampleTrait
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-severity.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-severity.smithy
index b4bfac8ab51..2a3ba3c539d 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-severity.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-severity.smithy
@@ -2,7 +2,14 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "presence", severity: "WARNING"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "presence"
+ severity: "WARNING"
+ }
+ ]
+)
structure exampleTrait {}
@exampleTrait
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-structure-members.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-structure-members.smithy
index 78f3aa862c1..29c007870a0 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-structure-members.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-structure-members.smithy
@@ -2,7 +2,14 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "presence", path: "/foo/bar"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "presence"
+ path: "/foo/bar"
+ }
+ ]
+)
structure exampleTrait {
foo: Nested
}
@@ -12,5 +19,7 @@ structure Nested {
bar: String
}
-@exampleTrait(foo: {bar: "hi"})
+@exampleTrait(
+ foo: { bar: "hi" }
+)
string Example
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-union-members.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-union-members.smithy
index 9437352cc91..c6111b9a182 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-union-members.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-breaking-change/trait-union-members.smithy
@@ -2,7 +2,14 @@ $version: "1.0"
namespace smithy.example
-@trait(breakingChanges: [{change: "update", path: "/foo"}])
+@trait(
+ breakingChanges: [
+ {
+ change: "update"
+ path: "/foo"
+ }
+ ]
+)
union exampleTrait {
foo: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-a.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-a.smithy
index d1673fc350b..052537e4f21 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-a.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-a.smithy
@@ -4,17 +4,17 @@ namespace smithy.example
@aTrait(
// a: "a",
- b: "a",
- c: "a",
- d: "a",
+ b: "a"
+ c: "a"
+ d: "a"
// e: "a",
- f: "a",
- g: "a",
- h: "a",
+ f: "a"
+ g: "a"
+ h: "a"
// i: "a",
- j: "a",
- k: "a",
- l: "a",
+ j: "a"
+ k: "a"
+ l: "a"
)
string Foo
@@ -22,41 +22,41 @@ string Foo
@tags(["diff.contents"])
structure aTrait {
@tags(["diff.error.add"])
- a: String,
+ a: String
@tags(["diff.error.remove"])
- b: String,
+ b: String
@tags(["diff.error.update"])
- c: String,
+ c: String
@tags(["diff.error.const"])
- d: String,
+ d: String
@tags(["diff.danger.add"])
- e: String,
+ e: String
@tags(["diff.danger.remove"])
- f: String,
+ f: String
@tags(["diff.danger.update"])
- g: String,
+ g: String
@tags(["diff.danger.const"])
- h: String,
+ h: String
@tags(["diff.warning.add"])
- i: String,
+ i: String
@tags(["diff.warning.remove"])
- j: String,
+ j: String
@tags(["diff.warning.update"])
- k: String,
+ k: String
@tags(["diff.warning.const"])
- l: String,
+ l: String
@tags(["diff.contents"])
- m: String,
+ m: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-b.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-b.smithy
index a73fe9dc701..3294938cf9f 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-b.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-all-severities-b.smithy
@@ -3,18 +3,27 @@ $version: "2.0"
namespace smithy.example
@aTrait(
- a: "a", // add
+ a: "a"
+ // add
// b: "a", // remove
- c: "c", // update
- d: "d", // const
- e: "a", // add
+ c: "c"
+ // update
+ d: "d"
+ // const
+ e: "a"
+ // add
// f: "a", // remove
- g: "h", // update
- h: "h", // const
- i: "a", // add
+ g: "h"
+ // update
+ h: "h"
+ // const
+ i: "a"
+ // add
// j: "a", // remove
- k: "k", // update
- l: "l", // const
+ k: "k"
+ // update
+ l: "l"
+ // const
)
string Foo
@@ -22,41 +31,41 @@ string Foo
@tags(["diff.contents"])
structure aTrait {
@tags(["diff.error.add"])
- a: String,
+ a: String
@tags(["diff.error.remove"])
- b: String,
+ b: String
@tags(["diff.error.update"])
- c: String,
+ c: String
@tags(["diff.error.const"])
- d: String,
+ d: String
@tags(["diff.danger.add"])
- e: String,
+ e: String
@tags(["diff.danger.remove"])
- f: String,
+ f: String
@tags(["diff.danger.update"])
- g: String,
+ g: String
@tags(["diff.danger.const"])
- h: String,
+ h: String
@tags(["diff.warning.add"])
- i: String,
+ i: String
@tags(["diff.warning.remove"])
- j: String,
+ j: String
@tags(["diff.warning.update"])
- k: String,
+ k: String
@tags(["diff.warning.const"])
- l: String,
+ l: String
@tags(["diff.contents"])
- m: String,
+ m: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-a.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-a.smithy
index 8abad5726b7..4003bb4677a 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-a.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-a.smithy
@@ -2,22 +2,25 @@ $version: "2.0"
namespace smithy.example
-@aTrait(foo: "hi", baz: {foo: "bye"})
+@aTrait(
+ foo: "hi"
+ baz: { foo: "bye" }
+)
string Foo
@trait
@tags(["diff.contents"])
structure aTrait {
@tags(["diff.error.remove"])
- foo: String,
+ foo: String
@tags(["diff.warning.const"])
- bar: String,
+ bar: String
baz: Nested
}
structure Nested {
@tags(["diff.error.const"])
- foo: String,
+ foo: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-b.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-b.smithy
index 10df0b6ba56..9968d1cbe56 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-b.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-b.smithy
@@ -2,22 +2,26 @@ $version: "2.0"
namespace smithy.example
-@aTrait(foo: "hola", bar: "no", baz: {foo: "adios"})
+@aTrait(
+ foo: "hola"
+ bar: "no"
+ baz: { foo: "adios" }
+)
string Foo
@trait
@tags(["diff.contents"])
structure aTrait {
@tags(["diff.error.remove"])
- foo: String,
+ foo: String
@tags(["diff.warning.const"])
- bar: String,
+ bar: String
baz: Nested
}
structure Nested {
@tags(["diff.error.const"])
- foo: String,
+ foo: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-a.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-a.smithy
index 23f3792eef9..11575daeece 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-a.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-a.smithy
@@ -2,19 +2,27 @@ $version: "2.0"
namespace smithy.example
-@aTrait(foo: ["a", "b", "c"])
+@aTrait(
+ foo: ["a", "b", "c"]
+)
string Foo
@aTrait
string Baz
-@aTrait(foo: ["1", "2", "3"])
+@aTrait(
+ foo: ["1", "2", "3"]
+)
string Bar
-@aTrait(foo: ["1", "2", "3"])
+@aTrait(
+ foo: ["1", "2", "3"]
+)
string Bam
-@aTrait(foo: ["1", "2", "3"])
+@aTrait(
+ foo: ["1", "2", "3"]
+)
string Qux
@trait
@@ -22,11 +30,11 @@ string Qux
structure aTrait {
// Can't remove this value, but you can add it or change it.
@tags(["diff.error.remove"])
- foo: ATraitList,
+ foo: ATraitList
}
list ATraitList {
// Cannot remove or update a list value at a given index.
@tags(["diff.danger.const"])
- member: String,
+ member: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-b.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-b.smithy
index e975ee025f8..52d3afcb82c 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-b.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-list-b.smithy
@@ -2,19 +2,32 @@ $version: "2.0"
namespace smithy.example
-@aTrait(foo: ["a", "B", "c"]) // Changed "b" -> "B"
+@aTrait(
+ foo: ["a", "B", "c"]
+)
+// Changed "b" -> "B"
string Foo
-@aTrait(foo: ["a", "b", "c"]) // added "foo"
+@aTrait(
+ foo: ["a", "b", "c"]
+)
+// added "foo"
string Baz
-@aTrait // Removed "foo"
+@aTrait
+// Removed "foo"
string Bar
-@aTrait(foo: ["1", "2"]) // removed "3"
+@aTrait(
+ foo: ["1", "2"]
+)
+// removed "3"
string Bam
-@aTrait(foo: ["1", "2", "3", "4"]) // added "4". This is ignored.
+@aTrait(
+ foo: ["1", "2", "3", "4"]
+)
+// added "4". This is ignored.
string Qux
@trait
@@ -22,11 +35,11 @@ string Qux
structure aTrait {
// Can't remove this value, but you can add it or change it.
@tags(["diff.error.remove"])
- foo: ATraitList,
+ foo: ATraitList
}
list ATraitList {
// Cannot remove or update a list value at a given index.
@tags(["diff.danger.const"])
- member: String,
+ member: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-a.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-a.smithy
index d4cb7c10d3a..b0959c9f55d 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-a.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-a.smithy
@@ -2,19 +2,27 @@ $version: "2.0"
namespace smithy.example
-@aTrait(foo: {baz: "a", bam: "b", boo: "c"})
+@aTrait(
+ foo: { baz: "a", bam: "b", boo: "c" }
+)
string Foo
@aTrait
string Baz
-@aTrait(foo: {baz: "1", bam: "2", boo: "3"})
+@aTrait(
+ foo: { baz: "1", bam: "2", boo: "3" }
+)
string Bar
-@aTrait(foo: {baz: "1", bam: "2", boo: "3"})
+@aTrait(
+ foo: { baz: "1", bam: "2", boo: "3" }
+)
string Bam
-@aTrait(foo: {baz: "1", bam: "2", boo: "3"})
+@aTrait(
+ foo: { baz: "1", bam: "2", boo: "3" }
+)
string Qux
@trait
@@ -22,13 +30,13 @@ string Qux
structure aTrait {
// Can't remove this value, but you can add it or change it.
@tags(["diff.error.remove"])
- foo: ATraitMap,
+ foo: ATraitMap
}
map ATraitMap {
- key: String,
+ key: String
// Cannot remove or update a list value at a given index.
@tags(["diff.warning.const"])
- value: String,
+ value: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-b.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-b.smithy
index 5eb9712a6c7..74ced2effbb 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-b.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-map-b.smithy
@@ -2,19 +2,32 @@ $version: "2.0"
namespace smithy.example
-@aTrait(foo: {baz: "a", bam: "B", boo: "c"}) // changed B
+@aTrait(
+ foo: { baz: "a", bam: "B", boo: "c" }
+)
+// changed B
string Foo
-@aTrait(foo: {baz: "a", bam: "B", boo: "c"}) // Added "foo"
+@aTrait(
+ foo: { baz: "a", bam: "B", boo: "c" }
+)
+// Added "foo"
string Baz
-@aTrait(foo: {baz: "1", bam: "2"}) // removed boo
+@aTrait(
+ foo: { baz: "1", bam: "2" }
+)
+// removed boo
string Bar
-@aTrait(foo: {baz: "1", bam: "2", boo: "3", qux: "4"}) // added qux
+@aTrait(
+ foo: { baz: "1", bam: "2", boo: "3", qux: "4" }
+)
+// added qux
string Bam
-@aTrait // removed foo
+@aTrait
+// removed foo
string Qux
@trait
@@ -22,13 +35,13 @@ string Qux
structure aTrait {
// Can't remove this value, but you can add it or change it.
@tags(["diff.error.remove"])
- foo: ATraitMap,
+ foo: ATraitMap
}
map ATraitMap {
- key: String,
+ key: String
// Cannot remove or update a list value at a given index.
@tags(["diff.warning.const"])
- value: String,
+ value: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-a.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-a.smithy
index 53b549528e7..f917c614637 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-a.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-a.smithy
@@ -2,19 +2,27 @@ $version: "1.0"
namespace smithy.example
-@aTrait(foo: ["a", "b", "c"])
+@aTrait(
+ foo: ["a", "b", "c"]
+)
string Foo
@aTrait
string Baz
-@aTrait(foo: ["1", "2", "3"])
+@aTrait(
+ foo: ["1", "2", "3"]
+)
string Bar
-@aTrait(foo: ["1", "2", "3"])
+@aTrait(
+ foo: ["1", "2", "3"]
+)
string Bam
-@aTrait(foo: ["1", "2", "3"])
+@aTrait(
+ foo: ["1", "2", "3"]
+)
string Qux
@trait
@@ -22,11 +30,11 @@ string Qux
structure aTrait {
// Can't remove this value, but you can add it or change it.
@tags(["diff.error.remove"])
- foo: ATraitSet,
+ foo: ATraitSet
}
set ATraitSet {
// Cannot remove or update a set value at a given index.
@tags(["diff.danger.const"])
- member: String,
+ member: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-b.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-b.smithy
index 1173d78437f..a80ab11be65 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-b.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-set-b.smithy
@@ -2,19 +2,32 @@ $version: "1.0"
namespace smithy.example
-@aTrait(foo: ["a", "B", "c"]) // Changed "b" -> "B"
+@aTrait(
+ foo: ["a", "B", "c"]
+)
+// Changed "b" -> "B"
string Foo
-@aTrait(foo: ["a", "b", "c"]) // added "foo"
+@aTrait(
+ foo: ["a", "b", "c"]
+)
+// added "foo"
string Baz
-@aTrait // Removed "foo"
+@aTrait
+// Removed "foo"
string Bar
-@aTrait(foo: ["1", "2"]) // removed "3"
+@aTrait(
+ foo: ["1", "2"]
+)
+// removed "3"
string Bam
-@aTrait(foo: ["1", "2", "3", "4"]) // added "4". This is ignored.
+@aTrait(
+ foo: ["1", "2", "3", "4"]
+)
+// added "4". This is ignored.
string Qux
@trait
@@ -22,11 +35,11 @@ string Qux
structure aTrait {
// Can't remove this value, but you can add it or change it.
@tags(["diff.error.remove"])
- foo: ATraitSet,
+ foo: ATraitSet
}
set ATraitSet {
// Cannot remove or update a set value at a given index.
@tags(["diff.danger.const"])
- member: String,
+ member: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-a.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-a.smithy
index 8ad847f5d7e..b92be2219ef 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-a.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-a.smithy
@@ -2,13 +2,19 @@ $version: "2.0"
namespace smithy.example
-@aTrait(baz: {foo: "a"})
+@aTrait(
+ baz: { foo: "a" }
+)
string Foo
-@aTrait(baz: {baz: "a"})
+@aTrait(
+ baz: { baz: "a" }
+)
string Boo
-@aTrait(baz: {bar: "a"})
+@aTrait(
+ baz: { bar: "a" }
+)
string Moo
@trait
@@ -19,11 +25,11 @@ structure aTrait {
union NestedUnion {
@tags(["diff.error.update"])
- foo: String,
+ foo: String
@tags(["diff.error.update"])
- baz: String,
+ baz: String
// changing this value, if set, is fine.
- bar: String,
+ bar: String
}
diff --git a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-b.smithy b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-b.smithy
index a96657bd448..157bd5103e0 100644
--- a/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-b.smithy
+++ b/smithy-diff/src/test/resources/software/amazon/smithy/diff/evaluators/trait-modified-contents-union-b.smithy
@@ -2,13 +2,19 @@ $version: "2.0"
namespace smithy.example
-@aTrait(baz: {foo: "b"})
+@aTrait(
+ baz: { foo: "b" }
+)
string Foo
-@aTrait(baz: {baz: "b"})
+@aTrait(
+ baz: { baz: "b" }
+)
string Boo
-@aTrait(baz: {bar: "b"})
+@aTrait(
+ baz: { bar: "b" }
+)
string Moo
@trait
@@ -19,11 +25,11 @@ structure aTrait {
union NestedUnion {
@tags(["diff.error.update"])
- foo: String,
+ foo: String
@tags(["diff.error.update"])
- baz: String,
+ baz: String
// changing this value, if set, is fine.
- bar: String,
+ bar: String
}
diff --git a/smithy-jsonschema/src/test/resources/software/amazon/smithy/jsonschema/default-values.smithy b/smithy-jsonschema/src/test/resources/software/amazon/smithy/jsonschema/default-values.smithy
index 31607ba6fb7..0cbb619c4ef 100644
--- a/smithy-jsonschema/src/test/resources/software/amazon/smithy/jsonschema/default-values.smithy
+++ b/smithy-jsonschema/src/test/resources/software/amazon/smithy/jsonschema/default-values.smithy
@@ -5,7 +5,7 @@ namespace smithy.example
structure Foo {
bar: Integer = 0
baz: String = ""
- bam: StringList = [],
+ bam: StringList = []
bat: TestEnum = "FOO"
}
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/camel-case-validator-default-upper-test.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/camel-case-validator-default-upper-test.smithy
index eb233c3a918..cdbb950f8df 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/camel-case-validator-default-upper-test.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/camel-case-validator-default-upper-test.smithy
@@ -1,27 +1,33 @@
$version: "2.0"
metadata validators = [
- {name: "CamelCase",
- id: "DefaultCamelCase"}
+ {
+ name: "CamelCase"
+ id: "DefaultCamelCase"
+ }
]
namespace smithy.example
service UpperService {
- version: "2020-09-21",
- operations: [UpperOperation],
+ version: "2020-09-21"
+ operations: [
+ UpperOperation
+ ]
}
operation UpperOperation {
- input: UpperOperationRequest,
- output: UpperOperationResponse,
- errors: [],
+ input: UpperOperationRequest
+ output: UpperOperationResponse
+ errors: [
+
+ ]
}
structure UpperOperationRequest {
- UpperCamel: MyString,
- SecondUpperCamel: MyString,
- ThirdUpperCamel: MyString,
+ UpperCamel: MyString
+ SecondUpperCamel: MyString
+ ThirdUpperCamel: MyString
FourthUpperCamel: MyStructure
}
@@ -30,20 +36,24 @@ structure UpperOperationResponse {
}
service LowerService {
- version: "2020-09-21",
- operations: [LowerOperation],
+ version: "2020-09-21"
+ operations: [
+ LowerOperation
+ ]
}
operation LowerOperation {
- input: LowerOperationRequest,
- output: LowerOperationResponse,
- errors: [],
+ input: LowerOperationRequest
+ output: LowerOperationResponse
+ errors: [
+
+ ]
}
structure LowerOperationRequest {
- lowerCamel: MyString,
- secondLowerCamel: MyString,
- thirdLowerCamel: MyString,
+ lowerCamel: MyString
+ secondLowerCamel: MyString
+ thirdLowerCamel: MyString
fourthLowerCamel: MyStructure
}
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.smithy
index 312ed958338..da6387e1386 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.smithy
@@ -1,13 +1,15 @@
$version: "2.0"
metadata validators = [
- {name: "InputOutputStructureReuse"}
+ {
+ name: "InputOutputStructureReuse"
+ }
]
namespace smithy.example
operation GetFoo {
- input: GetFooInput,
+ input: GetFooInput
output: GetFooOutput
}
@@ -16,7 +18,7 @@ structure GetFooInput {}
structure GetFooOutput {}
operation GetBaz {
- input: GetBazInput,
+ input: GetBazInput
output: GetBazOutput
}
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredOrDefault.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredOrDefault.smithy
index e0b748c6647..d9d7f68ac83 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredOrDefault.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredOrDefault.smithy
@@ -2,10 +2,8 @@ $version: "2"
metadata validators = [
{
- name: "MissingClientOptionalTrait",
- configuration: {
- "onRequiredOrDefault": true
- }
+ name: "MissingClientOptionalTrait"
+ configuration: { onRequiredOrDefault: true }
}
]
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredStructureOrUnion.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredStructureOrUnion.smithy
index 02283c66a0c..5d4cba06b57 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredStructureOrUnion.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-client-optional-onRequiredStructureOrUnion.smithy
@@ -2,23 +2,21 @@ $version: "2"
metadata validators = [
{
- name: "MissingClientOptionalTrait",
- configuration: {
- "onRequiredStructureOrUnion": true
- }
+ name: "MissingClientOptionalTrait"
+ configuration: { onRequiredStructureOrUnion: true }
}
]
namespace smithy.example
structure Foo {
- bar: String = "",
+ bar: String = ""
@required
- baz: String,
+ baz: String
@required
- bam: Bam,
+ bam: Bam
@required
boo: Boo
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-custom.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-custom.smithy
index bff9ef30cc5..413a1b17f0b 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-custom.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-custom.smithy
@@ -1,68 +1,72 @@
$version: "2.0"
-metadata validators = [{
- name: "MissingSensitiveTrait",
- id: "DefaultMissingSensitiveTrait",
- configuration: {
- excludeDefaults: true,
- terms: [
- "bank",
- "foo",
- "string",
- "second member",
- "bill inginfo",
- "da ta"
- ]
+metadata validators = [
+ {
+ name: "MissingSensitiveTrait"
+ id: "DefaultMissingSensitiveTrait"
+ configuration: {
+ excludeDefaults: true
+ terms: ["bank", "foo", "string", "second member", "bill inginfo", "da ta"]
+ }
}
-}]
+]
namespace smithy.example
service FooService {
- version: "2020-09-21",
- operations: [FooOperation],
+ version: "2020-09-21"
+ operations: [
+ FooOperation
+ ]
}
operation FooOperation {
- input: FooOperationRequest,
- output: FooOperationResponse,
- errors: [],
+ input: FooOperationRequest
+ output: FooOperationResponse
+ errors: [
+
+ ]
}
// should get flagged
structure FooOperationRequest {
- firstMember: CabAnkle,
+ firstMember: CabAnkle
+
// should get flagged
- secondMember: BillingInfo,
+ secondMember: BillingInfo
+
thirdMember: SafeBillingInfo
}
// should get flagged
-structure FooOperationResponse {
-}
+structure FooOperationResponse {}
structure CabAnkle {
myMember: MyString
}
-//should not get flagged
+// should not get flagged
structure BillingInfo {
// should get flagged
- bank: MyString,
- data: MyString,
+ bank: MyString
+
+ data: MyString
+
// should not get flagged
- safeBank: MySensitiveString,
- firstName: FirstName,
+ safeBank: MySensitiveString
+
+ firstName: FirstName
+
// should not get flagged
lastName: LastName
}
@sensitive
structure SafeBillingInfo {
- bank: MyString,
- data: MyString,
- safeBank: MySensitiveString,
- firstName: MyString,
+ bank: MyString
+ data: MyString
+ safeBank: MySensitiveString
+ firstName: MyString
lastName: MySensitiveString
}
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-defaults.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-defaults.smithy
index 89d6ae119ec..89414b337da 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-defaults.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-defaults.smithy
@@ -1,34 +1,40 @@
$version: "2.0"
metadata validators = [
- {name: "MissingSensitiveTrait",
- id: "DefaultMissingSensitiveTrait"}
+ {
+ name: "MissingSensitiveTrait"
+ id: "DefaultMissingSensitiveTrait"
+ }
]
namespace smithy.example
service FooService {
- version: "2020-09-21",
- operations: [FooOperation],
+ version: "2020-09-21"
+ operations: [
+ FooOperation
+ ]
}
operation FooOperation {
- input: FooOperationRequest,
- output: FooOperationResponse,
- errors: [],
+ input: FooOperationRequest
+ output: FooOperationResponse
+ errors: [
+
+ ]
}
structure FooOperationRequest {
- firstMember: CabAnkle,
- secondMember: BillingAddress,
+ firstMember: CabAnkle
+ secondMember: BillingAddress
thirdMember: SafeBillingAddress
}
-structure FooOperationResponse {
-}
+structure FooOperationResponse {}
structure CabAnkle {
- myMember: MyString,
+ myMember: MyString
+
// should get flagged
myBirthday: MyString
}
@@ -36,21 +42,26 @@ structure CabAnkle {
// should get flagged
structure BillingAddress {
// should get flagged
- bank: MyString,
- data: MyString,
- safeBank: MySensitiveString,
+ bank: MyString
+
+ data: MyString
+
+ safeBank: MySensitiveString
+
// should get flagged
- firstName: FirstName,
- lastName: LastName,
+ firstName: FirstName
+
+ lastName: LastName
+
someEnum: MyEnum
}
@sensitive
structure SafeBillingAddress {
- bank: MyString,
- data: MyString,
- safeBank: MySensitiveString,
- firstName: MyString,
+ bank: MyString
+ data: MyString
+ safeBank: MySensitiveString
+ firstName: MyString
lastName: MySensitiveString
}
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-invalid-config.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-invalid-config.smithy
index e0764ce10de..2476ead5096 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-invalid-config.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-sensitive-trait-invalid-config.smithy
@@ -1,12 +1,14 @@
$version: "2.0"
-metadata validators = [{
- name: "MissingSensitiveTrait",
- id: "DefaultMissingSensitiveTrait",
- configuration: {
- excludeDefaults: true,
- terms: []
+metadata validators = [
+ {
+ name: "MissingSensitiveTrait"
+ id: "DefaultMissingSensitiveTrait"
+ configuration: {
+ excludeDefaults: true
+ terms: []
+ }
}
-}]
+]
namespace smithy.example
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/repeated-shape-name-exact.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/repeated-shape-name-exact.smithy
index eb19fd07b70..0ec7aac1b6f 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/repeated-shape-name-exact.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/repeated-shape-name-exact.smithy
@@ -1,24 +1,24 @@
$version: "2.0"
-metadata validators = [{
- name: "RepeatedShapeName",
- configuration: {
- exactMatch: true
+metadata validators = [
+ {
+ name: "RepeatedShapeName"
+ configuration: { exactMatch: true }
}
-}]
+]
namespace smithy.example
structure RepeatingStructure {
- repeatingStructure: String,
+ repeatingStructure: String
// This is fine because it's not an exact match
- repeatingStructureMember: String,
+ repeatingStructureMember: String
}
union RepeatingUnion {
- repeatingUnion: String,
+ repeatingUnion: String
// This is fine because it's not an exact match
- repeatingUnionMember: String,
+ repeatingUnionMember: String
}
diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/validator-configuration-test.smithy b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/validator-configuration-test.smithy
index 18e87a1ffc5..8c28a9d72e2 100644
--- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/validator-configuration-test.smithy
+++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/validator-configuration-test.smithy
@@ -2,16 +2,16 @@ $version: "2.0"
metadata validators = [
{
- name: "InputOutputStructureReuse",
+ name: "InputOutputStructureReuse"
id: "CustomInputOutputStructureReuse"
- severity: "DANGER",
+ severity: "DANGER"
}
]
namespace smithy.example
operation GetFoo {
- input: GetFooInput,
+ input: GetFooInput
output: GetFooOutput
}
@@ -20,7 +20,7 @@ structure GetFooInput {}
structure GetFooOutput {}
operation GetBaz {
- input: GetBazInput,
+ input: GetBazInput
output: GetBazOutput
}
diff --git a/smithy-mqtt-traits/src/main/resources/META-INF/smithy/smithy.api.mqtt.smithy b/smithy-mqtt-traits/src/main/resources/META-INF/smithy/smithy.api.mqtt.smithy
index ffbad73104a..95148771e55 100644
--- a/smithy-mqtt-traits/src/main/resources/META-INF/smithy/smithy.api.mqtt.smithy
+++ b/smithy-mqtt-traits/src/main/resources/META-INF/smithy/smithy.api.mqtt.smithy
@@ -7,16 +7,20 @@ namespace smithy.mqtt
structure mqttJson {}
@trait(
- selector: "operation :not(-[output]-> * > member)",
- conflicts: ["smithy.mqtt#subscribe"],
- breakingChanges: [{change: "any"}]
+ selector: "operation :not(-[output]-> * > member)"
+ conflicts: ["smithy.mqtt#subscribe"]
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
@traitValidators(
"MqttPublishInput.NoEventStreams": {
selector: "-[input]-> structure > member :test(> union [trait|streaming])"
message: "The input of `smithy.mqtt#publish` operations cannot contain event streams"
}
- "MqttUnsupportedErrors": {
+ MqttUnsupportedErrors: {
selector: ":test(-[error]->)"
message: "Operations marked with the `smithy.mqtt#publish` trait do not support errors"
severity: "DANGER"
@@ -29,16 +33,19 @@ string publish
@trait(
selector: "operation :test(-[output]->)"
conflicts: ["smithy.mqtt#publish"]
- breakingChanges: [{change: "any"}]
+ breakingChanges: [
+ {
+ change: "any"
+ }
+ ]
)
@traitValidators(
"MqttSubscribeInput.MissingTopicLabel": {
selector: "-[input]-> structure > member :not([trait|smithy.mqtt#topicLabel])"
message: """
- All input members of an operation marked with the `smithy.mqtt#subscribe` trait must be \
- marked with the `smithy.mqtt#topicLabel` trait."""
+ All input members of an operation marked with the `smithy.mqtt#subscribe` trait must be marked with the `smithy.mqtt#topicLabel` trait."""
}
- "MqttUnsupportedErrors": {
+ MqttUnsupportedErrors: {
selector: ":test(-[error]->)"
message: "Operations marked with the `smithy.mqtt#subscribe` trait do not support errors"
severity: "DANGER"
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/dropped-mqtt-headers.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/dropped-mqtt-headers.smithy
index ddba4be256f..d59a4e6295b 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/dropped-mqtt-headers.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/dropped-mqtt-headers.smithy
@@ -6,13 +6,13 @@ namespace smithy.example
@smithy.mqtt#subscribe("events")
operation Foo {
- input: Unit,
+ input: Unit
output: FooOutput
}
@output
structure FooOutput {
- messages: EventStream
+ messages: EventStream
}
@streaming
@@ -21,11 +21,15 @@ union EventStream {
}
structure Event {
- @eventHeader
- foo: smithy.api#String, // Expected error
+ @eventHeader
+ foo: smithy.api#String
- @eventHeader
- bar: smithy.api#String, // Expected error
+ // Expected error
+ @eventHeader
+ bar: smithy.api#String
- baz: smithy.api#String, // No error
+ // Expected error
+ baz: smithy.api#String
+
+ // No error
}
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/job-service.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/job-service.smithy
index 7e83cf576fe..8791c556aea 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/job-service.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/job-service.smithy
@@ -6,33 +6,28 @@ use smithy.mqtt#mqttJson
@mqttJson
service IotJobs {
- version: "2018-08-14",
- operations: [
- PublishGetPendingJobExecutions,
- SubscribeToGetPendingJobExecutionsAccepted,
- SubscribeToGetPendingJobExecutionsRejected,
-
- PublishStartNextPendingJobExecution,
- SubscribeToStartNextPendingJobExecutionAccepted,
- SubscribeToStartNextPendingJobExecutionRejected,
-
- PublishDescribeJobExecution,
- SubscribeToDescribeJobExecutionAccepted,
- SubscribeToDescribeJobExecutionRejected,
-
- PublishUpdateJobExecution,
- SubscribeToUpdateJobExecutionAccepted,
- SubscribeToUpdateJobExecutionRejected,
-
- SubscribeToJobExecutionsChangedEvents,
- SubscribeToNextJobExecutionChangedEvents,
- ],
+ version: "2018-08-14"
+ operations: [
+ PublishGetPendingJobExecutions
+ SubscribeToGetPendingJobExecutionsAccepted
+ SubscribeToGetPendingJobExecutionsRejected
+ PublishStartNextPendingJobExecution
+ SubscribeToStartNextPendingJobExecutionAccepted
+ SubscribeToStartNextPendingJobExecutionRejected
+ PublishDescribeJobExecution
+ SubscribeToDescribeJobExecutionAccepted
+ SubscribeToDescribeJobExecutionRejected
+ PublishUpdateJobExecution
+ SubscribeToUpdateJobExecutionAccepted
+ SubscribeToUpdateJobExecutionRejected
+ SubscribeToJobExecutionsChangedEvents
+ SubscribeToNextJobExecutionChangedEvents
+ ]
}
// ------ Service-wide error -------
-
structure RejectedResponse {
- messages: RejectedErrorStream
+ messages: RejectedErrorStream
}
@streaming
@@ -41,14 +36,16 @@ union RejectedErrorStream {
}
structure RejectedError {
- clientToken: smithy.api#String,
+ clientToken: smithy.api#String
+
+ @required
+ code: RejectedErrorCode
+
+ message: smithy.api#String
- @required
- code: RejectedErrorCode,
+ timestamp: smithy.api#Timestamp
- message: smithy.api#String,
- timestamp: smithy.api#Timestamp,
- executionState: JobExecutionState,
+ executionState: JobExecutionState
}
enum RejectedErrorCode {
@@ -81,7 +78,6 @@ enum RejectedErrorCode {
}
// ------ GetPendingJobExecutions -------
-
@smithy.mqtt#publish("$aws/things/{thingName}/jobs/get")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions")
operation PublishGetPendingJobExecutions {
@@ -91,33 +87,33 @@ operation PublishGetPendingJobExecutions {
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/get/accepted")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions")
operation SubscribeToGetPendingJobExecutionsAccepted {
- input: GetPendingJobExecutionsSubscriptionRequest,
+ input: GetPendingJobExecutionsSubscriptionRequest
output: GetPendingJobExecutionsSubscriptionResponse
}
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/get/rejected")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions")
operation SubscribeToGetPendingJobExecutionsRejected {
- input: GetPendingJobExecutionsSubscriptionRequest,
- output: RejectedResponse,
+ input: GetPendingJobExecutionsSubscriptionRequest
+ output: RejectedResponse
}
structure GetPendingJobExecutionsRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
- clientToken: smithy.api#String,
+ clientToken: smithy.api#String
}
structure GetPendingJobExecutionsSubscriptionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
}
structure GetPendingJobExecutionsSubscriptionResponse {
- messages: GetPendingJobExecutionsResponseStream,
+ messages: GetPendingJobExecutionsResponseStream
}
@streaming
@@ -126,29 +122,26 @@ union GetPendingJobExecutionsResponseStream {
}
structure GetPendingJobExecutionsResponse {
- inProgressJobs: JobExecutionSummaryList,
- queuedJobs: JobExecutionSummaryList,
- timestamp: smithy.api#Timestamp,
-
- clientToken: smithy.api#String,
+ inProgressJobs: JobExecutionSummaryList
+ queuedJobs: JobExecutionSummaryList
+ timestamp: smithy.api#Timestamp
+ clientToken: smithy.api#String
}
list JobExecutionSummaryList {
- member: JobExecutionSummary
+ member: JobExecutionSummary
}
structure JobExecutionSummary {
- jobId: smithy.api#String,
- executionNumber: smithy.api#Long,
- versionNumber: smithy.api#Integer,
- lastUpdatedAt: smithy.api#Timestamp,
- queuedAt: smithy.api#Timestamp,
- startedAt: smithy.api#Timestamp,
+ jobId: smithy.api#String
+ executionNumber: smithy.api#Long
+ versionNumber: smithy.api#Integer
+ lastUpdatedAt: smithy.api#Timestamp
+ queuedAt: smithy.api#Timestamp
+ startedAt: smithy.api#Timestamp
}
-
// ------- StartNextPendingJobExecution ----------
-
@smithy.mqtt#publish("$aws/things/{thingName}/jobs/start-next")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution")
operation PublishStartNextPendingJobExecution {
@@ -158,41 +151,42 @@ operation PublishStartNextPendingJobExecution {
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/start-next/accepted")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution")
operation SubscribeToStartNextPendingJobExecutionAccepted {
- input: StartNextPendingJobExecutionSubscriptionRequest,
+ input: StartNextPendingJobExecutionSubscriptionRequest
output: StartNextPendingJobExecutionSubscriptionResponse
}
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/start-next/rejected")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution")
operation SubscribeToStartNextPendingJobExecutionRejected {
- input: StartNextPendingJobExecutionSubscriptionRequest,
+ input: StartNextPendingJobExecutionSubscriptionRequest
output: RejectedResponse
}
structure StartNextPendingJobExecutionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
+
+ clientToken: smithy.api#String
- clientToken: smithy.api#String,
+ stepTimeoutInMinutes: smithy.api#Long
- stepTimeoutInMinutes: smithy.api#Long,
- statusDetails: StatusDetails,
+ statusDetails: StatusDetails
}
map StatusDetails {
- key: smithy.api#String,
- value: smithy.api#String
+ key: smithy.api#String
+ value: smithy.api#String
}
structure StartNextPendingJobExecutionSubscriptionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
}
structure StartNextPendingJobExecutionSubscriptionResponse {
- messages: StartNextJobExecutionResponseStream
+ messages: StartNextJobExecutionResponseStream
}
@streaming
@@ -201,23 +195,22 @@ union StartNextJobExecutionResponseStream {
}
structure StartNextJobExecutionResponse {
- clientToken: smithy.api#String,
-
- execution: JobExecutionData,
- timestamp: smithy.api#Timestamp,
+ clientToken: smithy.api#String
+ execution: JobExecutionData
+ timestamp: smithy.api#Timestamp
}
structure JobExecutionData {
- jobId: smithy.api#String,
- thingName: smithy.api#String,
- jobDocument: JobDocument,
- status: JobStatus,
- statusDetails: StatusDetails,
- queuedAt: smithy.api#Timestamp,
- startedAt: smithy.api#Timestamp,
- lastUpdatedAt: smithy.api#Timestamp,
- versionNumber: smithy.api#Integer,
- executionNumber: smithy.api#Long,
+ jobId: smithy.api#String
+ thingName: smithy.api#String
+ jobDocument: JobDocument
+ status: JobStatus
+ statusDetails: StatusDetails
+ queuedAt: smithy.api#Timestamp
+ startedAt: smithy.api#Timestamp
+ lastUpdatedAt: smithy.api#Timestamp
+ versionNumber: smithy.api#Integer
+ executionNumber: smithy.api#Long
}
enum JobStatus {
@@ -231,9 +224,7 @@ enum JobStatus {
REMOVED
}
-
// ------- DescribeJobExecution ----------
-
@smithy.mqtt#publish("$aws/things/{thingName}/jobs/{jobId}/get")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution")
operation PublishDescribeJobExecution {
@@ -243,44 +234,45 @@ operation PublishDescribeJobExecution {
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/{jobId}/get/accepted")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution")
operation SubscribeToDescribeJobExecutionAccepted {
- input: DescribeJobExecutionSubscriptionRequest,
+ input: DescribeJobExecutionSubscriptionRequest
output: DescribeJobExecutionSubscriptionResponse
}
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/{jobId}/get/rejected")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution")
operation SubscribeToDescribeJobExecutionRejected {
- input: DescribeJobExecutionSubscriptionRequest,
+ input: DescribeJobExecutionSubscriptionRequest
output: RejectedResponse
}
structure DescribeJobExecutionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
- @required
- @smithy.mqtt#topicLabel
- jobId: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ jobId: smithy.api#String
- clientToken: smithy.api#String,
+ clientToken: smithy.api#String
- executionNumber: smithy.api#Long,
- includeJobDocument: smithy.api#Boolean,
+ executionNumber: smithy.api#Long
+
+ includeJobDocument: smithy.api#Boolean
}
structure DescribeJobExecutionSubscriptionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
- @required
- @smithy.mqtt#topicLabel
- jobId: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ jobId: smithy.api#String
}
structure DescribeJobExecutionSubscriptionResponse {
- messages: DescribeJobExecutionResponseStream
+ messages: DescribeJobExecutionResponseStream
}
@streaming
@@ -289,18 +281,16 @@ union DescribeJobExecutionResponseStream {
}
structure DescribeJobExecutionResponse {
- clientToken: smithy.api#String,
+ clientToken: smithy.api#String
- @required
- execution: JobExecutionData,
+ @required
+ execution: JobExecutionData
- @required
- timestamp: smithy.api#Timestamp,
+ @required
+ timestamp: smithy.api#Timestamp
}
-
// ------- UpdateJobExecution ----------
-
@smithy.mqtt#publish("$aws/things/{thingName}/jobs/{jobId}/update")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution")
operation PublishUpdateJobExecution {
@@ -310,50 +300,54 @@ operation PublishUpdateJobExecution {
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/{jobId}/update/accepted")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution")
operation SubscribeToUpdateJobExecutionAccepted {
- input: UpdateJobExecutionSubscriptionRequest,
+ input: UpdateJobExecutionSubscriptionRequest
output: UpdateJobExecutionSubscriptionResponse
}
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/{jobId}/update/rejected")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution")
operation SubscribeToUpdateJobExecutionRejected {
- input: UpdateJobExecutionSubscriptionRequest,
+ input: UpdateJobExecutionSubscriptionRequest
output: RejectedResponse
}
structure UpdateJobExecutionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
+
+ @required
+ @smithy.mqtt#topicLabel
+ jobId: smithy.api#String
+
+ @required
+ status: JobStatus
- @required
- @smithy.mqtt#topicLabel
- jobId: smithy.api#String,
+ clientToken: smithy.api#String
- @required
- status: JobStatus,
+ statusDetails: StatusDetails
- clientToken: smithy.api#String,
+ expectedVersion: smithy.api#Integer
- statusDetails: StatusDetails,
- expectedVersion: smithy.api#Integer,
- executionNumber: smithy.api#Long,
- includeJobExecutionState: smithy.api#Boolean,
- includeJobDocument: smithy.api#Boolean,
+ executionNumber: smithy.api#Long
+
+ includeJobExecutionState: smithy.api#Boolean
+
+ includeJobDocument: smithy.api#Boolean
}
structure UpdateJobExecutionSubscriptionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
- @required
- @smithy.mqtt#topicLabel
- jobId: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ jobId: smithy.api#String
}
structure UpdateJobExecutionSubscriptionResponse {
- messages: UpdateJobExecutionResponseStream
+ messages: UpdateJobExecutionResponseStream
}
@streaming
@@ -362,45 +356,43 @@ union UpdateJobExecutionResponseStream {
}
structure UpdateJobExecutionResponse {
- clientToken: smithy.api#String,
+ clientToken: smithy.api#String
- @required
- executionState: JobExecutionState,
+ @required
+ executionState: JobExecutionState
- @required
- jobDocument: JobDocument,
+ @required
+ jobDocument: JobDocument
- @required
- timestamp: smithy.api#Timestamp,
+ @required
+ timestamp: smithy.api#Timestamp
}
structure JobExecutionState {
- status: JobStatus,
- statusDetails: StatusDetails,
- versionNumber: smithy.api#Integer,
+ status: JobStatus
+ statusDetails: StatusDetails
+ versionNumber: smithy.api#Integer
}
@suppress(["UnstableFeature"])
document JobDocument
-
// ------- JobExecutionsChanged ----------
-
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/notify")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged")
operation SubscribeToJobExecutionsChangedEvents {
- input: JobExecutionsChangedSubscriptionRequest,
+ input: JobExecutionsChangedSubscriptionRequest
output: JobExecutionsChangedSubscriptionResponse
}
structure JobExecutionsChangedSubscriptionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String,
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
}
structure JobExecutionsChangedSubscriptionResponse {
- messages: JobExecutionsChangedEventStream,
+ messages: JobExecutionsChangedEventStream
}
@streaming
@@ -409,36 +401,34 @@ union JobExecutionsChangedEventStream {
}
structure JobExecutionsChangedEvent {
- @required
- jobs: JobExecutionsChangedJobs,
+ @required
+ jobs: JobExecutionsChangedJobs
- @required
- timestamp: smithy.api#Timestamp,
+ @required
+ timestamp: smithy.api#Timestamp
}
map JobExecutionsChangedJobs {
- key: JobStatus,
- value: JobExecutionSummaryList
+ key: JobStatus
+ value: JobExecutionSummaryList
}
-
// ------- NextJobExecutionChanged ----------
-
@smithy.mqtt#subscribe("$aws/things/{thingName}/jobs/notify-next")
@externalDocumentation("API Reference": "https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged")
operation SubscribeToNextJobExecutionChangedEvents {
- input: NextJobExecutionChangedSubscriptionRequest,
+ input: NextJobExecutionChangedSubscriptionRequest
output: NextJobExecutionChangedSubscriptionResponse
}
structure NextJobExecutionChangedSubscriptionRequest {
- @required
- @smithy.mqtt#topicLabel
- thingName: smithy.api#String
+ @required
+ @smithy.mqtt#topicLabel
+ thingName: smithy.api#String
}
structure NextJobExecutionChangedSubscriptionResponse {
- messages: NextJobExecutionChangedEventStream,
+ messages: NextJobExecutionChangedEventStream
}
@streaming
@@ -447,9 +437,9 @@ union NextJobExecutionChangedEventStream {
}
structure NextJobExecutionChangedEvent {
- @required
- execution: JobExecutionData,
+ @required
+ execution: JobExecutionData
- @required
- timestamp: smithy.api#Timestamp,
+ @required
+ timestamp: smithy.api#Timestamp
}
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-operations-with-errors.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-operations-with-errors.smithy
index 8e065ecdf94..567213d685f 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-operations-with-errors.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-operations-with-errors.smithy
@@ -5,14 +5,16 @@ namespace smithy.example
@smithy.mqtt#subscribe("event1")
operation Foo {
- input: Unit,
- output: FooOutput,
- errors: [Error]
+ input: Unit
+ output: FooOutput
+ errors: [
+ Error
+ ]
}
@output
structure FooOutput {
- messages: EventStream,
+ messages: EventStream
}
@streaming
@@ -25,12 +27,13 @@ structure Event {}
@error("client")
structure Error {}
-
@smithy.mqtt#publish("event2")
operation Baz {
- input: BazInput,
- output: Unit,
- errors: [Error]
+ input: BazInput
+ output: Unit
+ errors: [
+ Error
+ ]
}
@input
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-topic-labels.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-topic-labels.smithy
index 474ba15541c..c2b0a1cea33 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-topic-labels.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/mqtt-topic-labels.smithy
@@ -6,23 +6,22 @@ namespace smithy.example
@smithy.mqtt#publish("events1/{foo}")
operation Operation1 {}
-
// Missing {foo} member.
@smithy.mqtt#publish("events2/{foo}")
operation Operation2 {
- input: Operation2Input,
+ input: Operation2Input
output: Unit
}
@input
structure Operation2Input {
- baz: smithy.api#String,
+ baz: smithy.api#String
}
// Extraneous {baz} label member.
@smithy.mqtt#publish("events3/{foo}")
operation Operation3 {
- input: Operation3Input,
+ input: Operation3Input
output: Unit
}
@@ -30,24 +29,24 @@ operation Operation3 {
structure Operation3Input {
@required
@smithy.mqtt#topicLabel
- foo: smithy.api#String,
+ foo: smithy.api#String
@required
@smithy.mqtt#topicLabel
- baz: smithy.api#String,
+ baz: smithy.api#String
}
// Missing topicLabel trait for {foo}
@smithy.mqtt#publish("events4/{foo}")
operation Operation4 {
- input: Operation4Input,
+ input: Operation4Input
output: Unit
}
@input
structure Operation4Input {
@required
- foo: smithy.api#String,
+ foo: smithy.api#String
}
// No errors.
@@ -60,5 +59,5 @@ operation Operation5 {
structure Operation5Input {
@required
@smithy.mqtt#topicLabel
- foo: smithy.api#String,
+ foo: smithy.api#String
}
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/publish-with-eventstream.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/publish-with-eventstream.smithy
index 70a21a365e6..b2039313767 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/publish-with-eventstream.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/publish-with-eventstream.smithy
@@ -4,13 +4,13 @@ namespace smithy.example
@smithy.mqtt#publish("foo")
operation Publish {
- input: PublishInput,
+ input: PublishInput
output: Unit
}
@input
structure PublishInput {
- messages: EventStream,
+ messages: EventStream
}
@streaming
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-input-missing-label.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-input-missing-label.smithy
index c334734a42a..f5e3117bb86 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-input-missing-label.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-input-missing-label.smithy
@@ -5,12 +5,12 @@ $version: "2.0"
namespace smithy.example
-use smithy.mqtt#topicLabel
use smithy.mqtt#subscribe
+use smithy.mqtt#topicLabel
@subscribe("events/{foo}")
operation Foo {
- input: FooInput,
+ input: FooInput
output: FooOutput
}
@@ -18,14 +18,16 @@ operation Foo {
structure FooInput {
@required
@topicLabel
- foo: smithy.api#String,
+ foo: smithy.api#String
+
+ baz: smithy.api#String
- baz: smithy.api#String, // Error, missing topicLabel.
+ // Error, missing topicLabel.
}
@output
structure FooOutput {
- messages: EventStream,
+ messages: EventStream
}
@streaming
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-initial-event.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-initial-event.smithy
index 73e6cb38506..2362e5277bd 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-initial-event.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-initial-event.smithy
@@ -5,14 +5,16 @@ namespace smithy.example
@smithy.mqtt#subscribe("events")
operation Foo {
- input: Unit,
+ input: Unit
output: FooOutput
}
@output
structure FooOutput {
- badMember: smithy.api#String, // <-- Erroneous initial event member
- messages: EventStream,
+ badMember: smithy.api#String
+
+ // <-- Erroneous initial event member
+ messages: EventStream
}
@streaming
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-missing-event-stream.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-missing-event-stream.smithy
index 768a29afba3..063d0fca542 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-missing-event-stream.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-operation-missing-event-stream.smithy
@@ -5,7 +5,7 @@ namespace smithy.example
@smithy.mqtt#subscribe("events")
operation Foo {
- input: Unit,
+ input: Unit
output: FooOutput
}
diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/topic-conflicts.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/topic-conflicts.smithy
index b2dc0a9a8e4..163578de8dc 100644
--- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/topic-conflicts.smithy
+++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/topic-conflicts.smithy
@@ -5,7 +5,7 @@ namespace smithy.example
// Conflicts with B, C
@smithy.mqtt#publish("a")
operation A {
- input: AInput,
+ input: AInput
output: Unit
}
@@ -14,7 +14,7 @@ structure AInput {}
// Conflicts with A, C
@smithy.mqtt#publish("a")
operation B {
- input: BInput,
+ input: BInput
output: Unit
}
@@ -23,12 +23,12 @@ structure BInput {}
// Conflicts with A, B
@smithy.mqtt#subscribe("a")
operation C {
- input: Unit,
+ input: Unit
output: COutput
}
structure COutput {
- messages: EmptyEventStream,
+ messages: EmptyEventStream
}
@streaming
@@ -38,11 +38,10 @@ union EmptyEventStream {
structure EmptyEvent {}
-
// D and E do not conflict since they use the same payload.
@smithy.mqtt#publish("b")
operation D {
- input: DInput,
+ input: DInput
output: Unit
}
@@ -50,18 +49,18 @@ structure DInput {}
@smithy.mqtt#publish("b")
operation E {
- input: DInput,
+ input: DInput
output: Unit
}
@smithy.mqtt#subscribe("b")
operation F {
- input: Unit,
+ input: Unit
output: FOutput
}
structure FOutput {
- messages: DInputEventStream,
+ messages: DInputEventStream
}
@streaming
@@ -71,5 +70,5 @@ union DInputEventStream {
structure DInputEvent {
@eventPayload
- payload: DInput,
+ payload: DInput
}
diff --git a/smithy-openapi-traits/src/main/resources/META-INF/smithy/smithy.openapi.smithy b/smithy-openapi-traits/src/main/resources/META-INF/smithy/smithy.openapi.smithy
index 0af3d334bd0..10ace558cb4 100644
--- a/smithy-openapi-traits/src/main/resources/META-INF/smithy/smithy.openapi.smithy
+++ b/smithy-openapi-traits/src/main/resources/META-INF/smithy/smithy.openapi.smithy
@@ -4,10 +4,15 @@ namespace smithy.openapi
/// Indicates a trait shape should be converted into an [OpenAPI specification extension](https://spec.openapis.org/oas/v3.1.0#specification-extensions).
@trait(
- selector: "[trait|trait]",
+ selector: "[trait|trait]"
breakingChanges: [
- {change: "presence"},
- {path: "/as", change: "any"}
+ {
+ change: "presence"
+ }
+ {
+ path: "/as"
+ change: "any"
+ }
]
)
structure specificationExtension {
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/documentation-test.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/documentation-test.smithy
index cbcfb29e955..9cc7ad9157e 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/documentation-test.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/documentation-test.smithy
@@ -5,8 +5,10 @@ namespace smithy.example
/// Service
@aws.protocols#restJson1
service MyDocs {
- version: "2018-01-01",
- operations: [MyDocsOperation]
+ version: "2018-01-01"
+ operations: [
+ MyDocsOperation
+ ]
}
/// Operation
@@ -19,7 +21,7 @@ operation MyDocsOperation {
/// Output
structure Output {
/// foo member.
- foo: String,
+ foo: String
/// Note: these member docs are ignored and instead only the documentation
/// on the targeted structure is present in the output. This is because our
@@ -27,10 +29,10 @@ structure Output {
/// than it is to have 100% fidelity with the original Smithy model. In a
/// previous implementation, we created a unique named shape for every member,
/// but this results in no shape reuse across the generated OpenAPI model.
- nested: Nested,
+ nested: Nested
}
/// Nested
structure Nested {
- baz: String,
+ baz: String
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/externaldocs-test.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/externaldocs-test.smithy
index c6717b90ba4..8aa2a0a266e 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/externaldocs-test.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/externaldocs-test.smithy
@@ -2,27 +2,23 @@ $version: "2.0"
namespace smithy.example
-@externalDocumentation(
- "API Reference": "https://localhost/docs/service"
-)
+@externalDocumentation("API Reference": "https://localhost/docs/service")
@aws.protocols#restJson1
service MyDocs {
- version: "2018-01-01",
- operations: [MyDocsOperation]
+ version: "2018-01-01"
+ operations: [
+ MyDocsOperation
+ ]
}
-@externalDocumentation(
- "API Reference": "https://localhost/docs/operation"
-)
+@externalDocumentation("API Reference": "https://localhost/docs/operation")
@http(method: "GET", uri: "/")
@readonly
operation MyDocsOperation {
output: Output
}
-@externalDocumentation(
- "API Reference": "https://localhost/docs/output"
-)
+@externalDocumentation("API Reference": "https://localhost/docs/output")
structure Output {
foo: String
-}
\ No newline at end of file
+}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/endpoint-service.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/endpoint-service.smithy
index 08ad7715d11..b5b50ce491f 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/endpoint-service.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/endpoint-service.smithy
@@ -5,8 +5,10 @@ namespace smithy.example
@aws.protocols#restJson1
service EndpointService {
- version: "2018-01-01",
- operations: [EndpointOperation]
+ version: "2018-01-01"
+ operations: [
+ EndpointOperation
+ ]
}
@http(method: "GET", uri: "/")
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/greedy-labels.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/greedy-labels.smithy
index a8848c52e11..83c2e7ab0d8 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/greedy-labels.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/greedy-labels.smithy
@@ -4,8 +4,10 @@ namespace smithy.example
@aws.protocols#restJson1
service Greedy {
- version: "2018-01-01",
- operations: [GreedyOperation]
+ version: "2018-01-01"
+ operations: [
+ GreedyOperation
+ ]
}
@http(method: "GET", uri: "/{greedy+}")
@@ -16,5 +18,5 @@ operation GreedyOperation {
structure GreedyOperationInput {
@required
@httpLabel
- greedy: String,
+ greedy: String
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/prefix-headers.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/prefix-headers.smithy
index 9b278c3b927..7c9a9a90a22 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/prefix-headers.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/prefix-headers.smithy
@@ -4,27 +4,29 @@ namespace smithy.example
@aws.protocols#restJson1
service PrefixHeaders {
- version: "2018-01-01",
- operations: [PrefixHeadersOperation]
+ version: "2018-01-01"
+ operations: [
+ PrefixHeadersOperation
+ ]
}
@http(method: "GET", uri: "/")
operation PrefixHeadersOperation {
- input: Input,
+ input: Input
output: Output
}
structure Input {
@httpPrefixHeaders("x-custom-")
- metaData: Headers,
+ metaData: Headers
}
structure Output {
@httpPrefixHeaders("x-custom-")
- metaData: Headers,
+ metaData: Headers
}
map Headers {
- key: String,
+ key: String
value: String
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/small-service.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/small-service.smithy
index 0ac00b436e3..b2df56b907b 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/small-service.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/small-service.smithy
@@ -5,8 +5,10 @@ namespace smithy.example
@aws.auth#sigv4(name: "small")
@aws.protocols#restJson1
service Small {
- version: "2018-01-01",
- operations: [SmallOperation]
+ version: "2018-01-01"
+ operations: [
+ SmallOperation
+ ]
}
@http(method: "POST", uri: "/")
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/inlined-type-target.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/inlined-type-target.smithy
index 092b9fcf669..59c10f40622 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/inlined-type-target.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/inlined-type-target.smithy
@@ -15,17 +15,14 @@ namespace smithy.example
@bigDecimalExt(0.1234567890123456789)
@timestampExt("2023-02-27T13:01:57Z")
@documentExt({
- "a": "b",
- "c": ["d"]
+ a: "b"
+ c: ["d"]
})
@enumExt("first")
@intEnumExt(3)
@listExt(["a", "b", "c"])
-@mapExt("a": 15, "b": 18)
-@structureExt(
- stringMember: "first field"
- integerMember: 17
-)
+@mapExt(a: 15, b: 18)
+@structureExt(stringMember: "first field", integerMember: 17)
@unionExt(string: "string variant")
string Name
@@ -41,5 +38,7 @@ operation Operation {
@aws.protocols#restJson1
service Service {
- operations: [Operation]
+ operations: [
+ Operation
+ ]
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/operation-target.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/operation-target.smithy
index 63c616baf3b..51f3f2f3657 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/operation-target.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/operation-target.smithy
@@ -15,23 +15,21 @@ namespace smithy.example
@bigDecimalExt(0.1234567890123456789)
@timestampExt("2023-02-27T13:01:57Z")
@documentExt({
- "a": "b",
- "c": ["d"]
+ a: "b"
+ c: ["d"]
})
@enumExt("first")
@intEnumExt(3)
@listExt(["a", "b", "c"])
-@mapExt("a": 15, "b": 18)
-@structureExt(
- stringMember: "first field"
- integerMember: 17
-)
+@mapExt(a: 15, b: 18)
+@structureExt(stringMember: "first field", integerMember: 17)
@unionExt(string: "string variant")
@http(method: "PUT", uri: "/")
-operation Operation {
-}
+operation Operation {}
@aws.protocols#restJson1
service Service {
- operations: [Operation]
+ operations: [
+ Operation
+ ]
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/service-target.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/service-target.smithy
index 9064c6971de..f08a325f010 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/service-target.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/service-target.smithy
@@ -3,8 +3,7 @@ $version: "2.0"
namespace smithy.example
@http(method: "PUT", uri: "/")
-operation Operation {
-}
+operation Operation {}
@blobExt("blob content")
@booleanExt(true)
@@ -19,19 +18,18 @@ operation Operation {
@bigDecimalExt(0.1234567890123456789)
@timestampExt("2023-02-27T13:01:57Z")
@documentExt({
- "a": "b",
- "c": ["d"]
+ a: "b"
+ c: ["d"]
})
@enumExt("first")
@intEnumExt(3)
@listExt(["a", "b", "c"])
-@mapExt("a": 15, "b": 18)
-@structureExt(
- stringMember: "first field"
- integerMember: 17
-)
+@mapExt(a: 15, b: 18)
+@structureExt(stringMember: "first field", integerMember: 17)
@unionExt(string: "string variant")
@aws.protocols#restJson1
service Service {
- operations: [Operation]
+ operations: [
+ Operation
+ ]
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/structure-target.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/structure-target.smithy
index 9058f48249d..cdb70a40913 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/structure-target.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/specificationextensions/structure-target.smithy
@@ -15,17 +15,14 @@ namespace smithy.example
@bigDecimalExt(0.1234567890123456789)
@timestampExt("2023-02-27T13:01:57Z")
@documentExt({
- "a": "b",
- "c": ["d"]
+ a: "b"
+ c: ["d"]
})
@enumExt("first")
@intEnumExt(3)
@listExt(["a", "b", "c"])
-@mapExt("a": 15, "b": 18)
-@structureExt(
- stringMember: "first field"
- integerMember: 17
-)
+@mapExt(a: 15, b: 18)
+@structureExt(stringMember: "first field", integerMember: 17)
@unionExt(string: "string variant")
structure Input {
name: String
@@ -39,5 +36,7 @@ operation Operation {
@aws.protocols#restJson1
service Service {
- operations: [Operation]
+ operations: [
+ Operation
+ ]
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/substitutions.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/substitutions.smithy
index 4d2e1ddc65d..9528836698a 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/substitutions.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/mappers/substitutions.smithy
@@ -4,6 +4,4 @@ namespace smithy.example
@aws.protocols#restJson1
@documentation("SUB_HELLO")
-service Service {
- version: "2018-01-01"
-}
+service Service { version: "2018-01-01" }
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/model-with-mixins.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/model-with-mixins.smithy
index c9c09f68ba8..55aec0ad347 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/model-with-mixins.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/model-with-mixins.smithy
@@ -4,8 +4,10 @@ namespace smithy.example
@aws.protocols#restJson1
service HasMixin {
- version: "2021-08-12",
- operations: [Greeting]
+ version: "2021-08-12"
+ operations: [
+ Greeting
+ ]
}
@http(method: "GET", uri: "/")
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nonconflicting-unit.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nonconflicting-unit.smithy
index aa4e58eacc1..40b6d4200e6 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nonconflicting-unit.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nonconflicting-unit.smithy
@@ -6,8 +6,11 @@ use aws.protocols#restJson1
@restJson1
service RestService {
- version: "1",
- operations: [Ping, Ping2]
+ version: "1"
+ operations: [
+ Ping
+ Ping2
+ ]
}
@http(method: "POST", uri: "/ping")
@@ -19,6 +22,7 @@ operation Ping {
@http(method: "POST", uri: "/ping2")
operation Ping2 {
input: Ping2Input
+
// Implicit output: Unit
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nullability-and-format.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nullability-and-format.smithy
index 32bc3581a86..badfda2f553 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nullability-and-format.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/nullability-and-format.smithy
@@ -1,23 +1,28 @@
namespace example
+
use aws.protocols#restJson1
@restJson1
service Example {
- version: "2022-07-10",
- operations: [FooBar]
+ version: "2022-07-10"
+ operations: [
+ FooBar
+ ]
}
@idempotent
@http(method: "PUT", uri: "/test", code: 200)
operation FooBar {
- input: FooBarInput,
- output: FooBarOutput,
- errors: [FooBarError]
+ input: FooBarInput
+ output: FooBarOutput
+ errors: [
+ FooBarError
+ ]
}
@input
structure FooBarInput {
- foo: BoxedInteger,
+ foo: BoxedInteger
file: FilePayload
}
@@ -26,7 +31,7 @@ blob FilePayload
@output
structure FooBarOutput {
- bar: BoxedInteger,
+ bar: BoxedInteger
baz: MyMap
}
@@ -39,14 +44,14 @@ structure FooBarError {
integer BoxedInteger
map MyMap {
- key: MyEnum,
+ key: MyEnum
value: String
}
@enum([
{
value: "FOO"
- },
+ }
{
value: "BAR"
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/error-code-collision-test.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/error-code-collision-test.smithy
index b20bec28612..efc646c7f92 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/error-code-collision-test.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/error-code-collision-test.smithy
@@ -1,103 +1,111 @@
namespace example
use aws.protocols#restJson1
-use smithy.framework#ValidationException
@restJson1
service Example {
- version: "2006-03-01",
- operations: [GetCurrentTime],
+ version: "2006-03-01"
+ operations: [
+ GetCurrentTime
+ ]
errors: [
- Error1,
- Error2,
- Error3,
- Error4,
- Error5,
- Error6,
- Error7,
+ Error1
+ Error2
+ Error3
+ Error4
+ Error5
+ Error6
+ Error7
Error8
]
}
@error("client")
@retryable(throttling: true)
-@httpError(429) // Too many requests
+@httpError(429)
+// Too many requests
structure Error1 {
@httpHeader("error1-header")
@required
- header: String,
+ header: String
@required
- message: String,
+ message: String
}
@error("client")
@retryable(throttling: true)
-@httpError(429) // Too many requests
+@httpError(429)
+// Too many requests
structure Error2 {
@httpHeader("error2-header")
@required
- header2: String,
+ header2: String
@required
- message: String,
+ message: String
- message2: String,
+ message2: String
message3: String
}
@error("client")
@retryable(throttling: true)
-@httpError(429) // Too many requests
+@httpError(429)
+// Too many requests
structure Error3 {
@required
- message24 : String,
+ message24: String
}
@error("client")
@retryable(throttling: true)
-@httpError(429) // Too many requests
+@httpError(429)
+// Too many requests
structure Error4 {
@required
- message365: String,
+ message365: String
}
@error("client")
@retryable(throttling: true)
-@httpError(429) // Too many requests
+@httpError(429)
+// Too many requests
structure Error5 {
@required
- message: String,
+ message: String
}
@error("client")
@retryable(throttling: true)
-@httpError(429) // Too many requests
+@httpError(429)
+// Too many requests
structure Error6 {
@required
- message: String,
+ message: String
}
@error("client")
-@httpError(404) // Too many requests
+@httpError(404)
+// Too many requests
structure Error7 {
@required
- message: String,
+ message: String
}
@error("client")
-@httpError(404) // Too many requests
+@httpError(404)
+// Too many requests
structure Error8 {
@required
- message2: String,
+ message2: String
}
-
@readonly
@http(uri: "/time", method: "GET")
operation GetCurrentTime {
- input: GetCurrentTimeInput,
+ input: GetCurrentTimeInput
output: GetCurrentTimeOutput
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/examples-test.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/examples-test.smithy
index b32459f4b5c..89d12f1b923 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/examples-test.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/examples-test.smithy
@@ -4,37 +4,45 @@ use aws.protocols#restJson1
@restJson1
service Banking {
- version: "2022-06-26",
- operations: [Deposit, Withdraw]
+ version: "2022-06-26"
+ operations: [
+ Deposit
+ Withdraw
+ ]
}
@idempotent
@http(method: "PUT", uri: "/account/{username}", code: 200)
operation Deposit {
- input: DepositInput,
- output: DepositOutput,
- errors: [InvalidUsername, InvalidAmount]
+ input: DepositInput
+ output: DepositOutput
+ errors: [
+ InvalidUsername
+ InvalidAmount
+ ]
}
@idempotent
@http(method: "PATCH", uri: "/account/withdraw", code: 200)
operation Withdraw {
- input: WithdrawInput,
- output: WithdrawOutput,
- errors: [InvalidUsername]
+ input: WithdrawInput
+ output: WithdrawOutput
+ errors: [
+ InvalidUsername
+ ]
}
@input
structure DepositInput {
@httpHeader("accountNumber")
- accountNumber: String,
+ accountNumber: String
@required
@httpLabel
- username: String,
+ username: String
@httpQuery("accountHistory")
- accountHistory: ExampleList,
+ accountHistory: ExampleList
@httpPayload
depositAmount: String
@@ -43,16 +51,18 @@ structure DepositInput {
@input
structure WithdrawInput {
@httpHeader("accountNumber")
- accountNumber: String,
+ accountNumber: String
@httpHeader("username")
- username: String,
+ username: String
+
+ @httpQueryParams
+ withdrawParams: ExampleMap
+
+ time: date
- @httpQueryParams()
- withdrawParams: ExampleMap,
+ withdrawAmount: String
- time: date,
- withdrawAmount: String,
withdrawOption: String
}
@@ -61,7 +71,7 @@ list ExampleList {
}
map ExampleMap {
- key: String,
+ key: String
value: String
}
@@ -74,32 +84,35 @@ timestamp date
@output
structure DepositOutput {
@httpHeader("username")
- username: String,
+ username: String
@httpHeader("authenticationResult")
- authenticationResult: ExampleList,
+ authenticationResult: ExampleList
+
+ textMessage: String
- textMessage: String,
emailMessage: String
}
@output
structure WithdrawOutput {
@httpHeader("branch")
- branch: String,
+ branch: String
@httpHeader("result")
- accountHistory: ExampleList,
+ accountHistory: ExampleList
+
+ location: String
+
+ bankName: String
- location: String,
- bankName: String,
atmRecording: exampleVideo
}
@error("client")
structure InvalidUsername {
@httpHeader("internalErrorCode")
- internalErrorCode: String,
+ internalErrorCode: String
@httpPayload
errorMessage: String
@@ -107,107 +120,90 @@ structure InvalidUsername {
@error("server")
structure InvalidAmount {
- errorMessage1: String,
- errorMessage2: String,
+ errorMessage1: String
+ errorMessage2: String
errorMessage3: String
}
-apply Deposit @examples(
- [
- {
- title: "Deposit valid example",
- documentation: "depositTestDoc",
- input: {
- accountNumber: "102935",
- username: "sichanyoo",
- accountHistory: ["10", "-25", "50"],
- depositAmount: "200"
- },
- output: {
- username: "sichanyoo",
- authenticationResult: ["pass1", "pass2", "pass3"],
- textMessage: "You deposited 200-text",
- emailMessage: "You deposited 200-email"
- },
- },
-
- {
- title: "Deposit invalid username example",
- documentation: "depositTestDoc2",
- input: {
- username: "sichanyoo",
- accountHistory: ["-200", "200", "10"],
- depositAmount: "-200"
- },
- error: {
- shapeId: InvalidUsername,
- content: {
- internalErrorCode: "4gsw2-34",
- errorMessage: "ERROR: Invalid username."
- }
- },
- },
-
- {
- title: "Deposit invalid amount example",
- documentation: "depositTestDoc3",
- input: {
- accountNumber: "203952",
- username: "obidos",
- accountHistory: ["2000", "50000", "100"],
- depositAmount: "-100"
- },
- error: {
- shapeId: InvalidAmount,
- content: {
- errorMessage1: "ERROR: Invalid amount.",
- errorMessage2: "2gdx4-34",
- errorMessage3: "2gcbe-98"
- }
- },
+apply Deposit @examples([
+ {
+ title: "Deposit valid example"
+ documentation: "depositTestDoc"
+ input: {
+ accountNumber: "102935"
+ username: "sichanyoo"
+ accountHistory: ["10", "-25", "50"]
+ depositAmount: "200"
}
- ]
-)
-
-apply Withdraw @examples(
- [
- {
- title: "Withdraw valid example",
- documentation: "withdrawTestDoc",
- input: {
- accountNumber: "124634",
- username: "amazon",
- withdrawParams: {"location" : "Denver", "bankName" : "Chase"},
- time: "Tue, 29 Apr 2014 18:30:38 GMT",
- withdrawAmount: "-35",
- withdrawOption: "ATM"
- },
- output: {
- branch: "Denver-203",
- accountHistory: ["34", "5", "-250"],
- location: "Denver",
- bankName: "Chase",
- atmRecording: "dGVzdHZpZGVv"
- },
- },
-
- {
- title: "Withdraw invalid username example",
- documentation: "withdrawTestDoc2",
- input: {
- accountNumber: "231565",
- username: "peccy",
- withdrawParams: {"location" : "Seoul", "bankName" : "Chase"},
- withdrawAmount: "-450",
- withdrawOption: "Venmo"
- },
- error: {
- shapeId: InvalidUsername,
- content: {
- internalErrorCode: "8dfws-21",
- errorMessage: "ERROR: Invalid username."
- }
- },
+ output: {
+ username: "sichanyoo"
+ authenticationResult: ["pass1", "pass2", "pass3"]
+ textMessage: "You deposited 200-text"
+ emailMessage: "You deposited 200-email"
}
- ]
-)
+ }
+ {
+ title: "Deposit invalid username example"
+ documentation: "depositTestDoc2"
+ input: {
+ username: "sichanyoo"
+ accountHistory: ["-200", "200", "10"]
+ depositAmount: "-200"
+ }
+ error: {
+ shapeId: InvalidUsername
+ content: { internalErrorCode: "4gsw2-34", errorMessage: "ERROR: Invalid username." }
+ }
+ }
+ {
+ title: "Deposit invalid amount example"
+ documentation: "depositTestDoc3"
+ input: {
+ accountNumber: "203952"
+ username: "obidos"
+ accountHistory: ["2000", "50000", "100"]
+ depositAmount: "-100"
+ }
+ error: {
+ shapeId: InvalidAmount
+ content: { errorMessage1: "ERROR: Invalid amount.", errorMessage2: "2gdx4-34", errorMessage3: "2gcbe-98" }
+ }
+ }
+])
+
+apply Withdraw @examples([
+ {
+ title: "Withdraw valid example"
+ documentation: "withdrawTestDoc"
+ input: {
+ accountNumber: "124634"
+ username: "amazon"
+ withdrawParams: { location: "Denver", bankName: "Chase" }
+ time: "Tue, 29 Apr 2014 18:30:38 GMT"
+ withdrawAmount: "-35"
+ withdrawOption: "ATM"
+ }
+ output: {
+ branch: "Denver-203"
+ accountHistory: ["34", "5", "-250"]
+ location: "Denver"
+ bankName: "Chase"
+ atmRecording: "dGVzdHZpZGVv"
+ }
+ }
+ {
+ title: "Withdraw invalid username example"
+ documentation: "withdrawTestDoc2"
+ input: {
+ accountNumber: "231565"
+ username: "peccy"
+ withdrawParams: { location: "Seoul", bankName: "Chase" }
+ withdrawAmount: "-450"
+ withdrawOption: "Venmo"
+ }
+ error: {
+ shapeId: InvalidUsername
+ content: { internalErrorCode: "8dfws-21", errorMessage: "ERROR: Invalid username." }
+ }
+ }
+])
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/rest-json-protocol-headers.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/rest-json-protocol-headers.smithy
index 1e9dab33409..2ab4db26b89 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/rest-json-protocol-headers.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/protocols/rest-json-protocol-headers.smithy
@@ -2,20 +2,20 @@ $version: "2.0"
namespace smithy.example
-use aws.protocols#restJson1
-use aws.api#clientEndpointDiscovery
use aws.api#clientDiscoveredEndpoint
+use aws.api#clientEndpointDiscovery
+use aws.protocols#restJson1
@clientEndpointDiscovery(operation: DescribeEndpoints, error: EmptyError)
@restJson1
service Service {
- version: "30-07-21",
+ version: "30-07-21"
operations: [
- NoInputOrOutput,
- EmptyInputAndOutput,
- OnlyErrorOutput,
- HttpChecksumRequired,
- DescribeEndpoints,
+ NoInputOrOutput
+ EmptyInputAndOutput
+ OnlyErrorOutput
+ HttpChecksumRequired
+ DescribeEndpoints
HasDiscoveredEndpoint
]
}
@@ -29,8 +29,8 @@ operation NoInputOrOutput {}
// there being a modeled output.
@http(method: "GET", uri: "/EmptyInputAndOutput")
operation EmptyInputAndOutput {
- input: EmptyStruct,
- output: EmptyStruct,
+ input: EmptyStruct
+ output: EmptyStruct
}
structure EmptyStruct {}
@@ -38,7 +38,9 @@ structure EmptyStruct {}
// Operations with errors will also have content headers in the response
@http(method: "GET", uri: "/OnlyErrorOutput")
operation OnlyErrorOutput {
- errors: [EmptyError]
+ errors: [
+ EmptyError
+ ]
}
@error("client")
@@ -50,38 +52,39 @@ structure EmptyError {}
@http(method: "GET", uri: "/HttpChecksumRequired")
operation HttpChecksumRequired {}
-
@http(method: "GET", uri: "/HasDiscoveredEndpoint")
@clientDiscoveredEndpoint(required: true)
operation HasDiscoveredEndpoint {
- errors: [EmptyError]
+ errors: [
+ EmptyError
+ ]
}
@http(method: "POST", uri: "/DescribeEndpoints")
operation DescribeEndpoints {
- input: DescribeEndpointsInput,
- output: DescribeEndpointsOutput,
+ input: DescribeEndpointsInput
+ output: DescribeEndpointsOutput
}
structure DescribeEndpointsInput {
- Operation: String,
- Identifiers: Identifiers,
+ Operation: String
+ Identifiers: Identifiers
}
map Identifiers {
- key: String,
- value: String
+ key: String
+ value: String
}
structure DescribeEndpointsOutput {
- Endpoints: Endpoints,
+ Endpoints: Endpoints
}
list Endpoints {
- member: Endpoint
+ member: Endpoint
}
structure Endpoint {
- Address: String,
- CachePeriodInMinutes: Long,
+ Address: String
+ CachePeriodInMinutes: Long
}
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/service-with-multiple-protocols.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/service-with-multiple-protocols.smithy
index b8e376ce4a7..74df60ff380 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/service-with-multiple-protocols.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/service-with-multiple-protocols.smithy
@@ -4,6 +4,4 @@ namespace smithy.example
@aws.protocols#awsJson1_1
@aws.protocols#awsJson1_0
-service Service {
- version: "2020-02-13"
-}
+service Service { version: "2020-02-13" }
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/streaming-service.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/streaming-service.smithy
index 56a22009238..5500c9e50c6 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/streaming-service.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/streaming-service.smithy
@@ -4,8 +4,10 @@ namespace smithy.example
@aws.protocols#restJson1
service Streaming {
- version: "2018-01-01",
- operations: [StreamingOperation]
+ version: "2018-01-01"
+ operations: [
+ StreamingOperation
+ ]
}
@http(method: "GET", uri: "/")
diff --git a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/union-test.smithy b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/union-test.smithy
index 006c8ca9587..db86ffeb289 100644
--- a/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/union-test.smithy
+++ b/smithy-openapi/src/test/resources/software/amazon/smithy/openapi/fromsmithy/union-test.smithy
@@ -11,15 +11,17 @@ use aws.protocols#restJson1
@sigv4(name: "Example")
@restJson1
service Example {
- version: "2020-09-11",
- operations: [GetItem],
+ version: "2020-09-11"
+ operations: [
+ GetItem
+ ]
}
@http(uri: "/", method: "GET")
@readonly
operation GetItem {
- input: GetItemRequest,
- output: GetItemResponse,
+ input: GetItemRequest
+ output: GetItemResponse
}
structure GetItemRequest {}
@@ -30,7 +32,7 @@ structure GetItemResponse {
}
union ItemResponse {
- Foo: Foo,
+ Foo: Foo
}
structure Foo {}
diff --git a/smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy b/smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
index 51c97b38f37..1019c16fd5c 100644
--- a/smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
+++ b/smithy-protocol-test-traits/src/main/resources/META-INF/smithy/smithy.test.smithy
@@ -7,7 +7,7 @@ namespace smithy.test
@trait(selector: "operation")
@length(min: 1)
list httpRequestTests {
- member: HttpRequestTestCase,
+ member: HttpRequestTestCase
}
@private
@@ -19,40 +19,40 @@ structure HttpRequestTestCase {
/// test cases can share the same ID.
@required
@pattern("^[A-Za-z_][A-Za-z0-9_]+$")
- id: String,
+ id: String
/// The name of the protocol to test.
@required
@idRef(selector: "[trait|protocolDefinition]", failWhenMissing: true)
- protocol: String,
+ protocol: String
/// The expected serialized HTTP request method.
@required
@length(min: 1)
- method: String,
+ method: String
/// The request-target of the HTTP request, not including
/// the query string (for example, "/foo/bar").
@required
@length(min: 1)
- uri: String,
+ uri: String
/// The host / endpoint provided to the client, not including the path
/// or scheme (for example, "example.com").
- host: String,
+ host: String
/// The host / endpoint that the client should send to, not including
/// the path or scheme (for example, "prefix.example.com").
///
/// This can differ from the host provided to the client if the `hostPrefix`
/// member of the `endpoint` trait is set, for instance.
- resolvedHost: String,
+ resolvedHost: String
/// The optional authentication scheme shape ID to assume. It's
/// possible that specific authentication schemes might influence
/// the serialization logic of an HTTP request.
@idRef(selector: "[trait|authDefinition]", failWhenMissing: true)
- authScheme: String,
+ authScheme: String
/// A list of the expected serialized query string parameters.
///
@@ -71,7 +71,7 @@ structure HttpRequestTestCase {
/// in the request differs from the expected value.
///
/// `queryParams` applies no constraints on additional query parameters.
- queryParams: StringList,
+ queryParams: StringList
/// A list of query string parameter names that must not appear in the
/// serialized HTTP request.
@@ -79,7 +79,7 @@ structure HttpRequestTestCase {
/// Each value MUST appear in the format in which it is sent over the
/// wire; if a key needs to be percent-encoded, then it MUST appear
/// percent-encoded in this list.
- forbidQueryParams: StringList,
+ forbidQueryParams: StringList
/// A list of query string parameter names that MUST appear in the
/// serialized request URI, but no assertion is made on the value.
@@ -87,40 +87,40 @@ structure HttpRequestTestCase {
/// Each value MUST appear in the format in which it is sent over the
/// wire; if a key needs to be percent-encoded, then it MUST appear
/// percent-encoded in this list.
- requireQueryParams: StringList,
+ requireQueryParams: StringList
/// Defines a map of expected HTTP headers.
///
/// Headers that are not listed in this map are ignored unless they are
/// explicitly forbidden through `forbidHeaders`.
- headers: StringMap,
+ headers: StringMap
/// A list of header field names that must not appear in the serialized
/// HTTP request.
- forbidHeaders: StringList,
+ forbidHeaders: StringList
/// A list of header field names that must appear in the serialized
/// HTTP message, but no assertion is made on the value.
///
/// Headers listed in `headers` do not need to appear in this list.
- requireHeaders: StringList,
+ requireHeaders: StringList
/// The expected HTTP message body.
///
/// If no request body is defined, then no assertions are made about
/// the body of the message.
- body: String,
+ body: String
/// The media type of the `body`.
///
/// This is used to help test runners to parse and validate the expected
/// data against generated data.
- bodyMediaType: String,
+ bodyMediaType: String
/// Defines the input parameters used to generated the HTTP request.
///
/// These parameters MUST be compatible with the input of the operation.
- params: Document,
+ params: Document
/// Defines vendor-specific parameters that are used to influence the
/// request. For example, some vendors might utilize environment
@@ -129,37 +129,37 @@ structure HttpRequestTestCase {
///
/// If a `vendorParamsShape` is set, these parameters MUST be compatible
/// with that shape's definition.
- vendorParams: Document,
+ vendorParams: Document
/// A shape to be used to validate the `vendorParams` member contents.
///
/// If set, the parameters in `vendorParams` MUST be compatible with this
/// shape's definition.
@idRef(failWhenMissing: true)
- vendorParamsShape: String,
+ vendorParamsShape: String
/// A description of the test and what is being asserted.
- documentation: String,
+ documentation: String
/// Applies a list of tags to the test.
- tags: NonEmptyStringList,
+ tags: NonEmptyStringList
/// Indicates that the test case is only to be implemented by "client" or
/// "server" implementations. This property is useful for identifying and
/// testing edge cases of clients and servers that are impossible or
/// undesirable to test in *both* client and server implementations.
- appliesTo: AppliesTo,
+ appliesTo: AppliesTo
}
@private
map StringMap {
- key: String,
- value: String,
+ key: String
+ value: String
}
@private
list StringList {
- member: String,
+ member: String
}
/// Define how an HTTP response is serialized given a specific protocol,
@@ -167,7 +167,7 @@ list StringList {
@trait(selector: ":test(operation, structure[trait|error])")
@length(min: 1)
list httpResponseTests {
- member: HttpResponseTestCase,
+ member: HttpResponseTestCase
}
@private
@@ -179,23 +179,23 @@ structure HttpResponseTestCase {
/// test cases can share the same ID.
@required
@pattern("^[A-Za-z_][A-Za-z0-9_]+$")
- id: String,
+ id: String
/// The shape ID of the protocol to test.
@required
@idRef(selector: "[trait|protocolDefinition]", failWhenMissing: true)
- protocol: String,
+ protocol: String
/// Defines the HTTP response code.
@required
@range(min: 100, max: 599)
- code: Integer,
+ code: Integer
/// The optional authentication scheme shape ID to assume. It's possible
/// that specific authentication schemes might influence the serialization
/// logic of an HTTP response.
@idRef(selector: "[trait|authDefinition]", failWhenMissing: true)
- authScheme: String,
+ authScheme: String
/// A map of expected HTTP headers. Each key represents a header field
/// name and each value represents the expected header value. An HTTP
@@ -204,34 +204,34 @@ structure HttpResponseTestCase {
/// value differs from the serialized response value.
///
/// `headers` applies no constraints on additional headers.
- headers: StringMap,
+ headers: StringMap
/// A list of header field names that must not appear.
- forbidHeaders: StringList,
+ forbidHeaders: StringList
/// A list of header field names that must appear in the serialized
/// HTTP message, but no assertion is made on the value.
///
/// Headers listed in `headers` map do not need to appear in this list.
- requireHeaders: StringList,
+ requireHeaders: StringList
/// Defines the HTTP message body.
///
/// If no response body is defined, then no assertions are made about
/// the body of the message.
- body: String,
+ body: String
/// The media type of the `body`.
///
/// This is used to help test runners to parse and validate the expected
/// data against generated data. Binary media type formats require that
/// the contents of `body` are base64 encoded.
- bodyMediaType: String,
+ bodyMediaType: String
/// Defines the output parameters deserialized from the HTTP response.
///
/// These parameters MUST be compatible with the output of the operation.
- params: Document,
+ params: Document
/// Defines vendor-specific parameters that are used to influence the
/// response. For example, some vendors might utilize environment
@@ -240,31 +240,31 @@ structure HttpResponseTestCase {
///
/// If a `vendorParamsShape` is set, these parameters MUST be compatible
/// with that shape's definition.
- vendorParams: Document,
+ vendorParams: Document
/// A shape to be used to validate the `vendorParams` member contents.
///
/// If set, the parameters in `vendorParams` MUST be compatible with this
/// shape's definition.
@idRef(failWhenMissing: true)
- vendorParamsShape: String,
+ vendorParamsShape: String
/// A description of the test and what is being asserted.
- documentation: String,
+ documentation: String
/// Applies a list of tags to the test.
- tags: NonEmptyStringList,
+ tags: NonEmptyStringList
/// Indicates that the test case is only to be implemented by "client" or
/// "server" implementations. This property is useful for identifying and
/// testing edge cases of clients and servers that are impossible or
/// undesirable to test in *both* client and server implementations.
- appliesTo: AppliesTo,
+ appliesTo: AppliesTo
}
@private
list NonEmptyStringList {
- member: NonEmptyString,
+ member: NonEmptyString
}
@private
@@ -299,48 +299,47 @@ structure HttpMalformedRequestTestCase {
/// test cases can share the same ID.
@required
@pattern("^[A-Za-z_][A-Za-z0-9_]+$")
- id: String,
+ id: String
/// The name of the protocol to test.
@required
@idRef(selector: "[trait|protocolDefinition]", failWhenMissing: true)
- protocol: String,
+ protocol: String
/// The malformed request to send.
@required
- request: HttpMalformedRequestDefinition,
+ request: HttpMalformedRequestDefinition
/// The expected response.
@required
- response: HttpMalformedResponseDefinition,
+ response: HttpMalformedResponseDefinition
/// A description of the test and what is being asserted.
- documentation: String,
+ documentation: String
/// Applies a list of tags to the test.
- tags: NonEmptyStringList,
+ tags: NonEmptyStringList
/// An optional set of test parameters for parameterized testing.
- testParameters: HttpMalformedRequestTestParametersDefinition,
+ testParameters: HttpMalformedRequestTestParametersDefinition
}
@private
structure HttpMalformedRequestDefinition {
-
/// The HTTP request method.
@required
@length(min: 1)
- method: String,
+ method: String
/// The request-target of the HTTP request, not including
/// the query string (for example, "/foo/bar").
@required
@length(min: 1)
- uri: String,
+ uri: String
/// The host / endpoint provided to the client, not including the path
/// or scheme (for example, "example.com").
- host: String,
+ host: String
/// A list of the serialized query string parameters to include in the request.
///
@@ -352,37 +351,36 @@ structure HttpMalformedRequestDefinition {
/// the value MUST appear in the format in which it is expected
/// to be sent over the wire; if a key or value needs to be
/// percent-encoded, then it MUST appear percent-encoded in this list.
- queryParams: StringList,
+ queryParams: StringList
/// Defines a map of HTTP headers to include in the request
- headers: StringMap,
+ headers: StringMap
/// The HTTP message body to include in the request
- body: String,
+ body: String
}
@private
structure HttpMalformedResponseDefinition {
-
/// Defines a map of expected HTTP headers.
///
/// Headers that are not listed in this map are ignored.
- headers: StringMap,
+ headers: StringMap
/// Defines the HTTP response code.
@required
@range(min: 100, max: 599)
- code: Integer,
+ code: Integer
/// The expected response body.
- body: HttpMalformedResponseBodyDefinition,
+ body: HttpMalformedResponseBodyDefinition
}
@private
structure HttpMalformedResponseBodyDefinition {
/// The assertion to execute against the response body.
@required
- assertion: HttpMalformedResponseBodyAssertion,
+ assertion: HttpMalformedResponseBodyAssertion
/// The media type of the response body.
///
@@ -396,7 +394,7 @@ structure HttpMalformedResponseBodyDefinition {
union HttpMalformedResponseBodyAssertion {
/// Defines the expected serialized response body, which will be matched
/// exactly.
- contents: String,
+ contents: String
/// A regex to evaluate against the `message` field in the body. For
/// responses that may have some variance from platform to platform,
@@ -406,6 +404,6 @@ union HttpMalformedResponseBodyAssertion {
@private
map HttpMalformedRequestTestParametersDefinition {
- key: String,
+ key: String
value: StringList
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-malformed-request-features.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-malformed-request-features.smithy
index d9f042a0bb3..84cc8c818ae 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-malformed-request-features.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-malformed-request-features.smithy
@@ -11,109 +11,107 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpMalformedRequestTests([
{
- id: "bodyRegex",
- documentation: "Testing...",
- protocol: testProtocol,
+ id: "bodyRegex"
+ documentation: "Testing..."
+ protocol: testProtocol
request: {
- body: "Hi",
- headers: {"X-Foo": "baz"},
- host: "example.com",
- method: "POST",
- uri: "/",
+ body: "Hi"
+ headers: { "X-Foo": "baz" }
+ host: "example.com"
+ method: "POST"
+ uri: "/"
queryParams: ["foo=baz"]
- },
+ }
response: {
- code: 400,
- headers: {"X-Foo": "baz"},
+ code: 400
+ headers: { "X-Foo": "baz" }
body: {
- assertion: {
- messageRegex: "Invalid JSON: .*"
- },
+ assertion: { messageRegex: "Invalid JSON: .*" }
mediaType: "application/json"
}
- },
+ }
tags: ["foo", "bar"]
- },
+ }
{
- id: "body",
- documentation: "Testing...",
- protocol: testProtocol,
+ id: "body"
+ documentation: "Testing..."
+ protocol: testProtocol
request: {
- body: "Hi",
- headers: {"X-Foo": "baz"},
- host: "example.com",
- method: "POST",
- uri: "/",
+ body: "Hi"
+ headers: { "X-Foo": "baz" }
+ host: "example.com"
+ method: "POST"
+ uri: "/"
queryParams: ["foo=baz"]
- },
+ }
response: {
- code: 400,
- headers: {"X-Foo": "baz"},
+ code: 400
+ headers: { "X-Foo": "baz" }
body: {
assertion: {
contents: """
- {
- "message" : "Invalid JSON"
- }"""
- },
+ {
+ "message" : "Invalid JSON"
+ }"""
+ }
mediaType: "application/json"
}
- },
+ }
tags: ["foo", "bar"]
- },
+ }
{
- id: "noResponseBodyAssertion",
- documentation: "Testing...",
- protocol: testProtocol,
+ id: "noResponseBodyAssertion"
+ documentation: "Testing..."
+ protocol: testProtocol
request: {
- body: "Hi",
- headers: {"X-Foo": "baz"},
- host: "example.com",
- method: "POST",
- uri: "/",
+ body: "Hi"
+ headers: { "X-Foo": "baz" }
+ host: "example.com"
+ method: "POST"
+ uri: "/"
queryParams: ["foo=baz"]
- },
+ }
response: {
- code: 400,
- headers: {"X-Foo": "baz"}
- },
+ code: 400
+ headers: { "X-Foo": "baz" }
+ }
tags: ["foo", "bar"]
- },
+ }
{
- id: "parameterized",
- documentation: "Testing...",
- protocol: testProtocol,
+ id: "parameterized"
+ documentation: "Testing..."
+ protocol: testProtocol
request: {
- body: "$foo:L",
- headers: {"X-Foo": "baz"},
- host: "example.com",
- method: "POST",
- uri: "/",
+ body: "$foo:L"
+ headers: { "X-Foo": "baz" }
+ host: "example.com"
+ method: "POST"
+ uri: "/"
queryParams: ["foo=baz"]
- },
+ }
response: {
- code: 400,
- headers: {"X-Foo": "$bar:L"}
- },
- tags: ["foo", "bar"],
+ code: 400
+ headers: { "X-Foo": "$bar:L" }
+ }
+ tags: ["foo", "bar"]
testParameters: {
- "foo" : ["a", "b", "c"],
- "bar" : ["d", "e", "f"]
+ foo: ["a", "b", "c"]
+ bar: ["d", "e", "f"]
}
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
@input
structure SayHelloInput {
@httpPayload
- body: String,
+ body: String
@httpHeader("X-OmitMe")
- header: String,
+ header: String
}
@output
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-request-features.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-request-features.smithy
index f87146441b0..d4a5a7d462f 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-request-features.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-request-features.smithy
@@ -15,41 +15,38 @@ structure testScheme {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo",
- documentation: "Testing...",
- protocol: testProtocol,
- authScheme: testScheme,
- method: "POST",
- uri: "/",
- host: "example.com",
- resolvedHost: "prefix.example.com",
- queryParams: ["foo=baz"],
- forbidQueryParams: ["Nope"],
- requireQueryParams: ["Yap"],
- headers: {"X-Foo": "baz"},
- forbidHeaders: ["X-Nope"],
- requireHeaders: ["X-Yap"],
- body: "Hi",
- bodyMediaType: "text/plain",
- params: {
- body: "Hi",
- header: null,
- },
- vendorParams: {foo: "Bar"}
+ id: "foo"
+ documentation: "Testing..."
+ protocol: testProtocol
+ authScheme: testScheme
+ method: "POST"
+ uri: "/"
+ host: "example.com"
+ resolvedHost: "prefix.example.com"
+ queryParams: ["foo=baz"]
+ forbidQueryParams: ["Nope"]
+ requireQueryParams: ["Yap"]
+ headers: { "X-Foo": "baz" }
+ forbidHeaders: ["X-Nope"]
+ requireHeaders: ["X-Yap"]
+ body: "Hi"
+ bodyMediaType: "text/plain"
+ params: { body: "Hi", header: null }
+ vendorParams: { foo: "Bar" }
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
@input
structure SayHelloInput {
@httpPayload
- body: String,
+ body: String
@httpHeader("X-OmitMe")
- header: String,
+ header: String
}
@output
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-response-features.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-response-features.smithy
index 44493e6a382..1ef0a7fe52d 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-response-features.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/all-response-features.smithy
@@ -16,29 +16,22 @@ structure testScheme {}
@http(method: "GET", uri: "/")
@httpResponseTests([
{
- id: "foo2",
- protocol: testProtocol,
- authScheme: testScheme,
- code: 200,
- headers: {
- "X-Blah": "Blarg"
- },
- forbidHeaders: ["X-Nope"],
- requireHeaders: ["X-Yep"],
- body: "Baz",
- bodyMediaType: "text/plain",
- params: {
- bar: "Baz",
- blah: "Blarg"
- },
- vendorParams: {
- lorem: "ipsum"
- },
+ id: "foo2"
+ protocol: testProtocol
+ authScheme: testScheme
+ code: 200
+ headers: { "X-Blah": "Blarg" }
+ forbidHeaders: ["X-Nope"]
+ requireHeaders: ["X-Yep"]
+ body: "Baz"
+ bodyMediaType: "text/plain"
+ params: { bar: "Baz", blah: "Blarg" }
+ vendorParams: { lorem: "ipsum" }
documentation: "Hi"
}
])
operation GetFoo {
- input: GetFooInput,
+ input: GetFooInput
output: GetFooOutput
}
@@ -48,8 +41,8 @@ structure GetFooInput {}
@output
structure GetFooOutput {
@httpPayload
- bar: String,
+ bar: String
@httpHeader("X-Blah")
- blah: String,
+ blah: String
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-duplicate-ids.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-duplicate-ids.smithy
index 37b07493d27..9b1d7376c58 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-duplicate-ids.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-duplicate-ids.smithy
@@ -2,8 +2,8 @@ $version: "2.0"
namespace smithy.example
-use smithy.test#httpResponseTests
use smithy.test#httpRequestTests
+use smithy.test#httpResponseTests
@trait
@protocolDefinition
@@ -12,18 +12,20 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpResponseTests([
{
- id: "foo", // conflict with self and MyError
- protocol: testProtocol,
- code: 200,
- },
+ id: "foo"
+ // conflict with self and MyError
+ protocol: testProtocol
+ code: 200
+ }
{
- id: "foo", // conflict with self and MyError
- protocol: testProtocol,
- code: 200,
+ id: "foo"
+ // conflict with self and MyError
+ protocol: testProtocol
+ code: 200
}
])
operation SayGoodbye {
- input: SayGoodbyeInput,
+ input: SayGoodbyeInput
output: SayGoodbyeOutput
}
@@ -35,15 +37,17 @@ structure SayGoodbyeOutput {}
@httpResponseTests([
{
- id: "foo", // conflict with self and SayGoodbye
- protocol: testProtocol,
- code: 200,
- },
+ id: "foo"
+ // conflict with self and SayGoodbye
+ protocol: testProtocol
+ code: 200
+ }
{
- id: "baz", // no conflict
- protocol: testProtocol,
- code: 200,
- },
+ id: "baz"
+ // no conflict
+ protocol: testProtocol
+ code: 200
+ }
])
@error("client")
structure MyError {}
@@ -51,20 +55,22 @@ structure MyError {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo", // conflict with self and SayHello2
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- },
+ id: "foo"
+ // conflict with self and SayHello2
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ }
{
- id: "foo", // conflict with self and SayHello2
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- },
+ id: "foo"
+ // conflict with self and SayHello2
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ }
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
@@ -77,20 +83,22 @@ structure SayHelloOutput {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo", // conflict
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- },
+ id: "foo"
+ // conflict
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ }
{
- id: "baz", // no conflict
- protocol: testProtocol,
- method: "POST",
- uri: "/",
+ id: "baz"
+ // no conflict
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
}
])
operation SayHello2 {
- input: SayHello2Input,
+ input: SayHello2Input
output: SayHello2Output
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-parameters.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-parameters.smithy
index 3c931df0873..f114da86a1d 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-parameters.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-parameters.smithy
@@ -11,46 +11,44 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpMalformedRequestTests([
{
- id: "definesMismatchedTestParameters",
- documentation: "Testing...",
- protocol: testProtocol,
+ id: "definesMismatchedTestParameters"
+ documentation: "Testing..."
+ protocol: testProtocol
request: {
- body: "$foo:L",
- headers: {"X-Foo": "baz"},
- host: "example.com",
- method: "POST",
- uri: "/",
+ body: "$foo:L"
+ headers: { "X-Foo": "baz" }
+ host: "example.com"
+ method: "POST"
+ uri: "/"
queryParams: ["foo=baz"]
- },
+ }
response: {
- code: 400,
- headers: {"X-Foo": "baz"},
+ code: 400
+ headers: { "X-Foo": "baz" }
body: {
- assertion: {
- messageRegex: "Invalid JSON: $bar:L"
- },
+ assertion: { messageRegex: "Invalid JSON: $bar:L" }
mediaType: "application/json"
}
- },
- tags: ["foo", "bar"],
+ }
+ tags: ["foo", "bar"]
testParameters: {
- foo: ["a", "b", "c"],
+ foo: ["a", "b", "c"]
bar: ["d", "e"]
}
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
@input
structure SayHelloInput {
@httpPayload
- body: String,
+ body: String
@httpHeader("X-OmitMe")
- header: String,
+ header: String
}
@output
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-response.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-response.smithy
index ef3c281a98d..80b049f3c61 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-response.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-malformed-request-response.smithy
@@ -11,41 +11,39 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpMalformedRequestTests([
{
- id: "definesRegexButNotMediaType",
- documentation: "Testing...",
- protocol: testProtocol,
+ id: "definesRegexButNotMediaType"
+ documentation: "Testing..."
+ protocol: testProtocol
request: {
- body: "Hi",
- headers: {"X-Foo": "baz"},
- host: "example.com",
- method: "POST",
- uri: "/",
+ body: "Hi"
+ headers: { "X-Foo": "baz" }
+ host: "example.com"
+ method: "POST"
+ uri: "/"
queryParams: ["foo=baz"]
- },
+ }
response: {
- code: 400,
- headers: {"X-Foo": "baz"},
+ code: 400
+ headers: { "X-Foo": "baz" }
body: {
- assertion: {
- messageRegex: "Invalid JSON: .*"
- }
+ assertion: { messageRegex: "Invalid JSON: .*" }
}
- },
+ }
tags: ["foo", "bar"]
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
@input
structure SayHelloInput {
@httpPayload
- body: String,
+ body: String
@httpHeader("X-OmitMe")
- header: String,
+ header: String
}
@output
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-params.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-params.smithy
index 19b25713b31..273d3cd3355 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-params.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/detects-invalid-params.smithy
@@ -2,8 +2,8 @@ $version: "2.0"
namespace smithy.example
-use smithy.test#httpResponseTests
use smithy.test#httpRequestTests
+use smithy.test#httpResponseTests
@trait
@protocolDefinition
@@ -12,16 +12,14 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpResponseTests([
{
- id: "foo1",
- protocol: testProtocol,
- code: 200,
- params: {
- invalid: true
- }
+ id: "foo1"
+ protocol: testProtocol
+ code: 200
+ params: { invalid: true }
}
])
operation SayGoodbye {
- input: SayGoodbyeInput,
+ input: SayGoodbyeInput
output: SayGoodbyeOutput
}
@@ -33,33 +31,29 @@ structure SayGoodbyeOutput {}
@httpResponseTests([
{
- id: "foo2",
- protocol: testProtocol,
- code: 200,
- params: {
- foo: "Hi"
- }
+ id: "foo2"
+ protocol: testProtocol
+ code: 200
+ params: { foo: "Hi" }
}
])
@error("client")
structure MyError {
- foo: Integer,
+ foo: Integer
}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo3",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- badType: "hi"
- }
+ id: "foo3"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { badType: "hi" }
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-json.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-json.smithy
index ea968bde3db..699be72776a 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-json.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-json.smithy
@@ -11,24 +11,22 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo1",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- bodyMediaType: "application/json",
+ id: "foo1"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ bodyMediaType: "application/json"
body: """
- {
- "foo": "Oh no, we are missing a comma!"
- "bar": true
- }
- """
+ {
+ "foo": "Oh no, we are missing a comma!"
+ "bar": true
+ }
+ """
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml-with-dtd.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml-with-dtd.smithy
index bd2f40251b6..1847e191f0f 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml-with-dtd.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml-with-dtd.smithy
@@ -11,36 +11,34 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo1",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- bodyMediaType: "application/xml",
+ id: "foo1"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ bodyMediaType: "application/xml"
body: """
-
-
-
-
- ]>
-
-
- Foo
-
- Bar
- Baz
-
-
- requestid
-
- """
+
+
+
+
+ ]>
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+ requestid
+
+ """
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml.smithy
index 934c5b35c3f..38458cef9db 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/invalid-xml.smithy
@@ -11,30 +11,28 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo1",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- bodyMediaType: "application/xml",
+ id: "foo1"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ bodyMediaType: "application/xml"
body: """
-
-
- Foo
-
- Bar
- Baz
-
-
- requestid
-
- """
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+ requestid
+
+ """
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/missing-vendor-params-shape.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/missing-vendor-params-shape.smithy
index 8046026c7cf..fe122185fa6 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/missing-vendor-params-shape.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/missing-vendor-params-shape.smithy
@@ -11,21 +11,17 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo1",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- vendorParamsShape: missingVendorParamsStructure,
- vendorParams: {
- integer: 1,
- }
+ id: "foo1"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ vendorParamsShape: missingVendorParamsStructure
+ vendorParams: { integer: 1 }
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/test-case-on-error.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/test-case-on-error.smithy
index bcc8e6e021d..25d238677fa 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/test-case-on-error.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/test-case-on-error.smithy
@@ -12,18 +12,18 @@ structure testProtocol {}
@httpError(400)
@httpResponseTests([
{
- id: "invalid_greeting",
- protocol: testProtocol,
- params: {foo: "baz", message: "Hi"},
- code: 400,
- headers: {"X-Foo": "baz"},
- body: "{\"message\": \"Hi\"}",
- bodyMediaType: "application/json",
+ id: "invalid_greeting"
+ protocol: testProtocol
+ params: { foo: "baz", message: "Hi" }
+ code: 400
+ headers: { "X-Foo": "baz" }
+ body: "{\"message\": \"Hi\"}"
+ bodyMediaType: "application/json"
}
])
structure InvalidGreeting {
@httpHeader("X-Foo")
- foo: String,
+ foo: String
- message: String,
+ message: String
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/timestamp-validation.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/timestamp-validation.smithy
index 77ba378eda5..32bc5969ca4 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/timestamp-validation.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/timestamp-validation.smithy
@@ -11,23 +11,21 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo3",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- time: 946845296
- }
+ id: "foo3"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { time: 946845296 }
}
])
operation HasTime {
- input: HasTimeInput,
+ input: HasTimeInput
output: HasTimeOutput
}
@input
structure HasTimeInput {
- time: Timestamp,
+ time: Timestamp
}
@output
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-json.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-json.smithy
index c3dcb4699cf..033f394cc96 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-json.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-json.smithy
@@ -11,24 +11,22 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo1",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- bodyMediaType: "application/json",
+ id: "foo1"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ bodyMediaType: "application/json"
body: """
- {
- "foo": true,
- "bar": true
- }
- """
+ {
+ "foo": true,
+ "bar": true
+ }
+ """
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-xml.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-xml.smithy
index 16de560ea08..fd5bc065f66 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-xml.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/valid-xml.smithy
@@ -11,30 +11,28 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo1",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- bodyMediaType: "application/xml",
+ id: "foo1"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ bodyMediaType: "application/xml"
body: """
-
-
- Foo
-
- Bar
- Baz
-
-
- requestid
-
- """
+
+
+ Foo
+
+ Bar
+ Baz
+
+
+ requestid
+
+ """
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/vendor-params-validation.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/vendor-params-validation.smithy
index 9486fe6766d..7812a2d6695 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/vendor-params-validation.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/errorfiles/vendor-params-validation.smithy
@@ -2,8 +2,8 @@ $version: "2.0"
namespace smithy.example
-use smithy.test#httpResponseTests
use smithy.test#httpRequestTests
+use smithy.test#httpResponseTests
@trait
@protocolDefinition
@@ -12,25 +12,23 @@ structure testProtocol {}
@http(method: "POST", uri: "/")
@httpResponseTests([
{
- id: "foo1",
- protocol: testProtocol,
- code: 200,
- params: {},
- vendorParamsShape: emptyVendorParamsStructure,
- },
+ id: "foo1"
+ protocol: testProtocol
+ code: 200
+ params: {}
+ vendorParamsShape: emptyVendorParamsStructure
+ }
{
- id: "foo2",
- protocol: testProtocol,
- code: 200,
- params: {},
- vendorParamsShape: emptyVendorParamsStructure,
- vendorParams: {
- additional: true,
- }
+ id: "foo2"
+ protocol: testProtocol
+ code: 200
+ params: {}
+ vendorParamsShape: emptyVendorParamsStructure
+ vendorParams: { additional: true }
}
])
operation SayGoodbye {
- input: SayGoodbyeInput,
+ input: SayGoodbyeInput
output: SayGoodbyeOutput
}
@@ -42,56 +40,42 @@ structure SayGoodbyeOutput {}
@httpResponseTests([
{
- id: "foo3",
- protocol: testProtocol,
- code: 200,
- params: {
- foo: 1
- },
- vendorParamsShape: simpleVendorParamsStructure,
- vendorParams: {
- integer: 1,
- float: "Hi"
- }
+ id: "foo3"
+ protocol: testProtocol
+ code: 200
+ params: { foo: 1 }
+ vendorParamsShape: simpleVendorParamsStructure
+ vendorParams: { integer: 1, float: "Hi" }
}
])
@error("client")
structure MyError {
- foo: Integer,
+ foo: Integer
}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "foo5",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- vendorParamsShape: simpleVendorParamsStructure,
- vendorParams: {
- float: 1.2
- }
- },
+ id: "foo5"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ vendorParamsShape: simpleVendorParamsStructure
+ vendorParams: { float: 1.2 }
+ }
{
- id: "foo6",
- protocol: testProtocol,
- method: "POST",
- uri: "/",
- params: {
- type: true
- },
- vendorParamsShape: simpleVendorParamsStructure,
- vendorParams: {
- integer: 1,
- boolean: "Hi"
- }
+ id: "foo6"
+ protocol: testProtocol
+ method: "POST"
+ uri: "/"
+ params: { type: true }
+ vendorParamsShape: simpleVendorParamsStructure
+ vendorParams: { integer: 1, boolean: "Hi" }
}
])
operation SayHello {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayHelloOutput
}
@@ -107,9 +91,9 @@ structure emptyVendorParamsStructure {}
structure simpleVendorParamsStructure {
@required
- integer: Integer,
+ integer: Integer
- boolean: Boolean,
+ boolean: Boolean
- float: Float,
+ float: Float
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-goodbye.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-goodbye.smithy
index e286dabc9e1..d6ee5a6ec00 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-goodbye.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-goodbye.smithy
@@ -11,14 +11,11 @@ structure exampleProtocol {}
@http(method: "POST", uri: "/")
@httpResponseTests([
{
- id: "say_goodbye",
- protocol: exampleProtocol,
- params: {farewell: "Bye"},
- code: 200,
- headers: {
- "X-Farewell": "Bye",
- "Content-Length": "0"
- }
+ id: "say_goodbye"
+ protocol: exampleProtocol
+ params: { farewell: "Bye" }
+ code: 200
+ headers: { "X-Farewell": "Bye", "Content-Length": "0" }
}
])
operation SayGoodbye {
@@ -27,5 +24,5 @@ operation SayGoodbye {
structure SayGoodbyeOutput {
@httpHeader("X-Farewell")
- farewell: String,
+ farewell: String
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-hello.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-hello.smithy
index 09f967a797b..8a2bb730622 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-hello.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/say-hello.smithy
@@ -11,18 +11,13 @@ structure exampleProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "say_hello",
- protocol: exampleProtocol,
- params: {
- "greeting": "Hi",
- "name": "Teddy"
- },
- method: "POST",
- uri: "/",
- headers: {
- "X-Greeting": "Hi"
- },
- body: "{\"name\": \"Teddy\"}",
+ id: "say_hello"
+ protocol: exampleProtocol
+ params: { greeting: "Hi", name: "Teddy" }
+ method: "POST"
+ uri: "/"
+ headers: { "X-Greeting": "Hi" }
+ body: "{\"name\": \"Teddy\"}"
bodyMediaType: "application/json"
}
])
@@ -32,7 +27,7 @@ operation SayHello {
structure SayHelloInput {
@httpHeader("X-Greeting")
- greeting: String,
+ greeting: String
name: String
}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-appliesto.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-appliesto.smithy
index 56f56dca66c..df372d6db17 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-appliesto.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-appliesto.smithy
@@ -12,55 +12,56 @@ structure exampleProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "say_hello_all",
- protocol: exampleProtocol,
- params: {},
- method: "POST",
+ id: "say_hello_all"
+ protocol: exampleProtocol
+ params: {}
+ method: "POST"
uri: "/"
- },
+ }
{
- id: "say_hello_client",
- protocol: exampleProtocol,
- params: {},
- method: "POST",
- uri: "/",
+ id: "say_hello_client"
+ protocol: exampleProtocol
+ params: {}
+ method: "POST"
+ uri: "/"
appliesTo: "client"
- },
+ }
{
- id: "say_hello_server",
- protocol: exampleProtocol,
- params: {},
- method: "POST",
- uri: "/",
+ id: "say_hello_server"
+ protocol: exampleProtocol
+ params: {}
+ method: "POST"
+ uri: "/"
appliesTo: "server"
}
])
@httpResponseTests([
{
- id: "say_goodbye_all",
- protocol: exampleProtocol,
- params: {},
+ id: "say_goodbye_all"
+ protocol: exampleProtocol
+ params: {}
code: 200
- },
+ }
{
- id: "say_goodbye_client",
- protocol: exampleProtocol,
- params: {},
- code: 200,
+ id: "say_goodbye_client"
+ protocol: exampleProtocol
+ params: {}
+ code: 200
appliesTo: "client"
- },
+ }
{
- id: "say_goodbye_server",
- protocol: exampleProtocol,
- params: {},
- code: 200,
+ id: "say_goodbye_server"
+ protocol: exampleProtocol
+ params: {}
+ code: 200
appliesTo: "server"
}
])
operation SaySomething {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayGoodbyeOutput
}
structure SayHelloInput {}
+
structure SayGoodbyeOutput {}
diff --git a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-tags.smithy b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-tags.smithy
index adcff988c4b..eeb62bcb5e6 100644
--- a/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-tags.smithy
+++ b/smithy-protocol-test-traits/src/test/resources/software/amazon/smithy/protocoltests/traits/test-with-tags.smithy
@@ -12,27 +12,28 @@ structure exampleProtocol {}
@http(method: "POST", uri: "/")
@httpRequestTests([
{
- id: "say_hello",
- protocol: exampleProtocol,
- params: {},
- method: "POST",
- uri: "/",
- tags: ["foo", "bar"],
+ id: "say_hello"
+ protocol: exampleProtocol
+ params: {}
+ method: "POST"
+ uri: "/"
+ tags: ["foo", "bar"]
}
])
@httpResponseTests([
{
- id: "say_goodbye",
- protocol: exampleProtocol,
- params: {},
- code: 200,
- tags: ["baz", "qux"],
+ id: "say_goodbye"
+ protocol: exampleProtocol
+ params: {}
+ code: 200
+ tags: ["baz", "qux"]
}
])
operation SaySomething {
- input: SayHelloInput,
+ input: SayHelloInput
output: SayGoodbyeOutput
}
structure SayHelloInput {}
+
structure SayGoodbyeOutput {}
diff --git a/smithy-protocol-tests/build.gradle b/smithy-protocol-tests/build.gradle
index b27bd37cc58..7e7b94e46e1 100644
--- a/smithy-protocol-tests/build.gradle
+++ b/smithy-protocol-tests/build.gradle
@@ -24,6 +24,5 @@ dependencies {
tasks["sourcesJar"].dependsOn("smithyJarStaging")
smithy {
- format.set(false)
smithyBuildConfigs.set(project.files())
}
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/cbor-lists.smithy b/smithy-protocol-tests/model/rpcv2Cbor/cbor-lists.smithy
index be0817cfccf..be9e5a49ef2 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/cbor-lists.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/cbor-lists.smithy
@@ -1,11 +1,12 @@
// This file defines test cases that serialize lists in JSON documents.
-
$version: "2.0"
namespace smithy.protocoltests.rpcv2Cbor
-use smithy.protocoltests.shared#BooleanList
+use smithy.framework#ValidationException
+use smithy.protocols#rpcv2Cbor
use smithy.protocoltests.shared#BlobList
+use smithy.protocoltests.shared#BooleanList
use smithy.protocoltests.shared#FooEnumList
use smithy.protocoltests.shared#IntegerEnumList
use smithy.protocoltests.shared#IntegerList
@@ -15,10 +16,8 @@ use smithy.protocoltests.shared#SparseStringMap
use smithy.protocoltests.shared#StringList
use smithy.protocoltests.shared#StringSet
use smithy.protocoltests.shared#TimestampList
-use smithy.protocols#rpcv2Cbor
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
-use smithy.framework#ValidationException
/// This test case serializes JSON lists for the following cases for both
/// input and output:
@@ -29,389 +28,260 @@ use smithy.framework#ValidationException
/// 4. Lists of structures.
@idempotent
operation RpcV2CborLists {
- input: RpcV2CborListInputOutput,
- output: RpcV2CborListInputOutput,
- errors: [ValidationException]
+ input: RpcV2CborListInputOutput
+ output: RpcV2CborListInputOutput
+ errors: [
+ ValidationException
+ ]
}
apply RpcV2CborLists @httpRequestTests([
{
- id: "RpcV2CborLists",
- documentation: "Serializes RpcV2 Cbor lists",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborLists",
+ id: "RpcV2CborLists"
+ documentation: "Serializes RpcV2 Cbor lists"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborLists"
body: "v2pzdHJpbmdMaXN0gmNmb29jYmFyaXN0cmluZ1NldIJjZm9vY2JhcmtpbnRlZ2VyTGlzdIIBAmtib29sZWFuTGlzdIL19G10aW1lc3RhbXBMaXN0gsH7QdTX+/OAAADB+0HU1/vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYWEzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "stringList": [
- "foo",
- "bar"
- ],
- "stringSet": [
- "foo",
- "bar"
- ],
- "integerList": [
- 1,
- 2
- ],
- "booleanList": [
- true,
- false
- ],
- "timestampList": [
- 1398796238,
- 1398796238
- ],
- "enumList": [
- "Foo",
- "0"
- ],
- "intEnumList": [
- 1,
- 2
- ],
- "nestedStringList": [
- [
- "foo",
- "bar"
- ],
- [
- "baz",
- "qux"
- ]
- ],
- "structureList": [
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ structureList: [
{
- "a": "1",
- "b": "2"
- },
+ a: "1"
+ b: "2"
+ }
{
- "a": "3",
- "b": "4"
+ a: "3"
+ b: "4"
}
- ],
- "blobList" : [
- "foo",
- "bar"
]
+ blobList: ["foo", "bar"]
}
- },
+ }
{
- id: "RpcV2CborListsEmpty",
- documentation: "Serializes empty JSON lists",
+ id: "RpcV2CborListsEmpty"
+ documentation: "Serializes empty JSON lists"
tags: ["client-indefinite"]
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborLists",
- body: "v2pzdHJpbmdMaXN0n///",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborLists"
+ body: "v2pzdHJpbmdMaXN0n///"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
stringList: []
}
- },
+ }
{
- id: "RpcV2CborListsEmptyUsingDefiniteLength",
- documentation: "Serializes empty JSON definite length lists",
+ id: "RpcV2CborListsEmptyUsingDefiniteLength"
+ documentation: "Serializes empty JSON definite length lists"
tags: ["client-definite"]
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborLists",
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborLists"
body: "oWpzdHJpbmdMaXN0gA=="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
stringList: []
}
- },
+ }
{
- id: "RpcV2CborIndefiniteStringInsideIndefiniteList",
- documentation: "Can deserialize indefinite length text strings inside an indefinite length list",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborLists",
+ id: "RpcV2CborIndefiniteStringInsideIndefiniteList"
+ documentation: "Can deserialize indefinite length text strings inside an indefinite length list"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborLists"
body: "v2pzdHJpbmdMaXN0n394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n//8="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
stringList: ["An example indefinite string, which will be chunked, on each comma", "Another example indefinite string with only one chunk", "This is a plain string"]
}
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborIndefiniteStringInsideDefiniteList",
- documentation: "Can deserialize indefinite length text strings inside a definite length list",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborLists",
+ id: "RpcV2CborIndefiniteStringInsideDefiniteList"
+ documentation: "Can deserialize indefinite length text strings inside a definite length list"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborLists"
body: "oWpzdHJpbmdMaXN0g394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
stringList: ["An example indefinite string, which will be chunked, on each comma", "Another example indefinite string with only one chunk", "This is a plain string"]
- },
+ }
appliesTo: "server"
}
])
apply RpcV2CborLists @httpResponseTests([
{
- id: "RpcV2CborLists",
- documentation: "Serializes RpcV2 Cbor lists",
- protocol: rpcv2Cbor,
- code: 200,
+ id: "RpcV2CborLists"
+ documentation: "Serializes RpcV2 Cbor lists"
+ protocol: rpcv2Cbor
+ code: 200
body: "v2pzdHJpbmdMaXN0n2Nmb29jYmFy/2lzdHJpbmdTZXSfY2Zvb2NiYXL/a2ludGVnZXJMaXN0nwEC/2tib29sZWFuTGlzdJ/19P9tdGltZXN0YW1wTGlzdJ/B+0HU1/vzgAAAwftB1Nf784AAAP9oZW51bUxpc3SfY0Zvb2Ew/2tpbnRFbnVtTGlzdJ8BAv9wbmVzdGVkU3RyaW5nTGlzdJ+fY2Zvb2NiYXL/n2NiYXpjcXV4//9tc3RydWN0dXJlTGlzdJ+/YWFhMWFiYTL/v2FhYTNhYmE0//9oYmxvYkxpc3SfQ2Zvb0NiYXL//w=="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "stringList": [
- "foo",
- "bar"
- ],
- "stringSet": [
- "foo",
- "bar"
- ],
- "integerList": [
- 1,
- 2
- ],
- "booleanList": [
- true,
- false
- ],
- "timestampList": [
- 1398796238,
- 1398796238
- ],
- "enumList": [
- "Foo",
- "0"
- ],
- "intEnumList": [
- 1,
- 2
- ],
- "nestedStringList": [
- [
- "foo",
- "bar"
- ],
- [
- "baz",
- "qux"
- ]
- ],
- "structureList": [
+ stringList: ["foo", "bar"]
+ stringSet: ["foo", "bar"]
+ integerList: [1, 2]
+ booleanList: [true, false]
+ timestampList: [1398796238, 1398796238]
+ enumList: ["Foo", "0"]
+ intEnumList: [1, 2]
+ nestedStringList: [
+ ["foo", "bar"]
+ ["baz", "qux"]
+ ]
+ structureList: [
{
- "a": "1",
- "b": "2"
- },
+ a: "1"
+ b: "2"
+ }
{
- "a": "3",
- "b": "4"
+ a: "3"
+ b: "4"
}
- ],
- "blobList": [
- "foo",
- "bar"
]
+ blobList: ["foo", "bar"]
}
- },
+ }
{
- id: "RpcV2CborListsEmpty",
- documentation: "Serializes empty RpcV2 Cbor lists",
- protocol: rpcv2Cbor,
- code: 200,
- body: "v2pzdHJpbmdMaXN0n///",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborListsEmpty"
+ documentation: "Serializes empty RpcV2 Cbor lists"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "v2pzdHJpbmdMaXN0n///"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
stringList: []
}
- },
+ }
{
- id: "RpcV2CborIndefiniteStringInsideIndefiniteListCanDeserialize",
- documentation: "Can deserialize indefinite length text strings inside an indefinite length list",
- protocol: rpcv2Cbor,
- code: 200,
+ id: "RpcV2CborIndefiniteStringInsideIndefiniteListCanDeserialize"
+ documentation: "Can deserialize indefinite length text strings inside an indefinite length list"
+ protocol: rpcv2Cbor
+ code: 200
body: "v2pzdHJpbmdMaXN0n394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n//8="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
stringList: ["An example indefinite string, which will be chunked, on each comma", "Another example indefinite string with only one chunk", "This is a plain string"]
}
appliesTo: "client"
- },
+ }
{
- id: "RpcV2CborIndefiniteStringInsideDefiniteListCanDeserialize",
- documentation: "Can deserialize indefinite length text strings inside a definite length list",
- protocol: rpcv2Cbor,
- code: 200,
+ id: "RpcV2CborIndefiniteStringInsideDefiniteListCanDeserialize"
+ documentation: "Can deserialize indefinite length text strings inside a definite length list"
+ protocol: rpcv2Cbor
+ code: 200
body: "oWpzdHJpbmdMaXN0g394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
stringList: ["An example indefinite string, which will be chunked, on each comma", "Another example indefinite string with only one chunk", "This is a plain string"]
- },
+ }
appliesTo: "client"
}
])
structure RpcV2CborListInputOutput {
- stringList: StringList,
-
- stringSet: StringSet,
-
- integerList: IntegerList,
-
- booleanList: BooleanList,
-
- timestampList: TimestampList,
-
- enumList: FooEnumList,
-
- intEnumList: IntegerEnumList,
-
- nestedStringList: NestedStringList,
-
+ stringList: StringList
+ stringSet: StringSet
+ integerList: IntegerList
+ booleanList: BooleanList
+ timestampList: TimestampList
+ enumList: FooEnumList
+ intEnumList: IntegerEnumList
+ nestedStringList: NestedStringList
structureList: StructureList
-
blobList: BlobList
}
list StructureList {
- member: StructureListMember,
+ member: StructureListMember
}
structure StructureListMember {
- a: String,
- b: String,
+ a: String
+ b: String
}
-
@httpRequestTests([
{
id: "RpcV2CborSparseMapsSerializeNullValues"
documentation: "Serializes null values in maps"
protocol: rpcv2Cbor
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w=="
params: {
- "sparseStringMap": {
- "foo": null
- }
+ sparseStringMap: { foo: null }
}
method: "POST"
- uri: "/service/RpcV2Protocol/operation/SparseNullsOperation",
- },
+ uri: "/service/RpcV2Protocol/operation/SparseNullsOperation"
+ }
{
id: "RpcV2CborSparseListsSerializeNull"
documentation: "Serializes null values in lists"
protocol: rpcv2Cbor
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w=="
params: {
- "sparseStringList": [
- null
- ]
+ sparseStringList: [null]
}
method: "POST"
- uri: "/service/RpcV2Protocol/operation/SparseNullsOperation",
+ uri: "/service/RpcV2Protocol/operation/SparseNullsOperation"
}
])
@httpResponseTests([
{
id: "RpcV2CborSparseMapsDeserializeNullValues"
documentation: "Deserializes null values in maps"
- protocol: rpcv2Cbor,
- code: 200,
+ protocol: rpcv2Cbor
+ code: 200
body: "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w=="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseStringMap": {
- "foo": null
- }
+ sparseStringMap: { foo: null }
}
}
{
id: "RpcV2CborSparseListsDeserializeNull"
documentation: "Deserializes null values in lists"
- protocol: rpcv2Cbor,
- code: 200,
+ protocol: rpcv2Cbor
+ code: 200
body: "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w=="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseStringList": [
- null
- ]
+ sparseStringList: [null]
}
}
])
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy b/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy
index 93e05e0263d..b7e5234bfac 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/cbor-maps.smithy
@@ -2,448 +2,333 @@ $version: "2.0"
namespace smithy.protocoltests.rpcv2Cbor
-use smithy.protocoltests.shared#FooEnumMap
+use smithy.framework#ValidationException
+use smithy.protocols#rpcv2Cbor
use smithy.protocoltests.shared#GreetingStruct
use smithy.protocoltests.shared#SparseStringMap
use smithy.protocoltests.shared#StringSet
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
-use smithy.protocols#rpcv2Cbor
-use smithy.framework#ValidationException
/// The example tests basic map serialization.
operation RpcV2CborDenseMaps {
- input: RpcV2CborDenseMapsInputOutput,
- output: RpcV2CborDenseMapsInputOutput,
- errors: [ValidationException]
+ input: RpcV2CborDenseMapsInputOutput
+ output: RpcV2CborDenseMapsInputOutput
+ errors: [
+ ValidationException
+ ]
}
apply RpcV2CborDenseMaps @httpRequestTests([
{
- id: "RpcV2CborMaps",
- documentation: "Serializes maps",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps",
+ id: "RpcV2CborMaps"
+ documentation: "Serializes maps"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps"
body: "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ=="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "denseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
+ denseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RpcV2CborSerializesZeroValuesInMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps",
- body: "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RpcV2CborSerializesZeroValuesInMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps"
+ body: "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A=="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "denseNumberMap": {
- "x": 0
- },
- "denseBooleanMap": {
- "x": false
- }
+ denseNumberMap: { x: 0 }
+ denseBooleanMap: { x: false }
}
- },
+ }
{
- id: "RpcV2CborSerializesDenseSetMap",
- documentation: "A request that contains a dense map of sets.",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps",
- body: "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RpcV2CborSerializesDenseSetMap"
+ documentation: "A request that contains a dense map of sets."
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps"
+ body: "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "denseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ denseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
])
apply RpcV2CborDenseMaps @httpResponseTests([
{
- id: "RpcV2CborMaps",
- documentation: "Deserializes maps",
- protocol: rpcv2Cbor,
- code: 200,
- body: "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborMaps"
+ documentation: "Deserializes maps"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ=="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "denseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
+ denseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RpcV2CborDeserializesZeroValuesInMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: rpcv2Cbor,
- code: 200,
- body: "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborDeserializesZeroValuesInMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A=="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "denseNumberMap": {
- "x": 0
- },
- "denseBooleanMap": {
- "x": false
- }
+ denseNumberMap: { x: 0 }
+ denseBooleanMap: { x: false }
}
- },
+ }
{
- id: "RpcV2CborDeserializesDenseSetMap",
- documentation: "A response that contains a dense map of sets",
- protocol: rpcv2Cbor,
- code: 200,
- body: "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborDeserializesDenseSetMap"
+ documentation: "A response that contains a dense map of sets"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "denseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ denseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
{
- id: "RpcV2CborDeserializesDenseSetMapAndSkipsNull",
+ id: "RpcV2CborDeserializesDenseSetMapAndSkipsNull"
documentation: """
Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD
- drop the null key-value pair.""",
- protocol: rpcv2Cbor,
- appliesTo: "client",
- code: 200,
- body: "oWtkZW5zZVNldE1hcKNheIBheYJhYWFiYXr2",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ drop the null key-value pair."""
+ protocol: rpcv2Cbor
+ appliesTo: "client"
+ code: 200
+ body: "oWtkZW5zZVNldE1hcKNheIBheYJhYWFiYXr2"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "denseSetMap": {
- "x": [],
- "y": ["a", "b"],
- "z": null
+ denseSetMap: {
+ x: []
+ y: ["a", "b"]
+ z: null
}
}
}
])
structure RpcV2CborDenseMapsInputOutput {
- denseStructMap: DenseStructMap,
- denseNumberMap: DenseNumberMap,
- denseBooleanMap: DenseBooleanMap,
- denseStringMap: DenseStringMap,
- denseSetMap: DenseSetMap,
+ denseStructMap: DenseStructMap
+ denseNumberMap: DenseNumberMap
+ denseBooleanMap: DenseBooleanMap
+ denseStringMap: DenseStringMap
+ denseSetMap: DenseSetMap
}
map DenseStructMap {
- key: String,
+ key: String
value: GreetingStruct
}
map DenseBooleanMap {
- key: String,
+ key: String
value: Boolean
}
map DenseNumberMap {
- key: String,
+ key: String
value: Integer
}
map DenseStringMap {
- key: String,
+ key: String
value: String
}
map DenseSetMap {
- key: String,
+ key: String
value: StringSet
}
-
apply RpcV2CborSparseMaps @httpRequestTests([
{
- id: "RpcV2CborSparseMaps",
- documentation: "Serializes sparse maps",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps",
- body: "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RpcV2CborSparseMaps"
+ documentation: "Serializes sparse maps"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"
+ body: "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "sparseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
+ sparseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RpcV2CborSerializesNullMapValues",
- documentation: "Serializes null map values in sparse maps",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps",
+ id: "RpcV2CborSerializesNullMapValues"
+ documentation: "Serializes null map values in sparse maps"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"
body: "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "sparseBooleanMap": {
- "x": null
- },
- "sparseNumberMap": {
- "x": null
- },
- "sparseStringMap": {
- "x": null
- },
- "sparseStructMap": {
- "x": null
- }
+ sparseBooleanMap: { x: null }
+ sparseNumberMap: { x: null }
+ sparseStringMap: { x: null }
+ sparseStructMap: { x: null }
}
- },
+ }
{
- id: "RpcV2CborSerializesSparseSetMap",
- documentation: "A request that contains a sparse map of sets",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps",
+ id: "RpcV2CborSerializesSparseSetMap"
+ documentation: "A request that contains a sparse map of sets"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"
body: "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL///8="
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
{
- id: "RpcV2CborSerializesSparseSetMapAndRetainsNull",
- documentation: "A request that contains a sparse map of sets.",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps",
- body: "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RpcV2CborSerializesSparseSetMapAndRetainsNull"
+ documentation: "A request that contains a sparse map of sets."
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"
+ body: "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"],
- "z": null
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
+ z: null
}
}
- },
+ }
{
- id: "RpcV2CborSerializesZeroValuesInSparseMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps",
+ id: "RpcV2CborSerializesZeroValuesInSparseMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"
body: "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
- "sparseNumberMap": {
- "x": 0
- },
- "sparseBooleanMap": {
- "x": false
- }
+ sparseNumberMap: { x: 0 }
+ sparseBooleanMap: { x: false }
}
}
])
apply RpcV2CborSparseMaps @httpResponseTests([
{
- id: "RpcV2CborSparseJsonMaps",
- documentation: "Deserializes sparse maps",
- protocol: rpcv2Cbor,
- code: 200,
- body: "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborSparseJsonMaps"
+ documentation: "Deserializes sparse maps"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseStructMap": {
- "foo": {
- "hi": "there"
- },
- "baz": {
- "hi": "bye"
- }
+ sparseStructMap: {
+ foo: { hi: "there" }
+ baz: { hi: "bye" }
}
}
- },
+ }
{
- id: "RpcV2CborDeserializesNullMapValues",
- documentation: "Deserializes null map values",
- protocol: rpcv2Cbor,
- code: 200,
+ id: "RpcV2CborDeserializesNullMapValues"
+ documentation: "Deserializes null map values"
+ protocol: rpcv2Cbor
+ code: 200
body: "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseBooleanMap": {
- "x": null
- },
- "sparseNumberMap": {
- "x": null
- },
- "sparseStringMap": {
- "x": null
- },
- "sparseStructMap": {
- "x": null
- }
+ sparseBooleanMap: { x: null }
+ sparseNumberMap: { x: null }
+ sparseStringMap: { x: null }
+ sparseStructMap: { x: null }
}
- },
+ }
{
- id: "RpcV2CborDeserializesSparseSetMap",
- documentation: "A response that contains a sparse map of sets",
- protocol: rpcv2Cbor,
- code: 200,
- body: "v2xzcGFyc2VTZXRNYXC/YXmfYWFhYv9heJ////8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborDeserializesSparseSetMap"
+ documentation: "A response that contains a sparse map of sets"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "v2xzcGFyc2VTZXRNYXC/YXmfYWFhYv9heJ////8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"]
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
}
}
- },
+ }
{
- id: "RpcV2CborDeserializesSparseSetMapAndRetainsNull",
- documentation: "A response that contains a sparse map of sets with a null",
- protocol: rpcv2Cbor,
- code: 200,
- body: "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborDeserializesSparseSetMapAndRetainsNull"
+ documentation: "A response that contains a sparse map of sets with a null"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseSetMap": {
- "x": [],
- "y": ["a", "b"],
- "z": null
+ sparseSetMap: {
+ x: []
+ y: ["a", "b"]
+ z: null
}
}
- },
+ }
{
- id: "RpcV2CborDeserializesZeroValuesInSparseMaps",
- documentation: "Ensure that 0 and false are sent over the wire in all maps and lists",
- protocol: rpcv2Cbor,
- code: 200,
+ id: "RpcV2CborDeserializesZeroValuesInSparseMaps"
+ documentation: "Ensure that 0 and false are sent over the wire in all maps and lists"
+ protocol: rpcv2Cbor
+ code: 200
body: "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
- "sparseNumberMap": {
- "x": 0
- },
- "sparseBooleanMap": {
- "x": false
- }
+ sparseNumberMap: { x: 0 }
+ sparseBooleanMap: { x: false }
}
}
])
@@ -451,37 +336,39 @@ apply RpcV2CborSparseMaps @httpResponseTests([
operation RpcV2CborSparseMaps {
input: RpcV2CborSparseMapsInputOutput
output: RpcV2CborSparseMapsInputOutput
- errors: [ValidationException]
+ errors: [
+ ValidationException
+ ]
}
structure RpcV2CborSparseMapsInputOutput {
- sparseStructMap: SparseStructMap,
- sparseNumberMap: SparseNumberMap,
- sparseBooleanMap: SparseBooleanMap,
- sparseStringMap: SparseStringMap,
- sparseSetMap: SparseSetMap,
+ sparseStructMap: SparseStructMap
+ sparseNumberMap: SparseNumberMap
+ sparseBooleanMap: SparseBooleanMap
+ sparseStringMap: SparseStringMap
+ sparseSetMap: SparseSetMap
}
@sparse
map SparseStructMap {
- key: String,
+ key: String
value: GreetingStruct
}
@sparse
map SparseBooleanMap {
- key: String,
+ key: String
value: Boolean
}
@sparse
map SparseNumberMap {
- key: String,
+ key: String
value: Integer
}
@sparse
map SparseSetMap {
- key: String,
+ key: String
value: StringSet
}
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/cbor-structs.smithy b/smithy-protocol-tests/model/rpcv2Cbor/cbor-structs.smithy
index 3bb58462aeb..54374a8aa27 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/cbor-structs.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/cbor-structs.smithy
@@ -8,466 +8,275 @@ use smithy.test#httpResponseTests
@httpRequestTests([
{
- id: "RpcV2CborSimpleScalarProperties",
- protocol: rpcv2Cbor,
- documentation: "Serializes simple scalar properties",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborSimpleScalarProperties"
+ protocol: rpcv2Cbor
+ documentation: "Serializes simple scalar properties"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w=="
- params: {
- byteValue: 5,
- doubleValue: 1.889,
- falseBooleanValue: false,
- floatValue: 7.624,
- integerValue: 256,
- longValue: 9873,
- shortValue: 9898,
- stringValue: "simple",
- trueBooleanValue: true,
- blobValue: "foo"
- }
- },
+ params: { byteValue: 5, doubleValue: 1.889, falseBooleanValue: false, floatValue: 7.624, integerValue: 256, longValue: 9873, shortValue: 9898, stringValue: "simple", trueBooleanValue: true, blobValue: "foo" }
+ }
{
- id: "RpcV2CborSimpleScalarPropertiesUsingIndefiniteLength",
- protocol: rpcv2Cbor,
+ id: "RpcV2CborSimpleScalarPropertiesUsingIndefiniteLength"
+ protocol: rpcv2Cbor
documentation: """
The server should be capable of deserializing simple scalar properties
encoded using a map with a definite length. The server should also be able to parse
- a key encoded using an indefinite length string.""",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ a key encoded using an indefinite length string."""
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "qmlieXRlVmFsdWUFf2Zkb3VibGVlVmFsdWX/+z/+OVgQYk3Tf2VmYWxzZWdCb29sZWFuZVZhbHVl//RqZmxvYXRWYWx1ZfpA8/fPbGludGVnZXJWYWx1ZRkBAGlsb25nVmFsdWUZJpFqc2hvcnRWYWx1ZRkmqn9mc3RyaW5nZVZhbHVl/2ZzaW1wbGVwdHJ1ZUJvb2xlYW5WYWx1ZfVpYmxvYlZhbHVlQ2Zvbw=="
- params: {
- byteValue: 5,
- doubleValue: 1.889,
- falseBooleanValue: false,
- floatValue: 7.624,
- integerValue: 256,
- longValue: 9873,
- shortValue: 9898,
- stringValue: "simple",
- trueBooleanValue: true,
- blobValue: "foo"
- },
+ params: { byteValue: 5, doubleValue: 1.889, falseBooleanValue: false, floatValue: 7.624, integerValue: 256, longValue: 9873, shortValue: 9898, stringValue: "simple", trueBooleanValue: true, blobValue: "foo" }
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborClientDoesntSerializeNullStructureValues",
- documentation: "RpcV2 Cbor should not serialize null structure values",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
- body: "v/8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- params: {
- stringValue: null
- },
+ id: "RpcV2CborClientDoesntSerializeNullStructureValues"
+ documentation: "RpcV2 Cbor should not serialize null structure values"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
+ body: "v/8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ params: { stringValue: null }
appliesTo: "client"
- },
+ }
{
- id: "RpcV2CborServerDoesntDeSerializeNullStructureValues",
- documentation: "RpcV2 Cbor should not deserialize null structure values",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
- body: "v2tzdHJpbmdWYWx1Zfb/",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- params: {},
+ id: "RpcV2CborServerDoesntDeSerializeNullStructureValues"
+ documentation: "RpcV2 Cbor should not deserialize null structure values"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
+ body: "v2tzdHJpbmdWYWx1Zfb/"
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ params: {}
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborSupportsNaNFloatInputs",
- protocol: rpcv2Cbor,
- documentation: "Supports handling NaN float values.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborSupportsNaNFloatInputs"
+ protocol: rpcv2Cbor
+ documentation: "Supports handling NaN float values."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/"
- params: {
- doubleValue: "NaN",
- floatValue: "NaN"
- }
- },
+ params: { doubleValue: "NaN", floatValue: "NaN" }
+ }
{
- id: "RpcV2CborSupportsInfinityFloatInputs",
- protocol: rpcv2Cbor,
- documentation: "Supports handling Infinity float values.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborSupportsInfinityFloatInputs"
+ protocol: rpcv2Cbor
+ documentation: "Supports handling Infinity float values."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/"
- params: {
- doubleValue: "Infinity",
- floatValue: "Infinity"
- }
- },
+ params: { doubleValue: "Infinity", floatValue: "Infinity" }
+ }
{
- id: "RpcV2CborSupportsNegativeInfinityFloatInputs",
- protocol: rpcv2Cbor,
- documentation: "Supports handling Infinity float values.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborSupportsNegativeInfinityFloatInputs"
+ protocol: rpcv2Cbor
+ documentation: "Supports handling Infinity float values."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/"
- params: {
- doubleValue: "-Infinity",
- floatValue: "-Infinity"
- }
- },
+ params: { doubleValue: "-Infinity", floatValue: "-Infinity" }
+ }
{
- id: "RpcV2CborIndefiniteLengthStringsCanBeDeserialized",
- protocol: rpcv2Cbor,
- documentation: "The server should be capable of deserializing indefinite length text strings.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborIndefiniteLengthStringsCanBeDeserialized"
+ protocol: rpcv2Cbor
+ documentation: "The server should be capable of deserializing indefinite length text strings."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "oWtzdHJpbmdWYWx1ZX94HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcscSBjaHVua2VkIG9uIGNvbW1h/w=="
- params: {
- stringValue: "An example indefinite string, chunked on comma"
- },
+ params: { stringValue: "An example indefinite string, chunked on comma" }
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborIndefiniteLengthByteStringsCanBeDeserialized",
- protocol: rpcv2Cbor,
- documentation: "The server should be capable of deserializing indefinite length byte strings.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborIndefiniteLengthByteStringsCanBeDeserialized"
+ protocol: rpcv2Cbor
+ documentation: "The server should be capable of deserializing indefinite length byte strings."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "oWlibG9iVmFsdWVfWCJBbiBleGFtcGxlIGluZGVmaW5pdGUtYnl0ZSBzdHJpbmcsUSBjaHVua2VkIG9uIGNvbW1h/w=="
- params: {
- blobValue: "An example indefinite-byte string, chunked on comma"
- },
+ params: { blobValue: "An example indefinite-byte string, chunked on comma" }
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborSupportsUpcastingData",
- protocol: rpcv2Cbor,
- documentation: "Supports upcasting from a smaller byte representation of the same data type.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
+ id: "RpcV2CborSupportsUpcastingData"
+ protocol: rpcv2Cbor
+ documentation: "Supports upcasting from a smaller byte representation of the same data type."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
body: "v2tkb3VibGVWYWx1Zfk+AGpmbG9hdFZhbHVl+UegbGludGVnZXJWYWx1ZRg4aWxvbmdWYWx1ZRkBAGpzaG9ydFZhbHVlCv8="
- params: {
- doubleValue: 1.5,
- floatValue: 7.625,
- integerValue: 56,
- longValue: 256,
- shortValue: 10
- },
+ params: { doubleValue: 1.5, floatValue: 7.625, integerValue: 56, longValue: 256, shortValue: 10 }
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByServers",
- protocol: rpcv2Cbor,
+ id: "RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByServers"
+ protocol: rpcv2Cbor
documentation: """
The server should skip over additional fields that are not part of the structure. This allows a
client generated against a newer Smithy model to be able to communicate with a server that is
- generated against an older Smithy model.""",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- requireHeaders: [
- "Content-Length"
- ],
- method: "POST",
- bodyMediaType: "application/cbor",
- uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties",
- body: "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989rZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==",
- params: {
- byteValue: 5,
- doubleValue: 1.889,
- falseBooleanValue: false,
- floatValue: 7.624,
- integerValue: 256,
- longValue: 9873,
- shortValue: 9898,
- stringValue: "simple",
- trueBooleanValue: true,
- blobValue: "foo"
- },
+ generated against an older Smithy model."""
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ method: "POST"
+ bodyMediaType: "application/cbor"
+ uri: "/service/RpcV2Protocol/operation/SimpleScalarProperties"
+ body: "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989rZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w=="
+ params: { byteValue: 5, doubleValue: 1.889, falseBooleanValue: false, floatValue: 7.624, integerValue: 256, longValue: 9873, shortValue: 9898, stringValue: "simple", trueBooleanValue: true, blobValue: "foo" }
appliesTo: "server"
}
])
@httpResponseTests([
{
- id: "RpcV2CborSimpleScalarProperties",
- protocol: rpcv2Cbor,
- documentation: "Serializes simple scalar properties",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- bodyMediaType: "application/cbor",
+ id: "RpcV2CborSimpleScalarProperties"
+ protocol: rpcv2Cbor
+ documentation: "Serializes simple scalar properties"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ bodyMediaType: "application/cbor"
body: "v3B0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb2//"
- code: 200,
- params: {
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 5,
- doubleValue: 1.889,
- floatValue: 7.624,
- integerValue: 256,
- shortValue: 9898,
- stringValue: "simple",
- blobValue: "foo"
- }
- },
+ code: 200
+ params: { trueBooleanValue: true, falseBooleanValue: false, byteValue: 5, doubleValue: 1.889, floatValue: 7.624, integerValue: 256, shortValue: 9898, stringValue: "simple", blobValue: "foo" }
+ }
{
- id: "RpcV2CborSimpleScalarPropertiesUsingDefiniteLength",
- protocol: rpcv2Cbor,
- documentation: "Deserializes simple scalar properties encoded using a map with definite length",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- bodyMediaType: "application/cbor",
+ id: "RpcV2CborSimpleScalarPropertiesUsingDefiniteLength"
+ protocol: rpcv2Cbor
+ documentation: "Deserializes simple scalar properties encoded using a map with definite length"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ bodyMediaType: "application/cbor"
body: "qXB0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb28="
- code: 200,
- params: {
- trueBooleanValue: true,
- falseBooleanValue: false,
- byteValue: 5,
- doubleValue: 1.889,
- floatValue: 7.624,
- integerValue: 256,
- shortValue: 9898,
- stringValue: "simple",
- blobValue: "foo"
- },
+ code: 200
+ params: { trueBooleanValue: true, falseBooleanValue: false, byteValue: 5, doubleValue: 1.889, floatValue: 7.624, integerValue: 256, shortValue: 9898, stringValue: "simple", blobValue: "foo" }
appliesTo: "client"
- },
+ }
{
- id: "RpcV2CborClientDoesntDeserializeNullStructureValues",
- documentation: "RpcV2 Cbor should not deserialize null structure values",
- protocol: rpcv2Cbor,
- body: "v2tzdHJpbmdWYWx1Zfb/",
- code: 200,
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
+ id: "RpcV2CborClientDoesntDeserializeNullStructureValues"
+ documentation: "RpcV2 Cbor should not deserialize null structure values"
+ protocol: rpcv2Cbor
+ body: "v2tzdHJpbmdWYWx1Zfb/"
+ code: 200
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {}
appliesTo: "client"
- },
+ }
{
- id: "RpcV2CborServerDoesntSerializeNullStructureValues",
- documentation: "RpcV2 Cbor should not serialize null structure values",
- protocol: rpcv2Cbor,
- body: "v/8=",
- code: 200,
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- params: {
- stringValue: null
- },
+ id: "RpcV2CborServerDoesntSerializeNullStructureValues"
+ documentation: "RpcV2 Cbor should not serialize null structure values"
+ protocol: rpcv2Cbor
+ body: "v/8="
+ code: 200
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ params: { stringValue: null }
appliesTo: "server"
- },
+ }
{
- id: "RpcV2CborSupportsNaNFloatOutputs",
- protocol: rpcv2Cbor,
- documentation: "Supports handling NaN float values.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- code: 200,
- bodyMediaType: "application/cbor",
+ id: "RpcV2CborSupportsNaNFloatOutputs"
+ protocol: rpcv2Cbor
+ documentation: "Supports handling NaN float values."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
body: "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/"
- params: {
- doubleValue: "NaN",
- floatValue: "NaN"
- }
- },
+ params: { doubleValue: "NaN", floatValue: "NaN" }
+ }
{
- id: "RpcV2CborSupportsInfinityFloatOutputs",
- protocol: rpcv2Cbor,
- documentation: "Supports handling Infinity float values.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- code: 200,
- bodyMediaType: "application/cbor",
+ id: "RpcV2CborSupportsInfinityFloatOutputs"
+ protocol: rpcv2Cbor
+ documentation: "Supports handling Infinity float values."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
body: "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/"
- params: {
- doubleValue: "Infinity",
- floatValue: "Infinity"
- }
- },
+ params: { doubleValue: "Infinity", floatValue: "Infinity" }
+ }
{
- id: "RpcV2CborSupportsNegativeInfinityFloatOutputs",
- protocol: rpcv2Cbor,
- documentation: "Supports handling Negative Infinity float values.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- code: 200,
- bodyMediaType: "application/cbor",
+ id: "RpcV2CborSupportsNegativeInfinityFloatOutputs"
+ protocol: rpcv2Cbor
+ documentation: "Supports handling Negative Infinity float values."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
body: "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/"
- params: {
- doubleValue: "-Infinity",
- floatValue: "-Infinity"
- }
- },
+ params: { doubleValue: "-Infinity", floatValue: "-Infinity" }
+ }
{
- id: "RpcV2CborSupportsUpcastingDataOnDeserialize",
- protocol: rpcv2Cbor,
- documentation: "Supports upcasting from a smaller byte representation of the same data type.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- code: 200,
- bodyMediaType: "application/cbor",
+ id: "RpcV2CborSupportsUpcastingDataOnDeserialize"
+ protocol: rpcv2Cbor
+ documentation: "Supports upcasting from a smaller byte representation of the same data type."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
body: "v2tkb3VibGVWYWx1Zfk+AGpmbG9hdFZhbHVl+UegbGludGVnZXJWYWx1ZRg4aWxvbmdWYWx1ZRkBAGpzaG9ydFZhbHVlCv8="
- params: {
- doubleValue: 1.5,
- floatValue: 7.625,
- integerValue: 56,
- longValue: 256,
- shortValue: 10
- },
+ params: { doubleValue: 1.5, floatValue: 7.625, integerValue: 56, longValue: 256, shortValue: 10 }
appliesTo: "client"
- },
+ }
{
- id: "RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByClients",
- protocol: rpcv2Cbor,
+ id: "RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByClients"
+ protocol: rpcv2Cbor
documentation: """
The client should skip over additional fields that are not part of the structure. This allows a
client generated against an older Smithy model to be able to communicate with a server that is
- generated against a newer Smithy model.""",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- code: 200,
- bodyMediaType: "application/cbor",
- body: "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989rZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==",
- params: {
- byteValue: 5,
- doubleValue: 1.889,
- falseBooleanValue: false,
- floatValue: 7.624,
- integerValue: 256,
- longValue: 9873,
- shortValue: 9898,
- stringValue: "simple",
- trueBooleanValue: true,
- blobValue: "foo"
- },
+ generated against a newer Smithy model."""
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
+ body: "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989rZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w=="
+ params: { byteValue: 5, doubleValue: 1.889, falseBooleanValue: false, floatValue: 7.624, integerValue: 256, longValue: 9873, shortValue: 9898, stringValue: "simple", trueBooleanValue: true, blobValue: "foo" }
appliesTo: "client"
}
])
operation SimpleScalarProperties {
- input: SimpleScalarStructure,
+ input: SimpleScalarStructure
output: SimpleScalarStructure
}
apply RecursiveShapes @httpRequestTests([
{
- id: "RpcV2CborRecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: rpcv2Cbor,
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/RecursiveShapes",
- body: "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ id: "RpcV2CborRecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: rpcv2Cbor
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/RecursiveShapes"
+ body: "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
@@ -477,62 +286,52 @@ apply RecursiveShapes @httpRequestTests([
apply RecursiveShapes @httpResponseTests([
{
- id: "RpcV2CborRecursiveShapes",
- documentation: "Serializes recursive structures",
- protocol: rpcv2Cbor,
- code: 200,
- body: "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborRecursiveShapes"
+ documentation: "Serializes recursive structures"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
}
- },
+ }
{
- id: "RpcV2CborRecursiveShapesUsingDefiniteLength",
- documentation: "Deserializes recursive structures encoded using a map with definite length",
- protocol: rpcv2Cbor,
- code: 200,
+ id: "RpcV2CborRecursiveShapesUsingDefiniteLength"
+ documentation: "Deserializes recursive structures encoded using a map with definite length"
+ protocol: rpcv2Cbor
+ code: 200
body: "oWZuZXN0ZWSiY2Zvb2RGb28xZm5lc3RlZKJjYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyomNmb29kRm9vMmZuZXN0ZWShY2JhcmRCYXIy"
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: {
nested: {
- foo: "Foo1",
+ foo: "Foo1"
nested: {
- bar: "Bar1",
+ bar: "Bar1"
recursiveMember: {
- foo: "Foo2",
- nested: {
- bar: "Bar2"
- }
+ foo: "Foo2"
+ nested: { bar: "Bar2" }
}
}
}
- },
+ }
appliesTo: "client"
}
])
operation RecursiveShapes {
- input: RecursiveShapesInputOutput,
+ input: RecursiveShapesInputOutput
output: RecursiveShapesInputOutput
}
@@ -541,24 +340,24 @@ structure RecursiveShapesInputOutput {
}
structure RecursiveShapesInputOutputNested1 {
- foo: String,
+ foo: String
nested: RecursiveShapesInputOutputNested2
}
structure RecursiveShapesInputOutputNested2 {
- bar: String,
- recursiveMember: RecursiveShapesInputOutputNested1,
+ bar: String
+ recursiveMember: RecursiveShapesInputOutputNested1
}
structure SimpleScalarStructure {
- trueBooleanValue: Boolean,
- falseBooleanValue: Boolean,
- byteValue: Byte,
- doubleValue: Double,
- floatValue: Float,
- integerValue: Integer,
- longValue: Long,
- shortValue: Short,
- stringValue: String,
+ trueBooleanValue: Boolean
+ falseBooleanValue: Boolean
+ byteValue: Byte
+ doubleValue: Double
+ floatValue: Float
+ integerValue: Integer
+ longValue: Long
+ shortValue: Short
+ stringValue: String
blobValue: Blob
}
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/defaults.smithy b/smithy-protocol-tests/model/rpcv2Cbor/defaults.smithy
index a62f26b836e..8b55ffb35e0 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/defaults.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/defaults.smithy
@@ -2,10 +2,10 @@ $version: "2.0"
namespace smithy.protocoltests.rpcv2Cbor
+use smithy.framework#ValidationException
use smithy.protocols#rpcv2Cbor
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
-use smithy.framework#ValidationException
apply OperationWithDefaults @httpRequestTests([
{
@@ -15,14 +15,9 @@ apply OperationWithDefaults @httpRequestTests([
appliesTo: "client"
tags: ["defaults"]
method: "POST"
- uri: "/service/RpcV2Protocol/operation/OperationWithDefaults",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ uri: "/service/RpcV2Protocol/operation/OperationWithDefaults"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
bodyMediaType: "application/cbor"
body: "v21kZWZhdWx0U3RyaW5nYmhpbmRlZmF1bHRCb29sZWFu9WtkZWZhdWx0TGlzdIBwZGVmYXVsdFRpbWVzdGFtcMH7AAAAAAAAAABrZGVmYXVsdEJsb2JDYWJja2RlZmF1bHRCeXRlAWxkZWZhdWx0U2hvcnQBbmRlZmF1bHRJbnRlZ2VyCmtkZWZhdWx0TG9uZxhkbGRlZmF1bHRGbG9hdPo/gAAAbWRlZmF1bHREb3VibGX7P/AAAAAAAABqZGVmYXVsdE1hcKBrZGVmYXVsdEVudW1jRk9PbmRlZmF1bHRJbnRFbnVtAWtlbXB0eVN0cmluZ2BsZmFsc2VCb29sZWFu9GllbXB0eUJsb2JAaHplcm9CeXRlAGl6ZXJvU2hvcnQAa3plcm9JbnRlZ2VyAGh6ZXJvTG9uZwBpemVyb0Zsb2F0+gAAAABqemVyb0RvdWJsZfsAAAAAAAAAAP8="
params: {
@@ -37,17 +32,11 @@ apply OperationWithDefaults @httpRequestTests([
protocol: rpcv2Cbor
method: "POST"
bodyMediaType: "application/cbor"
- uri: "/service/RpcV2Protocol/operation/OperationWithDefaults",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ uri: "/service/RpcV2Protocol/operation/OperationWithDefaults"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v/8="
- params: {
- }
+ params: {}
}
{
id: "RpcV2CborClientUsesExplicitlyProvidedMemberValuesOverDefaults"
@@ -57,39 +46,34 @@ apply OperationWithDefaults @httpRequestTests([
protocol: rpcv2Cbor
method: "POST"
bodyMediaType: "application/cbor"
- uri: "/service/RpcV2Protocol/operation/OperationWithDefaults",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ uri: "/service/RpcV2Protocol/operation/OperationWithDefaults"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v2hkZWZhdWx0c7dtZGVmYXVsdFN0cmluZ2NieWVuZGVmYXVsdEJvb2xlYW71a2RlZmF1bHRMaXN0gWFhcGRlZmF1bHRUaW1lc3RhbXDB+z/wAAAAAAAAa2RlZmF1bHRCbG9iQmhpa2RlZmF1bHRCeXRlAmxkZWZhdWx0U2hvcnQCbmRlZmF1bHRJbnRlZ2VyFGtkZWZhdWx0TG9uZxjIbGRlZmF1bHRGbG9hdPpAAAAAbWRlZmF1bHREb3VibGX7QAAAAAAAAABqZGVmYXVsdE1hcKFkbmFtZWRKYWNra2RlZmF1bHRFbnVtY0JBUm5kZWZhdWx0SW50RW51bQJrZW1wdHlTdHJpbmdjZm9vbGZhbHNlQm9vbGVhbvVpZW1wdHlCbG9iQmhpaHplcm9CeXRlAWl6ZXJvU2hvcnQBa3plcm9JbnRlZ2VyAWh6ZXJvTG9uZwFpemVyb0Zsb2F0+j+AAABqemVyb0RvdWJsZfs/8AAAAAAAAP8="
params: {
defaults: {
- defaultString: "bye",
- defaultBoolean: true,
- defaultList: ["a"],
- defaultTimestamp: 1,
- defaultBlob: "hi",
- defaultByte: 2,
- defaultShort: 2,
- defaultInteger: 20,
- defaultLong: 200,
- defaultFloat: 2.0,
- defaultDouble: 2.0,
- defaultMap: {name: "Jack"},
- defaultEnum: "BAR",
- defaultIntEnum: 2,
- emptyString: "foo",
- falseBoolean: true,
- emptyBlob: "hi",
- zeroByte: 1,
- zeroShort: 1,
- zeroInteger: 1,
- zeroLong: 1,
- zeroFloat: 1.0,
+ defaultString: "bye"
+ defaultBoolean: true
+ defaultList: ["a"]
+ defaultTimestamp: 1
+ defaultBlob: "hi"
+ defaultByte: 2
+ defaultShort: 2
+ defaultInteger: 20
+ defaultLong: 200
+ defaultFloat: 2.0
+ defaultDouble: 2.0
+ defaultMap: { name: "Jack" }
+ defaultEnum: "BAR"
+ defaultIntEnum: 2
+ emptyString: "foo"
+ falseBoolean: true
+ emptyBlob: "hi"
+ zeroByte: 1
+ zeroShort: 1
+ zeroInteger: 1
+ zeroLong: 1
+ zeroFloat: 1.0
zeroDouble: 1.0
}
}
@@ -102,42 +86,37 @@ apply OperationWithDefaults @httpRequestTests([
protocol: rpcv2Cbor
method: "POST"
bodyMediaType: "application/cbor"
- uri: "/service/RpcV2Protocol/operation/OperationWithDefaults",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ uri: "/service/RpcV2Protocol/operation/OperationWithDefaults"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v2hkZWZhdWx0c6D/"
params: {
defaults: {
- defaultString: "hi",
- defaultBoolean: true,
- defaultList: [],
- defaultTimestamp: 0,
- defaultBlob: "abc",
- defaultByte: 1,
- defaultShort: 1,
- defaultInteger: 10,
- defaultLong: 100,
- defaultFloat: 1.0,
- defaultDouble: 1.0,
- defaultMap: {},
- defaultEnum: "FOO",
- defaultIntEnum: 1,
- emptyString: "",
- falseBoolean: false,
- emptyBlob: "",
- zeroByte: 0,
- zeroShort: 0,
- zeroInteger: 0,
- zeroLong: 0,
- zeroFloat: 0.0,
+ defaultString: "hi"
+ defaultBoolean: true
+ defaultList: []
+ defaultTimestamp: 0
+ defaultBlob: "abc"
+ defaultByte: 1
+ defaultShort: 1
+ defaultInteger: 10
+ defaultLong: 100
+ defaultFloat: 1.0
+ defaultDouble: 1.0
+ defaultMap: {}
+ defaultEnum: "FOO"
+ defaultIntEnum: 1
+ emptyString: ""
+ falseBoolean: false
+ emptyBlob: ""
+ zeroByte: 0
+ zeroShort: 0
+ zeroInteger: 0
+ zeroLong: 0
+ zeroFloat: 0.0
zeroDouble: 0.0
- },
- topLevelDefault: "hi",
+ }
+ topLevelDefault: "hi"
otherTopLevelDefault: 0
}
}
@@ -149,19 +128,11 @@ apply OperationWithDefaults @httpRequestTests([
protocol: rpcv2Cbor
method: "POST"
bodyMediaType: "application/cbor"
- uri: "/service/RpcV2Protocol/operation/OperationWithDefaults",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ uri: "/service/RpcV2Protocol/operation/OperationWithDefaults"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v290b3BMZXZlbERlZmF1bHRiaGl0b3RoZXJUb3BMZXZlbERlZmF1bHQA/w=="
- params: {
- topLevelDefault: "hi",
- otherTopLevelDefault: 0
- }
+ params: { topLevelDefault: "hi", otherTopLevelDefault: 0 }
}
{
id: "RpcV2CborClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional"
@@ -171,14 +142,9 @@ apply OperationWithDefaults @httpRequestTests([
protocol: rpcv2Cbor
method: "POST"
bodyMediaType: "application/cbor"
- uri: "/service/RpcV2Protocol/operation/OperationWithDefaults",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
+ uri: "/service/RpcV2Protocol/operation/OperationWithDefaults"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
body: "v3ZjbGllbnRPcHRpb25hbERlZmF1bHRzoP8="
params: {
clientOptionalDefaults: {}
@@ -195,10 +161,7 @@ apply OperationWithDefaults @httpResponseTests([
protocol: rpcv2Cbor
code: 200
bodyMediaType: "application/cbor"
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
body: "v/8="
params: {
defaultString: "hi"
@@ -234,34 +197,31 @@ apply OperationWithDefaults @httpResponseTests([
protocol: rpcv2Cbor
code: 200
bodyMediaType: "application/cbor"
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
body: "v21kZWZhdWx0U3RyaW5nY2J5ZW5kZWZhdWx0Qm9vbGVhbvRrZGVmYXVsdExpc3SBYWFwZGVmYXVsdFRpbWVzdGFtcMH7QAAAAAAAAABrZGVmYXVsdEJsb2JCaGlrZGVmYXVsdEJ5dGUCbGRlZmF1bHRTaG9ydAJuZGVmYXVsdEludGVnZXIUa2RlZmF1bHRMb25nGMhsZGVmYXVsdEZsb2F0+kAAAABtZGVmYXVsdERvdWJsZftAAAAAAAAAAGpkZWZhdWx0TWFwoWRuYW1lZEphY2trZGVmYXVsdEVudW1jQkFSbmRlZmF1bHRJbnRFbnVtAmtlbXB0eVN0cmluZ2Nmb29sZmFsc2VCb29sZWFu9WllbXB0eUJsb2JCaGloemVyb0J5dGUBaXplcm9TaG9ydAFremVyb0ludGVnZXIBaHplcm9Mb25nAWl6ZXJvRmxvYXT6P4AAAGp6ZXJvRG91Ymxl+z/wAAAAAAAA/w=="
params: {
- defaultString: "bye",
- defaultBoolean: false,
- defaultList: ["a"],
- defaultTimestamp: 2,
- defaultBlob: "hi",
- defaultByte: 2,
- defaultShort: 2,
- defaultInteger: 20,
- defaultLong: 200,
- defaultFloat: 2.0,
- defaultDouble: 2.0,
- defaultMap: {name: "Jack"},
- defaultEnum: "BAR",
- defaultIntEnum: 2,
- emptyString: "foo",
- falseBoolean: true,
- emptyBlob: "hi",
- zeroByte: 1,
- zeroShort: 1,
- zeroInteger: 1,
- zeroLong: 1,
- zeroFloat: 1.0,
+ defaultString: "bye"
+ defaultBoolean: false
+ defaultList: ["a"]
+ defaultTimestamp: 2
+ defaultBlob: "hi"
+ defaultByte: 2
+ defaultShort: 2
+ defaultInteger: 20
+ defaultLong: 200
+ defaultFloat: 2.0
+ defaultDouble: 2.0
+ defaultMap: { name: "Jack" }
+ defaultEnum: "BAR"
+ defaultIntEnum: 2
+ emptyString: "foo"
+ falseBoolean: true
+ emptyBlob: "hi"
+ zeroByte: 1
+ zeroShort: 1
+ zeroInteger: 1
+ zeroLong: 1
+ zeroFloat: 1.0
zeroDouble: 1.0
}
}
@@ -273,10 +233,7 @@ apply OperationWithDefaults @httpResponseTests([
protocol: rpcv2Cbor
code: 200
bodyMediaType: "application/cbor"
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
body: "v21kZWZhdWx0U3RyaW5nYmhpbmRlZmF1bHRCb29sZWFu9WtkZWZhdWx0TGlzdIBwZGVmYXVsdFRpbWVzdGFtcMH7AAAAAAAAAABrZGVmYXVsdEJsb2JDYWJja2RlZmF1bHRCeXRlAWxkZWZhdWx0U2hvcnQBbmRlZmF1bHRJbnRlZ2VyCmtkZWZhdWx0TG9uZxhkbGRlZmF1bHRGbG9hdPo/gAAAbWRlZmF1bHREb3VibGX7P/AAAAAAAABqZGVmYXVsdE1hcKBrZGVmYXVsdEVudW1jRk9PbmRlZmF1bHRJbnRFbnVtAWtlbXB0eVN0cmluZ2BsZmFsc2VCb29sZWFu9GllbXB0eUJsb2JAaHplcm9CeXRlAGl6ZXJvU2hvcnQAa3plcm9JbnRlZ2VyAGh6ZXJvTG9uZwBpemVyb0Zsb2F0+gAAAABqemVyb0RvdWJsZfsAAAAAAAAAAP8="
params: {}
}
@@ -285,14 +242,19 @@ apply OperationWithDefaults @httpResponseTests([
operation OperationWithDefaults {
input := {
defaults: Defaults
+
clientOptionalDefaults: ClientOptionalDefaults
+
topLevelDefault: String = "hi" // Client should ignore default values in input shape
+
otherTopLevelDefault: Integer = 0
}
output := with [DefaultsMixin] {}
- errors: [ValidationException]
+ errors: [
+ ValidationException
+ ]
}
structure Defaults with [DefaultsMixin] {}
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/empty-input-output.smithy b/smithy-protocol-tests/model/rpcv2Cbor/empty-input-output.smithy
index c753e062df5..81183b61e52 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/empty-input-output.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/empty-input-output.smithy
@@ -6,218 +6,165 @@ use smithy.protocols#rpcv2Cbor
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
-
@httpRequestTests([
{
- id: "no_input",
- protocol: rpcv2Cbor,
- documentation: "Body is empty and no Content-Type header if no input",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- },
- forbidHeaders: [
- "Content-Type",
- "X-Amz-Target"
- ]
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/NoInputOutput",
+ id: "no_input"
+ protocol: rpcv2Cbor
+ documentation: "Body is empty and no Content-Type header if no input"
+ headers: { "smithy-protocol": "rpc-v2-cbor" }
+ forbidHeaders: ["Content-Type", "X-Amz-Target"]
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/NoInputOutput"
body: ""
- },
+ }
{
- id: "NoInputServerAllowsEmptyCbor",
- protocol: rpcv2Cbor,
- documentation: "Servers should accept CBOR empty struct if no input.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Accept": "application/cbor",
- "Content-Type": "application/cbor"
- }
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/NoInputOutput",
- body: "v/8=",
+ id: "NoInputServerAllowsEmptyCbor"
+ protocol: rpcv2Cbor
+ documentation: "Servers should accept CBOR empty struct if no input."
+ headers: { "smithy-protocol": "rpc-v2-cbor", Accept: "application/cbor", "Content-Type": "application/cbor" }
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/NoInputOutput"
+ body: "v/8="
appliesTo: "server"
- },
+ }
{
- id: "NoInputServerAllowsEmptyBody",
- protocol: rpcv2Cbor,
+ id: "NoInputServerAllowsEmptyBody"
+ protocol: rpcv2Cbor
documentation: """
Servers should accept an empty body if there is no input. Additionally,
they should not raise an error if the `Accept` header is set."""
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Accept": "application/cbor",
- "Content-Type": "application/cbor"
- }
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/NoInputOutput",
- body: "",
+ headers: { "smithy-protocol": "rpc-v2-cbor", Accept: "application/cbor", "Content-Type": "application/cbor" }
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/NoInputOutput"
+ body: ""
appliesTo: "server"
}
])
@httpResponseTests([
{
- id: "no_output",
- protocol: rpcv2Cbor,
- documentation: "A `Content-Type` header should not be set if the response body is empty.",
- body: "",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- },
- forbidHeaders: [
- "Content-Type"
- ]
- code: 200,
- },
+ id: "no_output"
+ protocol: rpcv2Cbor
+ documentation: "A `Content-Type` header should not be set if the response body is empty."
+ body: ""
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor" }
+ forbidHeaders: ["Content-Type"]
+ code: 200
+ }
{
- id: "NoOutputClientAllowsEmptyCbor",
- protocol: rpcv2Cbor,
- documentation: "Clients should accept a CBOR empty struct if there is no output.",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- code: 200,
- bodyMediaType: "application/cbor",
- body: "v/8=",
- appliesTo: "client",
- },
+ id: "NoOutputClientAllowsEmptyCbor"
+ protocol: rpcv2Cbor
+ documentation: "Clients should accept a CBOR empty struct if there is no output."
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
+ body: "v/8="
+ appliesTo: "client"
+ }
{
- id: "NoOutputClientAllowsEmptyBody",
- protocol: rpcv2Cbor,
+ id: "NoOutputClientAllowsEmptyBody"
+ protocol: rpcv2Cbor
documentation: """
Clients should accept an empty body if there is no output and
- should not raise an error if the `Content-Type` header is set.""",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- code: 200,
- bodyMediaType: "application/cbor",
- body: "",
- appliesTo: "client",
+ should not raise an error if the `Content-Type` header is set."""
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ bodyMediaType: "application/cbor"
+ body: ""
+ appliesTo: "client"
}
])
operation NoInputOutput {}
-
@httpRequestTests([
{
- id: "empty_input",
- protocol: rpcv2Cbor,
- documentation: "When Input structure is empty we write CBOR equivalent of {}",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- requireHeaders: [
- "Content-Length"
- ],
- forbidHeaders: [
- "X-Amz-Target"
- ]
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/EmptyInputOutput",
- bodyMediaType: "application/cbor",
- body: "v/8=",
- },
+ id: "empty_input"
+ protocol: rpcv2Cbor
+ documentation: "When Input structure is empty we write CBOR equivalent of {}"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ requireHeaders: ["Content-Length"]
+ forbidHeaders: ["X-Amz-Target"]
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/EmptyInputOutput"
+ bodyMediaType: "application/cbor"
+ body: "v/8="
+ }
{
- id: "empty_input_no_body",
- protocol: rpcv2Cbor,
- documentation: "When Input structure is empty the server should accept an empty body",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/EmptyInputOutput",
- bodyMediaType: "application/cbor",
- body: "",
+ id: "empty_input_no_body"
+ protocol: rpcv2Cbor
+ documentation: "When Input structure is empty the server should accept an empty body"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/EmptyInputOutput"
+ bodyMediaType: "application/cbor"
+ body: ""
appliesTo: "server"
- },
+ }
{
- id: "empty_input_no_body_has_accept",
- protocol: rpcv2Cbor,
+ id: "empty_input_no_body_has_accept"
+ protocol: rpcv2Cbor
documentation: """
When input structure, is empty the server should accept an empty body
- even if the Accept header is set.""",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Accept": "application/cbor",
- "Content-Type": "application/cbor"
- },
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/EmptyInputOutput",
- bodyMediaType: "application/cbor",
- body: "",
+ even if the Accept header is set."""
+ headers: { "smithy-protocol": "rpc-v2-cbor", Accept: "application/cbor", "Content-Type": "application/cbor" }
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/EmptyInputOutput"
+ bodyMediaType: "application/cbor"
+ body: ""
appliesTo: "server"
- },
+ }
])
@httpResponseTests([
{
- id: "empty_output",
- protocol: rpcv2Cbor,
- documentation: "When output structure is empty we write CBOR equivalent of {}",
- body: "v/8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- code: 200,
- },
+ id: "empty_output"
+ protocol: rpcv2Cbor
+ documentation: "When output structure is empty we write CBOR equivalent of {}"
+ body: "v/8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ }
{
- id: "empty_output_no_body",
- protocol: rpcv2Cbor,
- documentation: "When output structure is empty the client should accept an empty body",
- body: "",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- code: 200,
+ id: "empty_output_no_body"
+ protocol: rpcv2Cbor
+ documentation: "When output structure is empty the client should accept an empty body"
+ body: ""
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
appliesTo: "client"
- },
+ }
])
operation EmptyInputOutput {
- input: EmptyStructure,
+ input: EmptyStructure
output: EmptyStructure
}
@httpRequestTests([
{
- id: "optional_input",
- protocol: rpcv2Cbor,
- documentation: "When input is empty we write CBOR equivalent of {}",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- forbidHeaders: [
- "X-Amz-Target"
- ]
- method: "POST",
- uri: "/service/RpcV2Protocol/operation/OptionalInputOutput",
- bodyMediaType: "application/cbor",
- body: "v/8=",
- },
+ id: "optional_input"
+ protocol: rpcv2Cbor
+ documentation: "When input is empty we write CBOR equivalent of {}"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ forbidHeaders: ["X-Amz-Target"]
+ method: "POST"
+ uri: "/service/RpcV2Protocol/operation/OptionalInputOutput"
+ bodyMediaType: "application/cbor"
+ body: "v/8="
+ }
])
@httpResponseTests([
{
- id: "optional_output",
- protocol: rpcv2Cbor,
- documentation: "When output is empty we write CBOR equivalent of {}",
- body: "v/8=",
- bodyMediaType: "application/cbor",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- }
- code: 200,
- },
+ id: "optional_output"
+ protocol: rpcv2Cbor
+ documentation: "When output is empty we write CBOR equivalent of {}"
+ body: "v/8="
+ bodyMediaType: "application/cbor"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ code: 200
+ }
])
operation OptionalInputOutput {
- input: SimpleStructure,
+ input: SimpleStructure
output: SimpleStructure
}
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/errors.smithy b/smithy-protocol-tests/model/rpcv2Cbor/errors.smithy
index d9f0c17832d..339b9142a65 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/errors.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/errors.smithy
@@ -2,9 +2,8 @@ $version: "2.0"
namespace smithy.protocoltests.rpcv2Cbor
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
use smithy.protocols#rpcv2Cbor
+use smithy.test#httpResponseTests
/// This operation has three possible return values:
///
@@ -16,77 +15,67 @@ use smithy.protocols#rpcv2Cbor
/// properly deserialize successful and error responses.
@idempotent
operation GreetingWithErrors {
- output: GreetingWithErrorsOutput,
- errors: [InvalidGreeting, ComplexError]
+ output: GreetingWithErrorsOutput
+ errors: [
+ InvalidGreeting
+ ComplexError
+ ]
}
structure GreetingWithErrorsOutput {
- greeting: String,
+ greeting: String
}
/// This error is thrown when an invalid greeting value is provided.
@error("client")
structure InvalidGreeting {
- Message: String,
+ Message: String
}
apply InvalidGreeting @httpResponseTests([
{
- id: "RpcV2CborInvalidGreetingError",
- documentation: "Parses simple RpcV2 Cbor errors",
- protocol: rpcv2Cbor,
- params: {
- Message: "Hi"
- },
- code: 400,
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- body: "v2ZfX3R5cGV4LnNtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNJbnZhbGlkR3JlZXRpbmdnTWVzc2FnZWJIaf8=",
- bodyMediaType: "application/cbor",
- },
+ id: "RpcV2CborInvalidGreetingError"
+ documentation: "Parses simple RpcV2 Cbor errors"
+ protocol: rpcv2Cbor
+ params: { Message: "Hi" }
+ code: 400
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ body: "v2ZfX3R5cGV4LnNtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNJbnZhbGlkR3JlZXRpbmdnTWVzc2FnZWJIaf8="
+ bodyMediaType: "application/cbor"
+ }
])
/// This error is thrown when a request is invalid.
@error("client")
structure ComplexError {
- TopLevel: String,
- Nested: ComplexNestedErrorData,
+ TopLevel: String
+ Nested: ComplexNestedErrorData
}
structure ComplexNestedErrorData {
- Foo: String,
+ Foo: String
}
apply ComplexError @httpResponseTests([
{
- id: "RpcV2CborComplexError",
- documentation: "Parses a complex error with no message member",
- protocol: rpcv2Cbor,
+ id: "RpcV2CborComplexError"
+ documentation: "Parses a complex error with no message member"
+ protocol: rpcv2Cbor
params: {
- TopLevel: "Top level",
- Nested: {
- Foo: "bar"
- }
- },
- code: 400,
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- body: "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3JoVG9wTGV2ZWxpVG9wIGxldmVsZk5lc3RlZL9jRm9vY2Jhcv//",
+ TopLevel: "Top level"
+ Nested: { Foo: "bar" }
+ }
+ code: 400
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ body: "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3JoVG9wTGV2ZWxpVG9wIGxldmVsZk5lc3RlZL9jRm9vY2Jhcv//"
bodyMediaType: "application/cbor"
- },
+ }
{
- id: "RpcV2CborEmptyComplexError",
- protocol: rpcv2Cbor,
- code: 400,
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
- body: "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3L/",
+ id: "RpcV2CborEmptyComplexError"
+ protocol: rpcv2Cbor
+ code: 400
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
+ body: "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3L/"
bodyMediaType: "application/cbor"
- },
+ }
])
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/fractional-seconds.smithy b/smithy-protocol-tests/model/rpcv2Cbor/fractional-seconds.smithy
index faad52e9015..6ce7ee53cc6 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/fractional-seconds.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/fractional-seconds.smithy
@@ -14,17 +14,14 @@ operation FractionalSeconds {
apply FractionalSeconds @httpResponseTests([
{
- id: "RpcV2CborDateTimeWithFractionalSeconds",
- documentation: "Ensures that clients can correctly parse timestamps with fractional seconds",
- protocol: rpcv2Cbor,
- code: 200,
- body: "v2hkYXRldGltZcH7Qcw32zgPvnf/",
- headers: {
- "smithy-protocol": "rpc-v2-cbor",
- "Content-Type": "application/cbor"
- },
+ id: "RpcV2CborDateTimeWithFractionalSeconds"
+ documentation: "Ensures that clients can correctly parse timestamps with fractional seconds"
+ protocol: rpcv2Cbor
+ code: 200
+ body: "v2hkYXRldGltZcH7Qcw32zgPvnf/"
+ headers: { "smithy-protocol": "rpc-v2-cbor", "Content-Type": "application/cbor" }
params: { datetime: 946845296.123 }
- bodyMediaType: "application/cbor",
+ bodyMediaType: "application/cbor"
appliesTo: "client"
}
])
diff --git a/smithy-protocol-tests/model/rpcv2Cbor/main.smithy b/smithy-protocol-tests/model/rpcv2Cbor/main.smithy
index 9d10e723e56..355a06becd5 100644
--- a/smithy-protocol-tests/model/rpcv2Cbor/main.smithy
+++ b/smithy-protocol-tests/model/rpcv2Cbor/main.smithy
@@ -3,33 +3,29 @@ $version: "2.0"
namespace smithy.protocoltests.rpcv2Cbor
use smithy.protocols#rpcv2Cbor
-use smithy.test#httpRequestTests
-use smithy.test#httpResponseTests
@rpcv2Cbor
@title("RpcV2 Protocol Service")
service RpcV2Protocol {
- version: "2020-07-14",
+ version: "2020-07-14"
operations: [
- NoInputOutput,
- EmptyInputOutput,
- OptionalInputOutput,
- SimpleScalarProperties,
- RpcV2CborLists,
- RpcV2CborDenseMaps,
- RpcV2CborSparseMaps,
- RecursiveShapes,
- GreetingWithErrors,
- FractionalSeconds,
- OperationWithDefaults,
+ NoInputOutput
+ EmptyInputOutput
+ OptionalInputOutput
+ SimpleScalarProperties
+ RpcV2CborLists
+ RpcV2CborDenseMaps
+ RpcV2CborSparseMaps
+ RecursiveShapes
+ GreetingWithErrors
+ FractionalSeconds
+ OperationWithDefaults
SparseNullsOperation
]
}
-structure EmptyStructure {
-
-}
+structure EmptyStructure {}
structure SimpleStructure {
- value: String,
+ value: String
}
diff --git a/smithy-protocol-tests/model/shared-types.smithy b/smithy-protocol-tests/model/shared-types.smithy
index 5340018ccd6..aade70fe76b 100644
--- a/smithy-protocol-tests/model/shared-types.smithy
+++ b/smithy-protocol-tests/model/shared-types.smithy
@@ -4,13 +4,12 @@
// should be defined in this file. However, things like input or output
// structures or other test-case specific shapes should be defined closer to
// the test case and in its same file.
-
$version: "2.0"
namespace smithy.protocoltests.shared
list StringList {
- member: String,
+ member: String
}
@sparse
@@ -20,113 +19,114 @@ list SparseStringList {
@uniqueItems
list StringSet {
- member: String,
+ member: String
}
map StringMap {
- key: String,
- value: String,
+ key: String
+ value: String
}
map StringListMap {
- key: String,
+ key: String
value: StringList
}
@sparse
map SparseStringMap {
- key: String,
- value: String,
+ key: String
+ value: String
}
/// A list of lists of strings.
list NestedStringList {
- member: StringList,
+ member: StringList
}
list ShortList {
- member: Short,
+ member: Short
}
list IntegerList {
- member: Integer,
+ member: Integer
}
@uniqueItems
list IntegerSet {
- member: Integer,
+ member: Integer
}
list FloatList {
- member: Float,
+ member: Float
}
list DoubleList {
- member: Double,
+ member: Double
}
list BooleanList {
- member: Boolean,
+ member: Boolean
}
@uniqueItems
list BooleanSet {
- member: Boolean,
+ member: Boolean
}
list TimestampList {
- member: Timestamp,
+ member: Timestamp
}
list BlobList {
- member: Blob,
+ member: Blob
}
@uniqueItems
list BlobSet {
- member: Blob,
+ member: Blob
}
list ByteList {
- member: Byte,
+ member: Byte
}
@uniqueItems
list ByteSet {
- member: Byte,
+ member: Byte
}
+
@uniqueItems
list ShortSet {
- member: Short,
+ member: Short
}
@uniqueItems
list LongList {
- member: Long,
+ member: Long
}
@uniqueItems
list LongSet {
- member: Long,
+ member: Long
}
@uniqueItems
list TimestampSet {
- member: Timestamp,
+ member: Timestamp
}
list DateTimeList {
- member: DateTime,
+ member: DateTime
}
@uniqueItems
list DateTimeSet {
- member: DateTime,
+ member: DateTime
}
@uniqueItems
list HttpDateSet {
- member: HttpDate,
+ member: HttpDate
}
@uniqueItems
@@ -158,17 +158,17 @@ enum FooEnum {
}
list FooEnumList {
- member: FooEnum,
+ member: FooEnum
}
@uniqueItems
list FooEnumSet {
- member: FooEnum,
+ member: FooEnum
}
map FooEnumMap {
- key: String,
- value: FooEnum,
+ key: String
+ value: FooEnum
}
@timestampFormat("date-time")
@@ -210,6 +210,6 @@ list IntegerEnumSet {
}
map IntegerEnumMap {
- key: String,
+ key: String
value: IntegerEnum
}
diff --git a/smithy-protocol-traits/src/main/resources/META-INF/smithy/smithy.protocols.rpcv2.smithy b/smithy-protocol-traits/src/main/resources/META-INF/smithy/smithy.protocols.rpcv2.smithy
index 68c672b7b27..61be2db72f4 100644
--- a/smithy-protocol-traits/src/main/resources/META-INF/smithy/smithy.protocols.rpcv2.smithy
+++ b/smithy-protocol-traits/src/main/resources/META-INF/smithy/smithy.protocols.rpcv2.smithy
@@ -9,16 +9,13 @@ use smithy.api#httpError
/// An RPC-based protocol that serializes CBOR payloads.
@trait(selector: "service")
-@protocolDefinition(traits: [
- cors
- endpoint
- hostLabel
- httpError
-])
+@protocolDefinition(
+ traits: [cors, endpoint, hostLabel, httpError]
+)
@traitValidators(
"rpcv2Cbor.NoDocuments": {
- selector: "service ~> member :test(> document)"
- message: "This protocol does not support document types"
+ selector: "service ~> member :test(> document)"
+ message: "This protocol does not support document types"
}
)
structure rpcv2Cbor {
diff --git a/smithy-protocol-traits/src/test/resources/software/amazon/smithy/protocol/traits/errorfiles/eventStreamHttp-matches-http.smithy b/smithy-protocol-traits/src/test/resources/software/amazon/smithy/protocol/traits/errorfiles/eventStreamHttp-matches-http.smithy
index 5f0968710e5..6e1f3db56d8 100644
--- a/smithy-protocol-traits/src/test/resources/software/amazon/smithy/protocol/traits/errorfiles/eventStreamHttp-matches-http.smithy
+++ b/smithy-protocol-traits/src/test/resources/software/amazon/smithy/protocol/traits/errorfiles/eventStreamHttp-matches-http.smithy
@@ -4,37 +4,43 @@ namespace smithy.example
use smithy.protocols#rpcv2Cbor
-@rpcv2Cbor(http: ["h2", "http/1.1"], eventStreamHttp: ["h2"])
-service ValidService1 {
- version: "2023-02-10"
-}
-
-@rpcv2Cbor(http: ["h2"], eventStreamHttp: ["h2"])
-service ValidService2 {
- version: "2023-02-10"
-}
-
-@rpcv2Cbor(http: [], eventStreamHttp: [])
-service ValidService3 {
- version: "2023-02-10"
-}
-
-@rpcv2Cbor(http: ["http/1.1"], eventStreamHttp: [])
-service ValidService4 {
- version: "2023-02-10"
-}
-
-@rpcv2Cbor(eventStreamHttp: ["http/1.1"])
-service InvalidService1 {
- version: "2023-02-10"
-}
-
-@rpcv2Cbor(http: ["h2"], eventStreamHttp: ["http/1.1"])
-service InvalidService2 {
- version: "2023-02-10"
-}
-
-@rpcv2Cbor(http: ["h2"], eventStreamHttp: ["h2", "http/1.1", "h2c"])
-service InvalidService3 {
- version: "2023-02-10"
-}
+@rpcv2Cbor(
+ http: ["h2", "http/1.1"]
+ eventStreamHttp: ["h2"]
+)
+service ValidService1 { version: "2023-02-10" }
+
+@rpcv2Cbor(
+ http: ["h2"]
+ eventStreamHttp: ["h2"]
+)
+service ValidService2 { version: "2023-02-10" }
+
+@rpcv2Cbor(
+ http: []
+ eventStreamHttp: []
+)
+service ValidService3 { version: "2023-02-10" }
+
+@rpcv2Cbor(
+ http: ["http/1.1"]
+ eventStreamHttp: []
+)
+service ValidService4 { version: "2023-02-10" }
+
+@rpcv2Cbor(
+ eventStreamHttp: ["http/1.1"]
+)
+service InvalidService1 { version: "2023-02-10" }
+
+@rpcv2Cbor(
+ http: ["h2"]
+ eventStreamHttp: ["http/1.1"]
+)
+service InvalidService2 { version: "2023-02-10" }
+
+@rpcv2Cbor(
+ http: ["h2"]
+ eventStreamHttp: ["h2", "http/1.1", "h2c"]
+)
+service InvalidService3 { version: "2023-02-10" }
diff --git a/smithy-rules-engine/src/main/resources/META-INF/smithy/smithy.rules.smithy b/smithy-rules-engine/src/main/resources/META-INF/smithy/smithy.rules.smithy
index de26a37bb85..f8b41236835 100644
--- a/smithy-rules-engine/src/main/resources/META-INF/smithy/smithy.rules.smithy
+++ b/smithy-rules-engine/src/main/resources/META-INF/smithy/smithy.rules.smithy
@@ -35,7 +35,7 @@ structure contextParam {
@trait(selector: "operation")
map staticContextParams {
/// The rule-set parameter name.
- key: String,
+ key: String
/// The static parameter definition.
value: StaticContextParamDefinition
@@ -47,7 +47,7 @@ map staticContextParams {
@trait(selector: "service")
map clientContextParams {
/// The rule-set parameter name.
- key: String,
+ key: String
/// The client parameter definition.
value: ClientContextParamDefinition
@@ -68,7 +68,7 @@ structure StaticContextParamDefinition {
structure ClientContextParamDefinition {
/// The Smithy shape type that should be used to generate a client configurable for the rule-set parameter.
@required
- type: ShapeType,
+ type: ShapeType
/// Documentation string to be generated with the client parameter.
documentation: String
@@ -97,13 +97,13 @@ list EndpointTestList {
@private
structure EndpointTest {
/// Documentation describing the test case.
- documentation: String,
+ documentation: String
/// Defines rule-set parameters and values to use for testing rules-engine.
- params: Document,
+ params: Document
/// Defines a set of service operation configurations used for testing the rules-engine.
- operationInputs: OperationInputs,
+ operationInputs: OperationInputs
/// The expected outcome of the test case.
@required
@@ -124,14 +124,14 @@ list OperationInputs {
structure OperationInput {
/// The name of the service operation targeted by the test.
@required
- operationName: String,
+ operationName: String
/// Defines the input parameters used to generate the operation request.
/// These parameters MUST be compatible with the input of the operation.
- operationParams: Document,
+ operationParams: Document
/// Defines the set of rule-set built-ins and their corresponding values to be set.
- builtInParams: Document,
+ builtInParams: Document
/// Defines the set of client configuration parameters to be set.
clientParams: Document
@@ -142,7 +142,7 @@ structure OperationInput {
@private
union EndpointTestExpectation {
/// A test case expectation resulting in an error.
- error: String,
+ error: String
/// A test case expectation resulting in an endpoint.
endpoint: EndpointExpectation
@@ -153,10 +153,10 @@ union EndpointTestExpectation {
@private
structure EndpointExpectation {
/// The expected endpoint URL to be resolved for this test case.
- url: String,
+ url: String
/// The transport headers to be set for this test case.
- headers: EndpointHeaders,
+ headers: EndpointHeaders
/// The properties for the endpoint for this test case.
properties: Properties
@@ -167,7 +167,7 @@ structure EndpointExpectation {
@private
map EndpointHeaders {
/// The transport header name.
- key: String,
+ key: String
/// The transport header values.
value: EndpointHeaderValue
@@ -186,7 +186,7 @@ list EndpointHeaderValue {
@private
map Properties {
/// The property name.
- key: String,
+ key: String
/// The property value.
value: Document
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-input-param-types.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-input-param-types.smithy
index 4f980473866..5cd350c69a0 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-input-param-types.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-input-param-types.smithy
@@ -6,28 +6,27 @@ use smithy.rules#contextParam
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "ParameterBar": {
- "type": "String",
- "required": true,
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ ParameterBar: { type: "String", required: true, documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{ParameterBar}.amazonaws.com",
- "headers": {}
- },
- "type": "endpoint"
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{ParameterBar}.amazonaws.com"
+ headers: {}
+ }
+ type: "endpoint"
}
]
})
service FizzBuzz {
- operations: [GetResource, GetAnotherResource]
+ operations: [
+ GetResource
+ GetAnotherResource
+ ]
}
operation GetResource {
@@ -49,4 +48,5 @@ structure GetAnotherResourceInput {
}
string ResourceId
+
boolean ResourceIdBool
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-params.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-params.smithy
index c3e9e39e4f5..08e8b375ac6 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-params.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-params.smithy
@@ -8,44 +8,31 @@ use smithy.rules#endpointRuleSet
use smithy.rules#staticContextParams
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "type": "string",
- "documentation": "docs"
- },
- "ParameterFoo": {
- "type": "string",
- "documentation": "docs"
- },
- "ParameterBar": {
- "type": "string",
- "documentation": "docs"
- },
- "ExtraParameter": {
- "type": "string",
- "documentation": "docs"
- },
- "ExtraBuiltIn": {
- "type": "string",
- "documentation": "docs",
- "builtIn": "SDK::Endpoint"
- }
- },
- "rules": []
+ version: "1.3"
+ parameters: {
+ Region: { type: "string", documentation: "docs" }
+ ParameterFoo: { type: "string", documentation: "docs" }
+ ParameterBar: { type: "string", documentation: "docs" }
+ ExtraParameter: { type: "string", documentation: "docs" }
+ ExtraBuiltIn: { type: "string", documentation: "docs", builtIn: "SDK::Endpoint" }
+ }
+ rules: []
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"},
- ExtraBuiltIn: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
+ ExtraBuiltIn: { type: "string", documentation: "docs" }
)
service FizzBuzz {
- operations: [GetResource, GetAnotherResource]
+ operations: [
+ GetResource
+ GetAnotherResource
+ ]
}
@staticContextParams(
- "ParameterFoo": {value: true},
- "ParamNotInRuleset": {value: "someValue"},
- "InconsistentParamType": {value: true}
+ ParameterFoo: { value: true }
+ ParamNotInRuleset: { value: "someValue" }
+ InconsistentParamType: { value: true }
)
operation GetResource {
input: GetResourceInput
@@ -57,9 +44,9 @@ structure GetResourceInput {
}
@staticContextParams(
- "ParameterFoo": {value: false},
- "ParamNotInRuleset": {value: "someOtherValue"},
- "InconsistentParamType": {value: "someValue"}
+ ParameterFoo: { value: false }
+ ParamNotInRuleset: { value: "someOtherValue" }
+ InconsistentParamType: { value: "someValue" }
)
operation GetAnotherResource {
input: GetAnotherResourceInput
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-static-param-types.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-static-param-types.smithy
index a8425ae34c8..c67ccc03d49 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-static-param-types.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/inconsistent-static-param-types.smithy
@@ -6,43 +6,42 @@ use smithy.rules#endpointRuleSet
use smithy.rules#staticContextParams
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "InconsistentParamType": {
- "type": "String",
- "required": true,
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ InconsistentParamType: { type: "String", required: true, documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{InconsistentParamType}.amazonaws.com",
- "headers": {}
- },
- "type": "endpoint"
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{InconsistentParamType}.amazonaws.com"
+ headers: {}
+ }
+ type: "endpoint"
}
]
})
service FizzBuzz {
- operations: [GetResource, GetAnotherResource]
+ operations: [
+ GetResource
+ GetAnotherResource
+ ]
}
@staticContextParams(
- "InconsistentParamType": {value: true}
+ InconsistentParamType: { value: true }
)
operation GetResource {
- input: GetResourceInput
+ input: GetResourceInput
}
structure GetResourceInput {
- ResourceId: ResourceId
+ ResourceId: ResourceId
}
@staticContextParams(
- "InconsistentParamType": {value: "some-string"}
+ InconsistentParamType: { value: "some-string" }
)
operation GetAnotherResource {
input: GetAnotherResourceInput
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-auth-name-type.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-auth-name-type.smithy
index f8d19824a59..7bbff59a19c 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-auth-name-type.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-auth-name-type.smithy
@@ -4,62 +4,54 @@ namespace example
use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
-use smithy.rules#endpointTests
@clientContextParams(
- bar: {type: "string", documentation: "a client string parameter"}
+ bar: { type: "string", documentation: "a client string parameter" }
)
@endpointRuleSet({
- version: "1.0",
+ version: "1.0"
parameters: {
- bar: {
- type: "string",
- documentation: "docs"
- }
- endpoint: {
- type: "string",
- builtIn: "SDK::Endpoint",
- required: true,
- default: "asdf"
- documentation: "docs"
- },
- },
+ bar: { type: "string", documentation: "docs" }
+ endpoint: { type: "string", builtIn: "SDK::Endpoint", required: true, default: "asdf", documentation: "docs" }
+ }
rules: [
{
- "documentation": "Shows invalid authScheme name type",
- "conditions": [
+ documentation: "Shows invalid authScheme name type"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "bar"
+ ref: "bar"
}
]
}
- ],
- "endpoint": {
- "url": "https://example.com/",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://example.com/"
+ properties: {
+ authSchemes: [
{
- "name": true,
+ name: true
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "documentation": "error fallthrough",
- "error": "endpoint error",
- "type": "error"
+ conditions: []
+ documentation: "error fallthrough"
+ error: "endpoint error"
+ type: "error"
}
]
})
service FizzBuzz {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
operation GetThing {
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-builtins.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-builtins.smithy
index 90166121a2f..b63a3dae150 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-builtins.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-builtins.smithy
@@ -7,70 +7,64 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@clientContextParams(
- bar: {type: "string", documentation: "a client string parameter"}
+ bar: { type: "string", documentation: "a client string parameter" }
)
@endpointRuleSet({
- version: "1.0",
+ version: "1.0"
parameters: {
- bar: {type: "string", documentation: "docs"},
- endpoint: {type: "string", builtIn: "SDK::Endpointt", documentation: "docs"},
- },
+ bar: { type: "string", documentation: "docs" }
+ endpoint: { type: "string", builtIn: "SDK::Endpointt", documentation: "docs" }
+ }
rules: [
{
- "documentation": "Template the region into the URI when FIPS is enabled",
- "conditions": [
+ documentation: "Template the region into the URI when FIPS is enabled"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "bar"
+ ref: "bar"
}
]
}
- ],
- "endpoint": {
- "url": "https://example.com"
- },
- "type": "endpoint"
- },
+ ]
+ endpoint: { url: "https://example.com" }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "documentation": "error fallthrough",
- "error": "endpoint error",
- "type": "error"
+ conditions: []
+ documentation: "error fallthrough"
+ error: "endpoint error"
+ type: "error"
}
]
})
@endpointTests({
- "version": "1.0",
- "testCases": [
+ version: "1.0"
+ testCases: [
{
- "params": {
- "bar": "a b",
- }
- "operationInputs": [{
- "operationName": "GetThing",
- "builtInParams": {
- "SDK::Endpointt": "https://custom.example.com"
- }
- }],
- "expect": {
- "endpoint": {
- "url": "https://example.com"
+ params: { bar: "a b" }
+ operationInputs: [
+ {
+ operationName: "GetThing"
+ builtInParams: { "SDK::Endpointt": "https://custom.example.com" }
}
+ ]
+ expect: {
+ endpoint: { url: "https://example.com" }
}
- },
+ }
{
- "documentation": "a documentation string",
- "expect": {
- "error": "endpoint error"
- }
+ documentation: "a documentation string"
+ expect: { error: "endpoint error" }
}
]
})
service ExampleService {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
operation GetThing {
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-duplicate-auth-name.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-duplicate-auth-name.smithy
index 66949434687..50d60fa87e6 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-duplicate-auth-name.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-duplicate-auth-name.smithy
@@ -4,65 +4,57 @@ namespace example
use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
-use smithy.rules#endpointTests
@clientContextParams(
- bar: {type: "string", documentation: "a client string parameter"}
+ bar: { type: "string", documentation: "a client string parameter" }
)
@endpointRuleSet({
- version: "1.0",
+ version: "1.0"
parameters: {
- bar: {
- type: "string",
- documentation: "docs"
- }
- endpoint: {
- type: "string",
- builtIn: "SDK::Endpoint",
- required: true,
- default: "asdf"
- documentation: "docs"
- },
- },
+ bar: { type: "string", documentation: "docs" }
+ endpoint: { type: "string", builtIn: "SDK::Endpoint", required: true, default: "asdf", documentation: "docs" }
+ }
rules: [
{
- "documentation": "Shows invalid duplicate authScheme names",
- "conditions": [
+ documentation: "Shows invalid duplicate authScheme names"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "bar"
+ ref: "bar"
}
]
}
- ],
- "endpoint": {
- "url": "https://example.com/",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://example.com/"
+ properties: {
+ authSchemes: [
{
- "name": "duplicate",
- },
+ name: "duplicate"
+ }
{
- "name": "duplicate",
+ name: "duplicate"
}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "documentation": "error fallthrough",
- "error": "endpoint error",
- "type": "error"
+ conditions: []
+ documentation: "error fallthrough"
+ error: "endpoint error"
+ type: "error"
}
]
})
service FizzBuzz {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
operation GetThing {
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-member-type.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-member-type.smithy
index d234dadc574..c4a8c0f410e 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-member-type.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-member-type.smithy
@@ -6,31 +6,33 @@ use smithy.rules#contextParam
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {},
- "rules": [
- {
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://endpoint.amazonaws.com",
- "headers": {}
- },
- "type": "endpoint"
- }
- ]
+ version: "1.3"
+ parameters: {}
+ rules: [
+ {
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://endpoint.amazonaws.com"
+ headers: {}
+ }
+ type: "endpoint"
+ }
+ ]
})
service FizzBuzz {
- operations: [GetResource]
+ operations: [
+ GetResource
+ ]
}
operation GetResource {
- input: GetResourceInput
+ input: GetResourceInput
}
structure GetResourceInput {
- @contextParam(name: "ParameterBar")
- ResourceId: IntResourceId
+ @contextParam(name: "ParameterBar")
+ ResourceId: IntResourceId
}
integer IntResourceId
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-missing-auth-name.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-missing-auth-name.smithy
index dd643a2e4ab..146219f169b 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-missing-auth-name.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/invalid-missing-auth-name.smithy
@@ -4,60 +4,52 @@ namespace example
use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
-use smithy.rules#endpointTests
@clientContextParams(
- bar: {type: "string", documentation: "a client string parameter"}
+ bar: { type: "string", documentation: "a client string parameter" }
)
@endpointRuleSet({
- version: "1.0",
+ version: "1.0"
parameters: {
- bar: {
- type: "string",
- documentation: "docs"
- }
- endpoint: {
- type: "string",
- builtIn: "SDK::Endpoint",
- required: true,
- default: "asdf"
- documentation: "docs"
- },
- },
+ bar: { type: "string", documentation: "docs" }
+ endpoint: { type: "string", builtIn: "SDK::Endpoint", required: true, default: "asdf", documentation: "docs" }
+ }
rules: [
{
- "documentation": "Shows invalid auth without a signing name",
- "conditions": [
+ documentation: "Shows invalid auth without a signing name"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "bar"
+ ref: "bar"
}
]
}
- ],
- "endpoint": {
- "url": "https://example.com/",
- "properties": {
- "authSchemes": [
+ ]
+ endpoint: {
+ url: "https://example.com/"
+ properties: {
+ authSchemes: [
{}
]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "documentation": "error fallthrough",
- "error": "endpoint error",
- "type": "error"
+ conditions: []
+ documentation: "error fallthrough"
+ error: "endpoint error"
+ type: "error"
}
]
})
service FizzBuzz {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
operation GetThing {
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/missing-documentation.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/missing-documentation.smithy
index 5fd0d0fc937..3e6464d6b7a 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/missing-documentation.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/invalid/missing-documentation.smithy
@@ -6,27 +6,24 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "required": true,
- "type": "String"
+ version: "1.3"
+ parameters: {
+ Region: { required: true, type: "String" }
}
- },
- "rules": [
- {
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ]
+ rules: [
+ {
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {}
+ headers: {}
+ }
+ type: "endpoint"
+ }
+ ]
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/default-values.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/default-values.smithy
index d63c041fe41..769c57d5528 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/default-values.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/default-values.smithy
@@ -7,103 +7,78 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@clientContextParams(
- bar: {type: "string", documentation: "a client string parameter"}
- baz: {type: "string", documentation: "another client string parameter"}
+ bar: { type: "string", documentation: "a client string parameter" }
+ baz: { type: "string", documentation: "another client string parameter" }
)
@endpointRuleSet({
- version: "1.0",
+ version: "1.0"
parameters: {
- bar: {
- type: "string",
- documentation: "docs"
- }
- baz: {
- type: "string",
- documentation: "docs"
- required: true
- default: "baz"
- },
- endpoint: {
- type: "string",
- builtIn: "SDK::Endpoint",
- required: true,
- default: "asdf"
- documentation: "docs"
- },
- },
+ bar: { type: "string", documentation: "docs" }
+ baz: { type: "string", documentation: "docs", required: true, default: "baz" }
+ endpoint: { type: "string", builtIn: "SDK::Endpoint", required: true, default: "asdf", documentation: "docs" }
+ }
rules: [
{
- "documentation": "Template the region into the URI when FIPS is enabled",
- "conditions": [
+ documentation: "Template the region into the URI when FIPS is enabled"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "bar"
+ ref: "bar"
}
]
}
- ],
- "endpoint": {
- "url": "https://example.com/{baz}"
- },
- "type": "endpoint"
- },
+ ]
+ endpoint: { url: "https://example.com/{baz}" }
+ type: "endpoint"
+ }
{
- "conditions": [],
- "documentation": "error fallthrough",
- "error": "endpoint error",
- "type": "error"
+ conditions: []
+ documentation: "error fallthrough"
+ error: "endpoint error"
+ type: "error"
}
]
})
@endpointTests({
- "version": "1.0",
- "testCases": [
+ version: "1.0"
+ testCases: [
{
- "params": {
- "bar": "a b",
- }
- "operationInputs": [{
- "operationName": "GetThing",
- "builtInParams": {
- "SDK::Endpoint": "https://custom.example.com"
- }
- }],
- "expect": {
- "endpoint": {
- "url": "https://example.com/baz"
+ params: { bar: "a b" }
+ operationInputs: [
+ {
+ operationName: "GetThing"
+ builtInParams: { "SDK::Endpoint": "https://custom.example.com" }
}
+ ]
+ expect: {
+ endpoint: { url: "https://example.com/baz" }
}
- },
+ }
{
- "params": {
- "bar": "a b",
- "baz": "BIG"
- }
- "operationInputs": [{
- "operationName": "GetThing",
- "builtInParams": {
- "SDK::Endpoint": "https://custom.example.com"
- }
- }],
- "expect": {
- "endpoint": {
- "url": "https://example.com/BIG"
+ params: { bar: "a b", baz: "BIG" }
+ operationInputs: [
+ {
+ operationName: "GetThing"
+ builtInParams: { "SDK::Endpoint": "https://custom.example.com" }
}
+ ]
+ expect: {
+ endpoint: { url: "https://example.com/BIG" }
}
- },
+ }
{
- "documentation": "a documentation string",
- "expect": {
- "error": "endpoint error"
- }
+ documentation: "a documentation string"
+ expect: { error: "endpoint error" }
}
]
})
service FizzBuzz {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
operation GetThing {
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/deprecated-param.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/deprecated-param.smithy
index c4e5894e074..ede73397703 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/deprecated-param.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/deprecated-param.smithy
@@ -6,39 +6,37 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "required": false,
- "deprecated": {
- "message": "use blahdeblah region instead"
- },
- "documentation": "docs"
+ parameters: {
+ Region: {
+ type: "string"
+ required: false
+ deprecated: { message: "use blahdeblah region instead" }
+ documentation: "docs"
+ }
}
- },
- "rules": [
- {
- "documentation": "base rule",
- "conditions": [
+ rules: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Region"
+ documentation: "base rule"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Region"
+ }
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {}
}
- ]
+ type: "endpoint"
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {}
- },
- "type": "endpoint"
- }
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/duplicate-param.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/duplicate-param.smithy
index 822d6ec93e5..9e98c752a34 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/duplicate-param.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/duplicate-param.smithy
@@ -7,32 +7,31 @@ use smithy.rules#endpointRuleSet
use smithy.rules#staticContextParams
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "ParameterBar": {
- "type": "String",
- "required": true,
- "documentation": "docs"
- }
- },
- "rules": [
+ version: "1.3"
+ parameters: {
+ ParameterBar: { type: "String", required: true, documentation: "docs" }
+ }
+ rules: [
{
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{ParameterBar}.amazonaws.com",
- "headers": {}
- },
- "type": "endpoint"
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{ParameterBar}.amazonaws.com"
+ headers: {}
+ }
+ type: "endpoint"
}
]
})
service FizzBuzz {
- operations: [GetResource, GetAnotherResource]
+ operations: [
+ GetResource
+ GetAnotherResource
+ ]
}
@staticContextParams(
- "ParameterBar": {value: "bar"}
+ ParameterBar: { value: "bar" }
)
operation GetResource {
input: GetResourceInput
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/get-attr-type-inference.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/get-attr-type-inference.smithy
index 50fbe5df74e..795a506c91a 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/get-attr-type-inference.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/get-attr-type-inference.smithy
@@ -6,51 +6,44 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Bucket": {
- "type": "string",
- "documentation": "docs"
+ version: "1.3"
+ parameters: {
+ Bucket: { type: "string", documentation: "docs" }
}
- },
- "rules": [
- {
- "documentation": "bucket is set, handle bucket specific endpoints",
- "conditions": [
+ rules: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Bucket"
- }
- ]
- },
- {
- "fn": "parseURL",
- "argv": [
- "{Bucket}"
- ],
- "assign": "bucketUrl"
- },
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "bucketUrl"
- },
- "path"
- ],
- "assign": "path"
+ documentation: "bucket is set, handle bucket specific endpoints"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Bucket"
+ }
+ ]
+ }
+ {
+ fn: "parseURL"
+ argv: ["{Bucket}"]
+ assign: "bucketUrl"
+ }
+ {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "bucketUrl"
+ }
+ "path"
+ ]
+ assign: "path"
+ }
+ ]
+ endpoint: { url: "https://{bucketUrl#authority}/{path}" }
+ type: "endpoint"
}
- ],
- "endpoint": {
- "url": "https://{bucketUrl#authority}/{path}"
- },
- "type": "endpoint"
- }
- ]
+ ]
})
@clientContextParams(
- Bucket: {type: "string", documentation: "docs"}
+ Bucket: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/headers.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/headers.smithy
index 5587c8be35a..b6f25f3f5ae 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/headers.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/headers.smithy
@@ -7,74 +7,59 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "documentation": "The region to dispatch this request, eg. `us-east-1`."
+ parameters: {
+ Region: { type: "string", documentation: "The region to dispatch this request, eg. `us-east-1`." }
}
- },
- "rules": [
- {
- "documentation": "Template the region into the URI when region is set",
- "conditions": [
+ rules: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Region"
+ documentation: "Template the region into the URI when region is set"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Region"
+ }
+ ]
+ }
+ ]
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ headers: {
+ "x-amz-region": ["{Region}"]
+ "x-amz-multi": ["*", "{Region}"]
+ }
}
- ]
+ type: "endpoint"
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "headers": {
- "x-amz-region": [
- "{Region}"
- ],
- "x-amz-multi": [
- "*",
- "{Region}"
- ]
+ {
+ documentation: "fallback when region is unset"
+ conditions: []
+ error: "Region must be set to resolve a valid endpoint"
+ type: "error"
}
- },
- "type": "endpoint"
- },
- {
- "documentation": "fallback when region is unset",
- "conditions": [],
- "error": "Region must be set to resolve a valid endpoint",
- "type": "error"
- }
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
@endpointTests(
- "version": "1.0",
- "testCases": [
- {
- "documentation": "header set to region",
- "params": {
- "Region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://us-east-1.amazonaws.com",
- "headers": {
- "x-amz-region": [
- "us-east-1"
- ],
- "x-amz-multi": [
- "*",
- "us-east-1"
- ]
- }
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "header set to region"
+ params: { Region: "us-east-1" }
+ expect: {
+ endpoint: {
+ url: "https://us-east-1.amazonaws.com"
+ headers: {
+ "x-amz-region": ["us-east-1"]
+ "x-amz-multi": ["*", "us-east-1"]
+ }
+ }
+ }
}
- }
- }
- ]
+ ]
)
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/minimal-ruleset.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/minimal-ruleset.smithy
index 3a8a927a366..f9290068ec5 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/minimal-ruleset.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/minimal-ruleset.smithy
@@ -6,28 +6,24 @@ use smithy.rules#clientContextParams
use smithy.rules#endpointRuleSet
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "required": true,
- "type": "String",
- "documentation": "docs"
+ version: "1.3"
+ parameters: {
+ Region: { required: true, type: "String", documentation: "docs" }
}
- },
- "rules": [
- {
- "conditions": [],
- "documentation": "base rule",
- "endpoint": {
- "url": "https://{Region}.amazonaws.com",
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ]
+ rules: [
+ {
+ conditions: []
+ documentation: "base rule"
+ endpoint: {
+ url: "https://{Region}.amazonaws.com"
+ properties: {}
+ headers: {}
+ }
+ type: "endpoint"
+ }
+ ]
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/parse-url.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/parse-url.smithy
index fce40b5f31e..68d08dd8201 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/parse-url.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/parse-url.smithy
@@ -7,258 +7,183 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Endpoint": {
- "type": "string",
- "documentation": "docs"
+ version: "1.3"
+ parameters: {
+ Endpoint: { type: "string", documentation: "docs" }
}
- },
- "rules": [
- {
- "documentation": "endpoint is set and is a valid URL",
- "conditions": [
+ rules: [
{
- "fn": "isSet",
- "argv": [
- {
- "ref": "Endpoint"
- }
- ]
- },
+ documentation: "endpoint is set and is a valid URL"
+ conditions: [
+ {
+ fn: "isSet"
+ argv: [
+ {
+ ref: "Endpoint"
+ }
+ ]
+ }
+ {
+ fn: "parseURL"
+ argv: ["{Endpoint}"]
+ assign: "url"
+ }
+ ]
+ rules: [
+ {
+ conditions: [
+ {
+ fn: "booleanEquals"
+ argv: [
+ {
+ fn: "getAttr"
+ argv: [
+ {
+ ref: "url"
+ }
+ "isIp"
+ ]
+ }
+ true
+ ]
+ }
+ ]
+ endpoint: { url: "{url#scheme}://{url#authority}{url#normalizedPath}is-ip-addr" }
+ type: "endpoint"
+ }
+ {
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{url#path}", "/port"]
+ }
+ ]
+ endpoint: { url: "{url#scheme}://{url#authority}/uri-with-port" }
+ type: "endpoint"
+ }
+ {
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{url#normalizedPath}", "/"]
+ }
+ ]
+ endpoint: { url: "https://{url#scheme}-{url#authority}-nopath.example.com" }
+ type: "endpoint"
+ }
+ {
+ conditions: []
+ endpoint: { url: "https://{url#scheme}-{url#authority}.example.com/path-is{url#path}" }
+ type: "endpoint"
+ }
+ ]
+ type: "tree"
+ }
{
- "fn": "parseURL",
- "argv": [
- "{Endpoint}"
- ],
- "assign": "url"
+ error: "endpoint was invalid"
+ conditions: []
+ type: "error"
}
- ],
- "rules": [
+ ]
+})
+@endpointTests(
+ version: "1.0"
+ testCases: [
{
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "url"
- },
- "isIp"
- ]
- },
- true
- ]
+ documentation: "simple URL parsing"
+ params: { Endpoint: "https://authority.com/custom-path" }
+ expect: {
+ endpoint: { url: "https://https-authority.com.example.com/path-is/custom-path" }
}
- ],
- "endpoint": {
- "url": "{url#scheme}://{url#authority}{url#normalizedPath}is-ip-addr"
- },
- "type": "endpoint"
- },
+ }
{
- "conditions": [
- {
- "fn": "stringEquals",
- "argv": [
- "{url#path}",
- "/port"
- ]
+ documentation: "empty path no slash"
+ params: { Endpoint: "https://authority.com" }
+ expect: {
+ endpoint: { url: "https://https-authority.com-nopath.example.com" }
}
- ],
- "endpoint": {
- "url": "{url#scheme}://{url#authority}/uri-with-port"
- },
- "type": "endpoint"
- },
+ }
{
- "conditions": [
- {
- "fn": "stringEquals",
- "argv": [
- "{url#normalizedPath}",
- "/"
- ]
+ documentation: "empty path with slash"
+ params: { Endpoint: "https://authority.com/" }
+ expect: {
+ endpoint: { url: "https://https-authority.com-nopath.example.com" }
}
- ],
- "endpoint": {
- "url": "https://{url#scheme}-{url#authority}-nopath.example.com"
- },
- "type": "endpoint"
- },
- {
- "conditions": [],
- "endpoint": {
- "url": "https://{url#scheme}-{url#authority}.example.com/path-is{url#path}"
- },
- "type": "endpoint"
}
- ],
- "type": "tree"
- },
- {
- "error": "endpoint was invalid",
- "conditions": [],
- "type": "error"
- }
- ]
-})
-@endpointTests(
- version: "1.0",
- testCases: [
- {
- "documentation": "simple URL parsing",
- "params": {
- "Endpoint": "https://authority.com/custom-path"
- },
- "expect": {
- "endpoint": {
- "url": "https://https-authority.com.example.com/path-is/custom-path"
+ {
+ documentation: "authority with port"
+ params: { Endpoint: "https://authority.com:8000/port" }
+ expect: {
+ endpoint: { url: "https://authority.com:8000/uri-with-port" }
+ }
}
- }
- },
- {
- "documentation": "empty path no slash",
- "params": {
- "Endpoint": "https://authority.com"
- },
- "expect": {
- "endpoint": {
- "url": "https://https-authority.com-nopath.example.com"
+ {
+ documentation: "http schemes"
+ params: { Endpoint: "http://authority.com:8000/port" }
+ expect: {
+ endpoint: { url: "http://authority.com:8000/uri-with-port" }
+ }
}
- }
- },
- {
- "documentation": "empty path with slash",
- "params": {
- "Endpoint": "https://authority.com/"
- },
- "expect": {
- "endpoint": {
- "url": "https://https-authority.com-nopath.example.com"
+ {
+ documentation: "arbitrary schemes are not supported"
+ params: { Endpoint: "acbd://example.com" }
+ expect: { error: "endpoint was invalid" }
}
- }
- },
- {
- "documentation": "authority with port",
- "params": {
- "Endpoint": "https://authority.com:8000/port"
- },
- "expect": {
- "endpoint": {
- "url": "https://authority.com:8000/uri-with-port"
+ {
+ documentation: "host labels are not validated"
+ params: { Endpoint: "http://99_ab.com" }
+ expect: {
+ endpoint: { url: "https://http-99_ab.com-nopath.example.com" }
+ }
}
- }
- },
- {
- "documentation": "http schemes",
- "params": {
- "Endpoint": "http://authority.com:8000/port"
- },
- "expect": {
- "endpoint": {
- "url": "http://authority.com:8000/uri-with-port"
+ {
+ documentation: "host labels are not validated"
+ params: { Endpoint: "http://99_ab-.com" }
+ expect: {
+ endpoint: { url: "https://http-99_ab-.com-nopath.example.com" }
+ }
}
- }
- },
- {
- "documentation": "arbitrary schemes are not supported",
- "params": {
- "Endpoint": "acbd://example.com"
- },
- "expect": {
- "error": "endpoint was invalid"
- }
- },
- {
- "documentation": "host labels are not validated",
- "params": {
- "Endpoint": "http://99_ab.com"
- },
- "expect": {
- "endpoint": {
- "url": "https://http-99_ab.com-nopath.example.com"
+ {
+ documentation: "invalid URL"
+ params: { Endpoint: "http://abc.com:a/foo" }
+ expect: { error: "endpoint was invalid" }
}
- }
- },
- {
- "documentation": "host labels are not validated",
- "params": {
- "Endpoint": "http://99_ab-.com"
- },
- "expect": {
- "endpoint": {
- "url": "https://http-99_ab-.com-nopath.example.com"
+ {
+ documentation: "IP Address"
+ params: { Endpoint: "http://192.168.1.1/foo/" }
+ expect: {
+ endpoint: { url: "http://192.168.1.1/foo/is-ip-addr" }
+ }
}
- }
- },
- {
- "documentation": "invalid URL",
- "params": {
- "Endpoint": "http://abc.com:a/foo"
- },
- "expect": {
- "error": "endpoint was invalid"
- }
- },
- {
- "documentation": "IP Address",
- "params": {
- "Endpoint": "http://192.168.1.1/foo/"
- },
- "expect": {
- "endpoint": {
- "url": "http://192.168.1.1/foo/is-ip-addr"
+ {
+ documentation: "IP Address with port"
+ params: { Endpoint: "http://192.168.1.1:1234/foo/" }
+ expect: {
+ endpoint: { url: "http://192.168.1.1:1234/foo/is-ip-addr" }
+ }
}
- }
- },
- {
- "documentation": "IP Address with port",
- "params": {
- "Endpoint": "http://192.168.1.1:1234/foo/"
- },
- "expect": {
- "endpoint": {
- "url": "http://192.168.1.1:1234/foo/is-ip-addr"
+ {
+ documentation: "IPv6 Address"
+ params: { Endpoint: "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443" }
+ expect: {
+ endpoint: { url: "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/is-ip-addr" }
+ }
}
- }
- },
- {
- "documentation": "IPv6 Address",
- "params": {
- "Endpoint": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"
- },
- "expect": {
- "endpoint": {
- "url": "https://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/is-ip-addr"
+ {
+ documentation: "weird DNS name"
+ params: { Endpoint: "https://999.999.abc.blah" }
+ expect: {
+ endpoint: { url: "https://https-999.999.abc.blah-nopath.example.com" }
+ }
}
- }
- },
- {
- "documentation": "weird DNS name",
- "params": {
- "Endpoint": "https://999.999.abc.blah"
- },
- "expect": {
- "endpoint": {
- "url": "https://https-999.999.abc.blah-nopath.example.com"
+ {
+ documentation: "query in resolved endpoint is not supported"
+ params: { Endpoint: "https://example.com/path?query1=foo" }
+ expect: { error: "endpoint was invalid" }
}
- }
- },
- {
- "documentation": "query in resolved endpoint is not supported",
- "params": {
- "Endpoint": "https://example.com/path?query1=foo"
- },
- "expect": {
- "error": "endpoint was invalid"
- }
- }
- ]
+ ]
)
@clientContextParams(
- Endpoint: {type: "string", documentation: "docs"}
+ Endpoint: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/substring.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/substring.smithy
index 42d93b922d4..59a4a785443 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/substring.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/substring.smithy
@@ -7,287 +7,165 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "TestCaseId": {
- "type": "string",
- "required": true,
- "documentation": "Test case id used to select the test case to use"
- },
- "Input": {
- "type": "string",
- "required": true,
- "documentation": "the input used to test substring"
+ parameters: {
+ TestCaseId: { type: "string", required: true, documentation: "Test case id used to select the test case to use" }
+ Input: { type: "string", required: true, documentation: "the input used to test substring" }
}
- },
- "rules": [
- {
- "documentation": "Substring from beginning of input",
- "conditions": [
+ rules: [
{
- "fn": "stringEquals",
- "argv": [
- "{TestCaseId}",
- "1"
- ]
- },
- {
- "fn": "substring",
- "argv": [
- "{Input}",
- 0,
- 4,
- false
- ],
- "assign": "output"
+ documentation: "Substring from beginning of input"
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{TestCaseId}", "1"]
+ }
+ {
+ fn: "substring"
+ argv: ["{Input}", 0, 4, false]
+ assign: "output"
+ }
+ ]
+ error: "The value is: `{output}`"
+ type: "error"
}
- ],
- "error": "The value is: `{output}`",
- "type": "error"
- },
- {
- "documentation": "Substring from end of input",
- "conditions": [
- {
- "fn": "stringEquals",
- "argv": [
- "{TestCaseId}",
- "2"
- ]
- },
{
- "fn": "substring",
- "argv": [
- "{Input}",
- 0,
- 4,
- true
- ],
- "assign": "output"
+ documentation: "Substring from end of input"
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{TestCaseId}", "2"]
+ }
+ {
+ fn: "substring"
+ argv: ["{Input}", 0, 4, true]
+ assign: "output"
+ }
+ ]
+ error: "The value is: `{output}`"
+ type: "error"
}
- ],
- "error": "The value is: `{output}`",
- "type": "error"
- },
- {
- "documentation": "Substring the middle of the string",
- "conditions": [
{
- "fn": "stringEquals",
- "argv": [
- "{TestCaseId}",
- "3"
- ]
- },
+ documentation: "Substring the middle of the string"
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{TestCaseId}", "3"]
+ }
+ {
+ fn: "substring"
+ argv: ["{Input}", 1, 3, false]
+ assign: "output"
+ }
+ ]
+ error: "The value is: `{output}`"
+ type: "error"
+ }
{
- "fn": "substring",
- "argv": [
- "{Input}",
- 1,
- 3,
- false
- ],
- "assign": "output"
+ documentation: "fallback when no tests match"
+ conditions: []
+ error: "No tests matched"
+ type: "error"
}
- ],
- "error": "The value is: `{output}`",
- "type": "error"
- },
- {
- "documentation": "fallback when no tests match",
- "conditions": [],
- "error": "No tests matched",
- "type": "error"
- }
- ],
- "version": "1.3"
+ ]
+ version: "1.3"
})
@endpointTests(
- version: "1.0",
- testCases: [
- {
- "documentation": "substring when string is long enough",
- "params": {
- "TestCaseId": "1",
- "Input": "abcdefg"
- },
- "expect": {
- "error": "The value is: `abcd`"
- }
- },
- {
- "documentation": "substring when string is exactly the right length",
- "params": {
- "TestCaseId": "1",
- "Input": "abcd"
- },
- "expect": {
- "error": "The value is: `abcd`"
- }
- },
- {
- "documentation": "substring when string is too short",
- "params": {
- "TestCaseId": "1",
- "Input": "abc"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring when string is too short",
- "params": {
- "TestCaseId": "1",
- "Input": ""
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring on wide characters (ensure that unicode code points are properly counted)",
- "params": {
- "TestCaseId": "1",
- "Input": "\ufdfd"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "unicode characters always return `None`",
- "params": {
- "TestCaseId": "1",
- "Input": "abcdef\uD83D\uDC31"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "non-ascii cause substring to always return `None`",
- "params": {
- "TestCaseId": "1",
- "Input": "abcdef\u0080"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "the full set of ascii is supported, including non-printable characters",
- "params": {
- "TestCaseId": "1",
- "Input": "\u007Fabcdef"
- },
- "expect": {
- "error": "The value is: `\u007Fabc`"
- }
- },
- {
- "documentation": "substring when string is long enough",
- "params": {
- "TestCaseId": "2",
- "Input": "abcdefg"
- },
- "expect": {
- "error": "The value is: `defg`"
- }
- },
- {
- "documentation": "substring when string is exactly the right length",
- "params": {
- "TestCaseId": "2",
- "Input": "defg"
- },
- "expect": {
- "error": "The value is: `defg`"
- }
- },
- {
- "documentation": "substring when string is too short",
- "params": {
- "TestCaseId": "2",
- "Input": "abc"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring when string is too short",
- "params": {
- "TestCaseId": "2",
- "Input": ""
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring on wide characters (ensure that unicode code points are properly counted)",
- "params": {
- "TestCaseId": "2",
- "Input": "\ufdfd"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring when string is longer",
- "params": {
- "TestCaseId": "3",
- "Input": "defg"
- },
- "expect": {
- "error": "The value is: `ef`"
- }
- },
- {
- "documentation": "substring when string is exact length",
- "params": {
- "TestCaseId": "3",
- "Input": "def"
- },
- "expect": {
- "error": "The value is: `ef`"
- }
- },
- {
- "documentation": "substring when string is too short",
- "params": {
- "TestCaseId": "3",
- "Input": "ab"
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring when string is too short",
- "params": {
- "TestCaseId": "3",
- "Input": ""
- },
- "expect": {
- "error": "No tests matched"
- }
- },
- {
- "documentation": "substring on wide characters (ensure that unicode code points are properly counted)",
- "params": {
- "TestCaseId": "3",
- "Input": "\ufdfd"
- },
- "expect": {
- "error": "No tests matched"
- }
- }
- ]
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "substring when string is long enough"
+ params: { TestCaseId: "1", Input: "abcdefg" }
+ expect: { error: "The value is: `abcd`" }
+ }
+ {
+ documentation: "substring when string is exactly the right length"
+ params: { TestCaseId: "1", Input: "abcd" }
+ expect: { error: "The value is: `abcd`" }
+ }
+ {
+ documentation: "substring when string is too short"
+ params: { TestCaseId: "1", Input: "abc" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring when string is too short"
+ params: { TestCaseId: "1", Input: "" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring on wide characters (ensure that unicode code points are properly counted)"
+ params: { TestCaseId: "1", Input: "\ufdfd" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "unicode characters always return `None`"
+ params: { TestCaseId: "1", Input: "abcdef\uD83D\uDC31" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "non-ascii cause substring to always return `None`"
+ params: { TestCaseId: "1", Input: "abcdef\u0080" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "the full set of ascii is supported, including non-printable characters"
+ params: { TestCaseId: "1", Input: "\u007Fabcdef" }
+ expect: { error: "The value is: `\u007Fabc`" }
+ }
+ {
+ documentation: "substring when string is long enough"
+ params: { TestCaseId: "2", Input: "abcdefg" }
+ expect: { error: "The value is: `defg`" }
+ }
+ {
+ documentation: "substring when string is exactly the right length"
+ params: { TestCaseId: "2", Input: "defg" }
+ expect: { error: "The value is: `defg`" }
+ }
+ {
+ documentation: "substring when string is too short"
+ params: { TestCaseId: "2", Input: "abc" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring when string is too short"
+ params: { TestCaseId: "2", Input: "" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring on wide characters (ensure that unicode code points are properly counted)"
+ params: { TestCaseId: "2", Input: "\ufdfd" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring when string is longer"
+ params: { TestCaseId: "3", Input: "defg" }
+ expect: { error: "The value is: `ef`" }
+ }
+ {
+ documentation: "substring when string is exact length"
+ params: { TestCaseId: "3", Input: "def" }
+ expect: { error: "The value is: `ef`" }
+ }
+ {
+ documentation: "substring when string is too short"
+ params: { TestCaseId: "3", Input: "ab" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring when string is too short"
+ params: { TestCaseId: "3", Input: "" }
+ expect: { error: "No tests matched" }
+ }
+ {
+ documentation: "substring on wide characters (ensure that unicode code points are properly counted)"
+ params: { TestCaseId: "3", Input: "\ufdfd" }
+ expect: { error: "No tests matched" }
+ }
+ ]
)
@clientContextParams(
- TestCaseId: {type: "string", documentation: "docs"}
- Input: {type: "string", documentation: "docs"}
+ TestCaseId: { type: "string", documentation: "docs" }
+ Input: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/uri-encode.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/uri-encode.smithy
index 6d2ef57f69c..8aa2c41c94b 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/uri-encode.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/uri-encode.smithy
@@ -7,126 +7,85 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "TestCaseId": {
- "type": "string",
- "required": true,
- "documentation": "Test case id used to select the test case to use"
- },
- "Input": {
- "type": "string",
- "required": true,
- "documentation": "The input used to test uriEncode"
+ version: "1.3"
+ parameters: {
+ TestCaseId: { type: "string", required: true, documentation: "Test case id used to select the test case to use" }
+ Input: { type: "string", required: true, documentation: "The input used to test uriEncode" }
}
- },
- "rules": [
- {
- "documentation": "uriEncode on input",
- "conditions": [
+ rules: [
{
- "fn": "stringEquals",
- "argv": [
- "{TestCaseId}",
- "1"
- ]
- },
+ documentation: "uriEncode on input"
+ conditions: [
+ {
+ fn: "stringEquals"
+ argv: ["{TestCaseId}", "1"]
+ }
+ {
+ fn: "uriEncode"
+ argv: ["{Input}"]
+ assign: "output"
+ }
+ ]
+ error: "The value is: `{output}`"
+ type: "error"
+ }
{
- "fn": "uriEncode",
- "argv": [
- "{Input}"
- ],
- "assign": "output"
+ documentation: "fallback when no tests match"
+ conditions: []
+ error: "No tests matched"
+ type: "error"
}
- ],
- "error": "The value is: `{output}`",
- "type": "error"
- },
- {
- "documentation": "fallback when no tests match",
- "conditions": [],
- "error": "No tests matched",
- "type": "error"
- }
- ]
+ ]
})
@endpointTests(
- version: "1.0",
- testCases: [
- {
- "documentation": "uriEncode when the string has nothing to encode returns the input",
- "params": {
- "TestCaseId": "1",
- "Input": "abcdefg"
- },
- "expect": {
- "error": "The value is: `abcdefg`"
- }
- },
- {
- "documentation": "uriEncode with single character to encode encodes only that character",
- "params": {
- "TestCaseId": "1",
- "Input": "abc:defg"
- },
- "expect": {
- "error": "The value is: `abc%3Adefg`"
- }
- },
- {
- "documentation": "uriEncode with all ASCII characters to encode encodes all characters",
- "params": {
- "TestCaseId": "1",
- "Input": "/:,?#[]{}|@! $&'()*+;=%<>\"^`\\"
- },
- "expect": {
- "error": "The value is: `%2F%3A%2C%3F%23%5B%5D%7B%7D%7C%40%21%20%24%26%27%28%29%2A%2B%3B%3D%25%3C%3E%22%5E%60%5C`"
- }
- },
- {
- "documentation": "uriEncode with ASCII characters that should not be encoded returns the input",
- "params": {
- "TestCaseId": "1",
- "Input": "0123456789.underscore_dash-Tilda~"
- },
- "expect": {
- "error": "The value is: `0123456789.underscore_dash-Tilda~`"
- }
- },
- {
- "documentation": "uriEncode encodes unicode characters",
- "params": {
- "TestCaseId": "1",
- "Input": "\ud83d\ude39"
- },
- "expect": {
- "error": "The value is: `%F0%9F%98%B9`"
- }
- },
- {
- "documentation": "uriEncode on all printable ASCII characters",
- "params": {
- "TestCaseId": "1",
- "Input": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
- },
- "expect": {
- "error": "The value is: `%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~`"
- }
- },
- {
- "documentation": "uriEncode on an empty string",
- "params": {
- "TestCaseId": "1",
- "Input": ""
- },
- "expect": {
- "error": "The value is: ``"
- }
- }
- ]
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "uriEncode when the string has nothing to encode returns the input"
+ params: { TestCaseId: "1", Input: "abcdefg" }
+ expect: { error: "The value is: `abcdefg`" }
+ }
+ {
+ documentation: "uriEncode with single character to encode encodes only that character"
+ params: { TestCaseId: "1", Input: "abc:defg" }
+ expect: { error: "The value is: `abc%3Adefg`" }
+ }
+ {
+ documentation: "uriEncode with all ASCII characters to encode encodes all characters"
+ params: { TestCaseId: "1", Input: "/:,?#[]{}|@! $&'()*+;=%<>\"^`\\" }
+ expect: {
+ error: "The value is: `%2F%3A%2C%3F%23%5B%5D%7B%7D%7C%40%21%20%24%26%27%28%29%2A%2B%3B%3D%25%3C%3E%22%5E%60%5C`"
+ }
+ }
+ {
+ documentation: "uriEncode with ASCII characters that should not be encoded returns the input"
+ params: { TestCaseId: "1", Input: "0123456789.underscore_dash-Tilda~" }
+ expect: { error: "The value is: `0123456789.underscore_dash-Tilda~`" }
+ }
+ {
+ documentation: "uriEncode encodes unicode characters"
+ params: { TestCaseId: "1", Input: "\ud83d\ude39" }
+ expect: { error: "The value is: `%F0%9F%98%B9`" }
+ }
+ {
+ documentation: "uriEncode on all printable ASCII characters"
+ params: {
+ TestCaseId: "1"
+ Input: " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
+ }
+ expect: {
+ error: "The value is: `%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~`"
+ }
+ }
+ {
+ documentation: "uriEncode on an empty string"
+ params: { TestCaseId: "1", Input: "" }
+ expect: { error: "The value is: ``" }
+ }
+ ]
)
@clientContextParams(
- TestCaseId: {type: "string", documentation: "Test case id used to select the test case to use"},
- Input: {type: "string", documentation: "The input used to test uriEncoder"}
+ TestCaseId: { type: "string", documentation: "Test case id used to select the test case to use" }
+ Input: { type: "string", documentation: "The input used to test uriEncoder" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-hostlabel.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-hostlabel.smithy
index 41f17593f18..0f930ad00b3 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-hostlabel.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-hostlabel.smithy
@@ -7,143 +7,103 @@ use smithy.rules#endpointRuleSet
use smithy.rules#endpointTests
@endpointRuleSet({
- "parameters": {
- "Region": {
- "type": "string",
- "required": true,
- "documentation": "The region to dispatch this request, eg. `us-east-1`."
+ parameters: {
+ Region: { type: "string", required: true, documentation: "The region to dispatch this request, eg. `us-east-1`." }
}
- },
- "rules": [
- {
- "documentation": "Template the region into the URI when region is set",
- "conditions": [
+ rules: [
{
- "fn": "isValidHostLabel",
- "argv": [
- {
- "ref": "Region"
- },
- false
- ]
+ documentation: "Template the region into the URI when region is set"
+ conditions: [
+ {
+ fn: "isValidHostLabel"
+ argv: [
+ {
+ ref: "Region"
+ }
+ false
+ ]
+ }
+ ]
+ endpoint: { url: "https://{Region}.amazonaws.com" }
+ type: "endpoint"
}
- ],
- "endpoint": {
- "url": "https://{Region}.amazonaws.com"
- },
- "type": "endpoint"
- },
- {
- "documentation": "Template the region into the URI when region is set",
- "conditions": [
{
- "fn": "isValidHostLabel",
- "argv": [
- {
- "ref": "Region"
- },
- true
- ]
+ documentation: "Template the region into the URI when region is set"
+ conditions: [
+ {
+ fn: "isValidHostLabel"
+ argv: [
+ {
+ ref: "Region"
+ }
+ true
+ ]
+ }
+ ]
+ endpoint: { url: "https://{Region}-subdomains.amazonaws.com" }
+ type: "endpoint"
}
- ],
- "endpoint": {
- "url": "https://{Region}-subdomains.amazonaws.com"
- },
- "type": "endpoint"
- },
- {
- "documentation": "Region was not a valid host label",
- "conditions": [],
- "error": "Invalid hostlabel",
- "type": "error"
- }
- ],
- "version": "1.3"
+ {
+ documentation: "Region was not a valid host label"
+ conditions: []
+ error: "Invalid hostlabel"
+ type: "error"
+ }
+ ]
+ version: "1.3"
})
@endpointTests(
- version: "1.0",
- testCases: [
- {
- "documentation": "standard region is a valid hostlabel",
- "params": {
- "Region": "us-east-1"
- },
- "expect": {
- "endpoint": {
- "url": "https://us-east-1.amazonaws.com"
+ version: "1.0"
+ testCases: [
+ {
+ documentation: "standard region is a valid hostlabel"
+ params: { Region: "us-east-1" }
+ expect: {
+ endpoint: { url: "https://us-east-1.amazonaws.com" }
+ }
}
- }
- },
- {
- "documentation": "starting with a number is a valid hostlabel",
- "params": {
- "Region": "3aws4"
- },
- "expect": {
- "endpoint": {
- "url": "https://3aws4.amazonaws.com"
+ {
+ documentation: "starting with a number is a valid hostlabel"
+ params: { Region: "3aws4" }
+ expect: {
+ endpoint: { url: "https://3aws4.amazonaws.com" }
+ }
}
- }
- },
- {
- "documentation": "when there are dots, only match if subdomains are allowed",
- "params": {
- "Region": "part1.part2"
- },
- "expect": {
- "endpoint": {
- "url": "https://part1.part2-subdomains.amazonaws.com"
+ {
+ documentation: "when there are dots, only match if subdomains are allowed"
+ params: { Region: "part1.part2" }
+ expect: {
+ endpoint: { url: "https://part1.part2-subdomains.amazonaws.com" }
+ }
}
- }
- },
- {
- "documentation": "a space is never a valid hostlabel",
- "params": {
- "Region": "part1 part2"
- },
- "expect": {
- "error": "Invalid hostlabel"
- }
- },
- {
- "documentation": "an empty string is not a valid hostlabel",
- "params": {
- "Region": ""
- },
- "expect": {
- "error": "Invalid hostlabel"
- }
- },
- {
- "documentation": "ending with a dot is not a valid hostlabel",
- "params": {
- "Region": "part1."
- },
- "expect": {
- "error": "Invalid hostlabel"
- }
- },
- {
- "documentation": "multiple consecutive dots are not allowed",
- "params": {
- "Region": "part1..part2"
- },
- "expect": {
- "error": "Invalid hostlabel"
- }
- },
- {
- "documentation": "labels cannot start with a dash",
- "params": {
- "Region": "part1.-part2"
- },
- "expect": {
- "error": "Invalid hostlabel"
- }
- }
- ]
+ {
+ documentation: "a space is never a valid hostlabel"
+ params: { Region: "part1 part2" }
+ expect: { error: "Invalid hostlabel" }
+ }
+ {
+ documentation: "an empty string is not a valid hostlabel"
+ params: { Region: "" }
+ expect: { error: "Invalid hostlabel" }
+ }
+ {
+ documentation: "ending with a dot is not a valid hostlabel"
+ params: { Region: "part1." }
+ expect: { error: "Invalid hostlabel" }
+ }
+ {
+ documentation: "multiple consecutive dots are not allowed"
+ params: { Region: "part1..part2" }
+ expect: { error: "Invalid hostlabel" }
+ }
+ {
+ documentation: "labels cannot start with a dash"
+ params: { Region: "part1.-part2" }
+ expect: { error: "Invalid hostlabel" }
+ }
+ ]
)
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-model.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-model.smithy
index de5b5bc87de..21e7929a171 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-model.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/language/errorfiles/valid/valid-model.smithy
@@ -8,49 +8,40 @@ use smithy.rules#endpointRuleSet
use smithy.rules#staticContextParams
@endpointRuleSet({
- "version": "1.3",
- "parameters": {
- "Region": {
- "type": "string",
- "documentation": "docs"
- },
- "ParameterFoo": {
- "type": "string",
- "documentation": "docs"
- },
- "ParameterBar": {
- "type": "string",
- "documentation": "docs"
- },
- "ExtraParameter": {
- "type": "string",
- "documentation": "docs"
- }
- },
- "rules": []
+ version: "1.3"
+ parameters: {
+ Region: { type: "string", documentation: "docs" }
+ ParameterFoo: { type: "string", documentation: "docs" }
+ ParameterBar: { type: "string", documentation: "docs" }
+ ExtraParameter: { type: "string", documentation: "docs" }
+ }
+ rules: []
})
@clientContextParams(
- Region: {type: "string", documentation: "docs"}
+ Region: { type: "string", documentation: "docs" }
)
service FizzBuzz {
- operations: [GetResource, GetAnotherResource]
+ operations: [
+ GetResource
+ GetAnotherResource
+ ]
}
@staticContextParams(
- "ParameterFoo": {value: "foo"},
- "ExtraParameter": {value: "someValue"}
+ ParameterFoo: { value: "foo" }
+ ExtraParameter: { value: "someValue" }
)
operation GetResource {
- input: GetResourceInput
+ input: GetResourceInput
}
structure GetResourceInput {
- @contextParam(name: "ParameterBar")
- ResourceId: ResourceId
+ @contextParam(name: "ParameterBar")
+ ResourceId: ResourceId
}
@staticContextParams(
- "ParameterFoo": {value: "bar"}
+ ParameterFoo: { value: "bar" }
)
operation GetAnotherResource {
input: GetAnotherResourceInput
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-client-param-type.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-client-param-type.smithy
index 51434d34e78..d59eea28593 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-client-param-type.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-client-param-type.smithy
@@ -5,11 +5,13 @@ namespace smithy.example
use smithy.rules#clientContextParams
@clientContextParams(
- invalidParam: {type: "integer"},
+ invalidParam: { type: "integer" }
)
service ExampleService {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
@readonly
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-array-param-value.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-array-param-value.smithy
index 88a5d894427..126852d4c3b 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-array-param-value.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-array-param-value.smithy
@@ -4,5 +4,9 @@ namespace smithy.example
use smithy.rules#staticContextParams
-@staticContextParams(arrayParam: {value: ["foo", "bar"]})
+@staticContextParams(
+ arrayParam: {
+ value: ["foo", "bar"]
+ }
+)
operation OperationArray {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-null-param-value.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-null-param-value.smithy
index 4d0c8584ae6..0392fbd23ac 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-null-param-value.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-null-param-value.smithy
@@ -4,5 +4,7 @@ namespace smithy.example
use smithy.rules#staticContextParams
-@staticContextParams(nullParam: {value: null})
+@staticContextParams(
+ nullParam: { value: null }
+)
operation OperationNull {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-number-param-value.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-number-param-value.smithy
index bc06373133b..2cdf6da99bc 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-number-param-value.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-number-param-value.smithy
@@ -4,5 +4,7 @@ namespace smithy.example
use smithy.rules#staticContextParams
-@staticContextParams(numberParam: {value: 42})
+@staticContextParams(
+ numberParam: { value: 42 }
+)
operation OperationNumber {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-object-param-value.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-object-param-value.smithy
index 5a60ef87be6..184ab242eae 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-object-param-value.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/invalid-static-object-param-value.smithy
@@ -4,5 +4,9 @@ namespace smithy.example
use smithy.rules#staticContextParams
-@staticContextParams(objectParam: {value: {key: "value"}})
+@staticContextParams(
+ objectParam: {
+ value: { key: "value" }
+ }
+)
operation OperationObject {}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/missing-required-values.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/missing-required-values.smithy
index b6075a7a453..f9e1ea188f7 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/missing-required-values.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/missing-required-values.smithy
@@ -5,27 +5,24 @@ namespace smithy.example
use smithy.rules#endpointTests
service InvalidService {
- version: "2022-01-01",
- operations: [GetThing]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ ]
}
apply InvalidService @endpointTests({
- "version": "1.0",
- "testCases": [
+ version: "1.0"
+ testCases: [
{
- "params": {
- "stringFoo": "c d",
- "boolFoo": true
- },
- "operationInputs": [{
- "operationName": "GetThing",
- "operationParams": {
- "buzz": "a buzz value",
- },
- }],
- "expect": {
- "error": "failed to resolve"
- }
+ params: { stringFoo: "c d", boolFoo: true }
+ operationInputs: [
+ {
+ operationName: "GetThing"
+ operationParams: { buzz: "a buzz value" }
+ }
+ ]
+ expect: { error: "failed to resolve" }
}
]
})
@@ -38,9 +35,9 @@ operation GetThing {
@input
structure GetThingInput {
@required
- fizz: String,
+ fizz: String
- buzz: String,
+ buzz: String
- fuzz: String,
+ fuzz: String
}
diff --git a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/traits-test-model.smithy b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/traits-test-model.smithy
index 94232e72994..3905927c587 100644
--- a/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/traits-test-model.smithy
+++ b/smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/traits-test-model.smithy
@@ -9,123 +9,113 @@ use smithy.rules#endpointTests
use smithy.rules#staticContextParams
@clientContextParams(
- stringFoo: {type: "string", documentation: "a client string parameter"},
- boolFoo: {type: "boolean", documentation: "a client boolean parameter"}
+ stringFoo: { type: "string", documentation: "a client string parameter" }
+ boolFoo: { type: "boolean", documentation: "a client boolean parameter" }
)
@suppress(["RuleSetParameter.TestCase.Unused"])
service ExampleService {
- version: "2022-01-01",
- operations: [GetThing, Ping]
+ version: "2022-01-01"
+ operations: [
+ GetThing
+ Ping
+ ]
}
apply ExampleService @endpointRuleSet({
- version: "1.0",
+ version: "1.0"
parameters: {
- stringFoo: {type: "string", documentation: "docs"},
- stringBar: {type: "string", documentation: "docs"},
- stringBaz: {type: "string", documentation: "docs"},
- endpoint: {type: "string", builtIn: "SDK::Endpoint", documentation: "docs"},
- boolFoo: {type: "boolean", documentation: "docs"},
- boolBar: {type: "boolean", documentation: "docs"},
- boolBaz: {type: "string", documentation: "docs"}
- },
+ stringFoo: { type: "string", documentation: "docs" }
+ stringBar: { type: "string", documentation: "docs" }
+ stringBaz: { type: "string", documentation: "docs" }
+ endpoint: { type: "string", builtIn: "SDK::Endpoint", documentation: "docs" }
+ boolFoo: { type: "boolean", documentation: "docs" }
+ boolBar: { type: "boolean", documentation: "docs" }
+ boolBaz: { type: "string", documentation: "docs" }
+ }
rules: [
{
- "documentation": "Template the region into the URI when FIPS is enabled",
- "conditions": [
+ documentation: "Template the region into the URI when FIPS is enabled"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "boolFoo"
+ ref: "boolFoo"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "boolFoo"
- },
+ ref: "boolFoo"
+ }
true
]
}
- ],
- "endpoint": {
- "url": "https://example.com",
- "properties": {},
- "headers": {
- "single": ["foo"],
- "multi": ["foo", "bar", "baz"]
+ ]
+ endpoint: {
+ url: "https://example.com"
+ properties: {}
+ headers: {
+ single: ["foo"]
+ multi: ["foo", "bar", "baz"]
}
- },
- "type": "endpoint"
- },
+ }
+ type: "endpoint"
+ }
{
- "documentation": "error when boolFoo is false",
- "conditions": [
+ documentation: "error when boolFoo is false"
+ conditions: [
{
- "fn": "isSet",
- "argv": [
+ fn: "isSet"
+ argv: [
{
- "ref": "boolFoo"
+ ref: "boolFoo"
}
]
- },
+ }
{
- "fn": "booleanEquals",
- "argv": [
+ fn: "booleanEquals"
+ argv: [
{
- "ref": "boolFoo"
- },
+ ref: "boolFoo"
+ }
false
]
}
- ],
- "error": "endpoint error",
- "type": "error"
+ ]
+ error: "endpoint error"
+ type: "error"
}
]
})
apply ExampleService @endpointTests({
- "version": "1.0",
- "testCases": [
+ version: "1.0"
+ testCases: [
{
- "documentation": "a documentation string",
- "params": {
- "stringFoo": "a b",
- "boolFoo": false
- },
- "expect": {
- "error": "endpoint error"
- }
- },
+ documentation: "a documentation string"
+ params: { stringFoo: "a b", boolFoo: false }
+ expect: { error: "endpoint error" }
+ }
{
- "params": {
- "stringFoo": "c d",
- "boolFoo": true
- },
- "operationInputs": [{
- "operationName": "GetThing",
- "clientParams": {
- "stringFoo": "client value"
- },
- "operationParams": {
- "buzz": "a buzz value",
- "fizz": "a required value"
- },
- "builtInParams": {
- "SDK::Endpoint": "https://custom.example.com"
+ params: { stringFoo: "c d", boolFoo: true }
+ operationInputs: [
+ {
+ operationName: "GetThing"
+ clientParams: { stringFoo: "client value" }
+ operationParams: { buzz: "a buzz value", fizz: "a required value" }
+ builtInParams: { "SDK::Endpoint": "https://custom.example.com" }
}
- }],
- "expect": {
- "endpoint": {
- "url": "https://example.com",
- "properties": {},
- "headers": {
- "single": ["foo"],
- "multi": ["foo", "bar", "baz"]
+ ]
+ expect: {
+ endpoint: {
+ url: "https://example.com"
+ properties: {}
+ headers: {
+ single: ["foo"]
+ multi: ["foo", "bar", "baz"]
}
}
}
@@ -134,8 +124,8 @@ apply ExampleService @endpointTests({
})
@staticContextParams(
- stringBar: {value: "some value"},
- boolBar: {value: true}
+ stringBar: { value: "some value" }
+ boolBar: { value: true }
)
operation GetThing {
input: GetThingInput
@@ -144,13 +134,13 @@ operation GetThing {
@input
structure GetThingInput {
@required
- fizz: String,
+ fizz: String
@contextParam(name: "stringBaz")
- buzz: String,
+ buzz: String
@contextParam(name: "boolBaz")
- fuzz: String,
+ fuzz: String
}
operation Ping {}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/any-failure-test.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/any-failure-test.smithy
index 508933d6fc9..362666c8521 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/any-failure-test.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/any-failure-test.smithy
@@ -6,7 +6,7 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "any_failure",
+ id: "any_failure"
expect: {
failure: {}
}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/duplicate-ids.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/duplicate-ids.smithy
index 2b316c032f0..8afa1155c75 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/duplicate-ids.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/duplicate-ids.smithy
@@ -13,20 +13,25 @@ use smithy.test#smokeTests
service SayStuff {
version: "2023-10-11"
- operations: [SayHello, SayHello2]
+ operations: [
+ SayHello
+ SayHello2
+ ]
}
@smokeTests([
{
- id: "say_hello", // Conflicts with self and SayHello2
- params: {},
+ id: "say_hello"
+ // Conflicts with self and SayHello2
+ params: {}
expect: {
success: {}
}
- },
+ }
{
- id: "say_hello", // Conflicts with self and SayHello2
- params: {},
+ id: "say_hello"
+ // Conflicts with self and SayHello2
+ params: {}
expect: {
success: {}
}
@@ -39,13 +44,15 @@ operation SayHello {
@smokeTests([
{
- id: "say_hello", // Conflicts with SayHello
+ id: "say_hello"
+ // Conflicts with SayHello
expect: {
success: {}
}
- },
+ }
{
- id: "not_say_hello", // No conflict
+ id: "not_say_hello"
+ // No conflict
expect: {
success: {}
}
@@ -59,15 +66,17 @@ operation SayHello2 {
// Not bound to service, shouldn't conflict with others that are.
@smokeTests([
{
- id: "say_hello", // Conflicts with self
- params: {},
+ id: "say_hello"
+ // Conflicts with self
+ params: {}
expect: {
success: {}
}
- },
+ }
{
- id: "say_hello", // Conflicts with self
- params: {},
+ id: "say_hello"
+ // Conflicts with self
+ params: {}
expect: {
success: {}
}
@@ -80,8 +89,9 @@ operation SayHello3 {
@smokeTests([
{
- id: "say_hello", // No conflict
- params: {},
+ id: "say_hello"
+ // No conflict
+ params: {}
expect: {
success: {}
}
@@ -94,20 +104,23 @@ operation SayHello4 {
service OtherSayStuff {
version: "2023-10-11"
- operations: [SayHello5]
+ operations: [
+ SayHello5
+ ]
}
// Shouldn't conflict between services
@smokeTests([
{
- id: "say_hello", // No conflict
- params: {},
+ id: "say_hello"
+ // No conflict
+ params: {}
expect: {
success: {}
}
}
])
operation SayHello5 {
- input := {}
- output := {}
-}
\ No newline at end of file
+ input := {}
+ output := {}
+}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/invalid-params.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/invalid-params.smithy
index 792d6466422..8b3e596d254 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/invalid-params.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/invalid-params.smithy
@@ -6,10 +6,8 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "say_hello",
- params: {
- "foo": "bar"
- },
+ id: "say_hello"
+ params: { foo: "bar" }
expect: {
success: {}
}
@@ -22,10 +20,8 @@ operation SayHello {
@smokeTests([
{
- id: "say_hello_2",
- params: {
- foo: 1
- },
+ id: "say_hello_2"
+ params: { foo: 1 }
expect: {
success: {}
}
@@ -40,8 +36,8 @@ operation SayHello2 {
@smokeTests([
{
- id: "say_hello_3",
- params: {},
+ id: "say_hello_3"
+ params: {}
expect: {
success: {}
}
@@ -52,5 +48,6 @@ operation SayHello3 {
@required
foo: String
}
+
output := {}
}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/missing-vendor-params-shape.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/missing-vendor-params-shape.smithy
index 943ca643a25..9ab711f2a21 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/missing-vendor-params-shape.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/missing-vendor-params-shape.smithy
@@ -6,12 +6,10 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "say_hello",
- params: {},
- vendorParams: {
- foo: "bar"
- },
- vendorParamsShape: MissingVendorParamsShape,
+ id: "say_hello"
+ params: {}
+ vendorParams: { foo: "bar" }
+ vendorParamsShape: MissingVendorParamsShape
expect: {
success: {}
}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/vendor-params-validation.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/vendor-params-validation.smithy
index bb7a97721f2..3ec73f7365c 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/vendor-params-validation.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/errorfiles/vendor-params-validation.smithy
@@ -6,50 +6,43 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "missing_vendor_params",
- vendorParamsShape: VendorParams,
+ id: "missing_vendor_params"
+ vendorParamsShape: VendorParams
expect: {
success: {}
}
- },
+ }
{
- id: "extra_vendor_params_member",
- vendorParams: {
- foo: "bar",
- bar: "baz"
- },
- vendorParamsShape: VendorParams,
+ id: "extra_vendor_params_member"
+ vendorParams: { foo: "bar", bar: "baz" }
+ vendorParamsShape: VendorParams
expect: {
success: {}
}
- },
+ }
{
- id: "missing_vendor_params_member",
- vendorParams: {},
- vendorParamsShape: VendorParams,
+ id: "missing_vendor_params_member"
+ vendorParams: {}
+ vendorParamsShape: VendorParams
expect: {
success: {}
}
- },
+ }
{
- id: "wrong_vendor_params_member_type",
- vendorParams: {
- foo: 1
- },
- vendorParamsShape: VendorParams,
+ id: "wrong_vendor_params_member_type"
+ vendorParams: { foo: 1 }
+ vendorParamsShape: VendorParams
expect: {
success: {}
}
- },
+ }
{
- id: "missing_vendor_params_shape",
- vendorParams: {
- foo: "bar"
- },
+ id: "missing_vendor_params_shape"
+ vendorParams: { foo: "bar" }
expect: {
success: {}
}
- },
+ }
])
operation SayHello {
input := {}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/specific-failure-test.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/specific-failure-test.smithy
index 5e6751cf532..73a8e1710a9 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/specific-failure-test.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/specific-failure-test.smithy
@@ -6,16 +6,16 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "specific_failure",
+ id: "specific_failure"
expect: {
- failure: {
- errorId: SayHelloError
- }
+ failure: { errorId: SayHelloError }
}
}
])
operation SayHello {
- errors: [SayHelloError]
+ errors: [
+ SayHelloError
+ ]
}
@error("server")
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/success-test.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/success-test.smithy
index c08a6ce858e..a88f47efa8c 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/success-test.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/success-test.smithy
@@ -6,7 +6,7 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "success",
+ id: "success"
expect: {
success: {}
}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-params.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-params.smithy
index af9d8bae53f..4388685e100 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-params.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-params.smithy
@@ -6,10 +6,8 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "say_hello",
- params: {
- foo: "bar"
- }
+ id: "say_hello"
+ params: { foo: "bar" }
expect: {
success: {}
}
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-tags.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-tags.smithy
index f605a1e6541..cdaa18a2945 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-tags.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-tags.smithy
@@ -6,10 +6,10 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "say_hello",
+ id: "say_hello"
expect: {
success: {}
- },
+ }
tags: ["foo", "bar"]
}
])
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params-shape.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params-shape.smithy
index 134074bbbfe..0efe53955ad 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params-shape.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params-shape.smithy
@@ -6,13 +6,11 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "with_vendor_params_shape",
+ id: "with_vendor_params_shape"
expect: {
success: {}
- },
- vendorParams: {
- foo: "Bar"
- },
+ }
+ vendorParams: { foo: "Bar" }
vendorParamsShape: VendorParams
}
])
diff --git a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params.smithy b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params.smithy
index 221dd2007b9..abfef4accef 100644
--- a/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params.smithy
+++ b/smithy-smoke-test-traits/src/test/resources/software/amazon/smithy/smoketests/traits/test-with-vendor-params.smithy
@@ -6,13 +6,11 @@ use smithy.test#smokeTests
@smokeTests([
{
- id: "with_vendor_params",
+ id: "with_vendor_params"
expect: {
success: {}
- },
- vendorParams: {
- foo: "Bar"
}
+ vendorParams: { foo: "Bar" }
}
])
operation SayHello {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/document-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/document-trait.smithy
index b750854052c..bb585727672 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/document-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/document-trait.smithy
@@ -4,9 +4,5 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.documents#DocumentTrait
-@DocumentTrait({
- metadata: "woo"
- more: "yay"
-})
-structure myStruct {
-}
+@DocumentTrait({ metadata: "woo", more: "yay" })
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/struct-with-nested-document.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/struct-with-nested-document.smithy
index 375e3706c48..ef3cdae5b23 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/struct-with-nested-document.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/documents/struct-with-nested-document.smithy
@@ -5,10 +5,6 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.documents#structWithNestedDocument
@structWithNestedDocument(
- doc: {
- foo: "bar"
- fizz: "buzz"
- }
+ doc: { foo: "bar", fizz: "buzz" }
)
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/enum-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/enum-trait.smithy
index b253f4ad359..03c97e7f207 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/enum-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/enum-trait.smithy
@@ -5,5 +5,4 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.enums#StringEnum
@StringEnum("yes")
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/string-enum-compatibility.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/string-enum-compatibility.smithy
index 943878846ef..8724d14013e 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/string-enum-compatibility.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/enums/string-enum-compatibility.smithy
@@ -5,5 +5,4 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.enums#Suit
@Suit("club")
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/number-trait-errors.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/number-trait-errors.smithy
index fc6471fa9b0..826455e5379 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/number-trait-errors.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/number-trait-errors.smithy
@@ -9,5 +9,3 @@ namespace test.smithy.traitcodegen.numbers
@ShortTrait("bad")
@DoubleTrait("bad")
structure structWithInvalidStringInput {}
-
-
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/set-trait-errors.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/set-trait-errors.smithy
index 33b33db404f..31fca071971 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/set-trait-errors.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/set-trait-errors.smithy
@@ -4,9 +4,7 @@ namespace test.smithy.traitcodegen.uniqueitems
// Doesnt have unique items. Expect failure
@NumberSetTrait([1, 1, 3, 4])
-structure repeatedNumberValues {
-}
+structure repeatedNumberValues {}
@StringSetTrait(["a", "a", "b"])
-structure repeatedStringValues {
-}
+structure repeatedStringValues {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/structure-trait-warns.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/structure-trait-warns.smithy
index 8af8dcedf71..44c6c4ffd29 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/structure-trait-warns.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/errorfiles/structure-trait-warns.smithy
@@ -2,24 +2,15 @@ $version: "2.0"
namespace test.smithy.traitcodegen.structures
-
@structureTrait(
fieldA: "first"
fieldB: false
- fieldC: {
- fieldN: "nested"
- fieldQ: true
- fieldZ: "A"
- }
+ fieldC: { fieldN: "nested", fieldQ: true, fieldZ: "A" }
fieldD: ["a", "b", "c"]
- fieldE: {
- a: "one"
- b: "two"
- }
- fieldF: 100.01,
- fieldG: 100,
- extraA: 100,
+ fieldE: { a: "one", b: "two" }
+ fieldF: 100.01
+ fieldG: 100
+ extraA: 100
extraB: 200
)
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-map.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-map.smithy
index f73eb02e873..a784f169b96 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-map.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-map.smithy
@@ -4,10 +4,7 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.idref#IdRefMap
-@IdRefMap(
- a: IdRefTarget1
- b: IdRefTarget2
-)
+@IdRefMap(a: IdRefTarget1, b: IdRefTarget2)
structure myStruct {}
string IdRefTarget1
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-struct-with-nested-refs.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-struct-with-nested-refs.smithy
index cc3dc064d81..c81da2e4e80 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-struct-with-nested-refs.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/idref/idref-struct-with-nested-refs.smithy
@@ -5,14 +5,9 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.idref#IdRefStructWithNestedIds
@IdRefStructWithNestedIds(
- idRefHolder: {
- id: IdRefTarget1
- }
+ idRefHolder: { id: IdRefTarget1 }
idList: [IdRefTarget1, IdRefTarget2]
- idMap: {
- a: IdRefTarget1
- b: IdRefTarget2
- }
+ idMap: { a: IdRefTarget1, b: IdRefTarget2 }
)
structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/number-list-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/number-list-trait.smithy
index cab37d2271d..4498a3426b5 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/number-list-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/number-list-trait.smithy
@@ -5,5 +5,4 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.lists#NumberListTrait
@NumberListTrait([1, 2, 3, 4, 5])
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/string-list-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/string-list-trait.smithy
index 8821df4dfd9..15e073b8cf8 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/string-list-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/string-list-trait.smithy
@@ -5,5 +5,4 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.lists#StringListTrait
@StringListTrait(["a", "b", "c", "d"])
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/struct-list-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/struct-list-trait.smithy
index 528317b1fb3..be8bf22e19b 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/struct-list-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/lists/struct-list-trait.smithy
@@ -9,11 +9,11 @@ use test.smithy.traitcodegen.lists#StructureListTrait
a: "first"
b: 1
c: "other"
- } {
+ }
+ {
a: "second"
b: 2
c: "more"
}
])
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-string-map-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-string-map-trait.smithy
index bf824192e2d..4eae963c816 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-string-map-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-string-map-trait.smithy
@@ -4,10 +4,5 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.maps#StringStringMap
-@StringStringMap(
- a: "stuff"
- b: "other"
- c: "more!"
-)
-structure myStruct {
-}
+@StringStringMap(a: "stuff", b: "other", c: "more!")
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-to-struct-map-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-to-struct-map-trait.smithy
index 55d20f23f03..b8b70af3fdc 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-to-struct-map-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/maps/string-to-struct-map-trait.smithy
@@ -5,14 +5,7 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.maps#StringToStructMap
@StringToStructMap(
- one: {
- a: "foo"
- b: 2
- }
- two: {
- a: "bar"
- b: 4
- }
+ one: { a: "foo", b: 2 }
+ two: { a: "bar", b: 4 }
)
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-mixin-member.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-mixin-member.smithy
index 6c908fccccc..d0f920152cf 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-mixin-member.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-mixin-member.smithy
@@ -10,7 +10,8 @@ use test.smithy.traitcodegen.mixins#structureListWithMixinMember
b: 1
c: "other"
d: "mixed-in"
- } {
+ }
+ {
a: "second"
b: 2
c: "more"
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-only-mixin-member.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-only-mixin-member.smithy
index dc738524fc2..80076918588 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-only-mixin-member.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/mixins/struct-with-only-mixin-member.smithy
@@ -4,8 +4,5 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.mixins#structWithMixin
-@structWithMixin(
- d: "mixed-in"
-)
-structure myStruct {
-}
+@structWithMixin(d: "mixed-in")
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/names/snake-case-struct.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/names/snake-case-struct.smithy
index 6f97ca27f17..00fe3abce13 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/names/snake-case-struct.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/names/snake-case-struct.smithy
@@ -4,8 +4,5 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.names#snake_case_structure
-@snake_case_structure(
- snake_case_member: "stuff"
-)
-structure myStruct {
-}
+@snake_case_structure(snake_case_member: "stuff")
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-trait.smithy
index df16a7253ef..89e7ad3f1e3 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-trait.smithy
@@ -7,18 +7,10 @@ use test.smithy.traitcodegen.structures#structureTrait
@structureTrait(
fieldA: "first"
fieldB: false
- fieldC: {
- fieldN: "nested"
- fieldQ: true
- fieldZ: "A"
- }
+ fieldC: { fieldN: "nested", fieldQ: true, fieldZ: "A" }
fieldD: ["a", "b", "c"]
- fieldE: {
- a: "one"
- b: "two"
- }
- fieldF: 100.01,
+ fieldE: { a: "one", b: "two" }
+ fieldF: 100.01
fieldG: 100
)
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-with-non-existent-collections.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-with-non-existent-collections.smithy
index ab195d5d6b5..d050edbbe91 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-with-non-existent-collections.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/structures/struct-with-non-existent-collections.smithy
@@ -7,11 +7,6 @@ use test.smithy.traitcodegen.structures#structureTrait
@structureTrait(
fieldA: "first"
fieldB: false
- fieldC: {
- fieldN: "nested"
- fieldQ: true
- fieldZ: "A"
- }
+ fieldC: { fieldN: "nested", fieldQ: true, fieldZ: "A" }
)
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/number-set-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/number-set-trait.smithy
index 3dd069c0736..167d38bb181 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/number-set-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/number-set-trait.smithy
@@ -5,5 +5,4 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.uniqueitems#NumberSetTrait
@NumberSetTrait([1, 2, 3, 4])
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/string-set-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/string-set-trait.smithy
index 8145ca6d370..57e885e047c 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/string-set-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/string-set-trait.smithy
@@ -5,5 +5,4 @@ namespace test.smithy.traitcodegen
use test.smithy.traitcodegen.uniqueitems#StringSetTrait
@StringSetTrait(["a", "b", "c", "d"])
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/struct-set-trait.smithy b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/struct-set-trait.smithy
index 0e0c14b2ef8..0eee8fe05e5 100644
--- a/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/struct-set-trait.smithy
+++ b/smithy-trait-codegen/src/it/resources/software/amazon/smithy/traitcodegen/test/uniqueitems/struct-set-trait.smithy
@@ -9,11 +9,11 @@ use test.smithy.traitcodegen.uniqueitems#StructureSetTrait
a: "first"
b: 1
c: "other"
- } {
+ }
+ {
a: "second"
b: 2
c: "more"
}
])
-structure myStruct {
-}
+structure myStruct {}
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/int-enum-trait.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/int-enum-trait.smithy
index 63793dc3b31..e6f34cd932d 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/int-enum-trait.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/int-enum-trait.smithy
@@ -10,4 +10,3 @@ intEnum IntEnum {
/// Negative response
NO = 2
}
-
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/string-enum-compatibility.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/string-enum-compatibility.smithy
index 46ed2ec2e75..c14018ec267 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/string-enum-compatibility.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/enums/string-enum-compatibility.smithy
@@ -7,22 +7,21 @@ namespace test.smithy.traitcodegen.enums
// ========================
// The following trait check that the plugin can generate traits from a
// legacy string enum (i.e. a string with the @enum trait applied).
-
@enum([
{
- name: "DIAMOND",
+ name: "DIAMOND"
value: "diamond"
- },
+ }
{
- name: "CLUB",
+ name: "CLUB"
value: "club"
- },
+ }
{
- name: "HEART",
+ name: "HEART"
value: "heart"
- },
+ }
{
- name: "SPADE",
+ name: "SPADE"
value: "spade"
}
])
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-list.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-list.smithy
index 9a8cdf699f0..20234d9fb6d 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-list.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-list.smithy
@@ -4,7 +4,6 @@ namespace test.smithy.traitcodegen.idref
// The following trait check to make sure that Strings are converted to ShapeIds
// when an @IdRef trait is added to a string
-
@trait
list IdRefList {
member: IdRefListmember
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-string.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-string.smithy
index f660635ca29..dafacf95386 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-string.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/idref/idref-string.smithy
@@ -4,7 +4,6 @@ namespace test.smithy.traitcodegen.idref
// The following trait check to make sure that Strings are converted to ShapeIds
// when an @IdRef trait is added to a string
-
@trait
@idRef
string IdRefString
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-mixin-member.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-mixin-member.smithy
index 7ddf89b46bc..f4166cef18c 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-mixin-member.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-mixin-member.smithy
@@ -4,7 +4,6 @@ namespace test.smithy.traitcodegen.mixins
// The following trait checks that mixins are correctly flattened by
// the trait codegen plugin
-
@trait
list structureListWithMixinMember {
member: listMemberWithMixin
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-only-mixin-member.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-only-mixin-member.smithy
index bb41257e208..338596b53f2 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-only-mixin-member.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/mixins/struct-with-only-mixin-member.smithy
@@ -4,7 +4,6 @@ namespace test.smithy.traitcodegen.mixins
// The following trait checks that mixins are correctly flattened by
// the trait codegen plugin
-
@trait
structure structWithMixin with [extras] {}
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/snake-case-structure.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/snake-case-structure.smithy
index ad2c853fa87..f3a6c86ed61 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/snake-case-structure.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/snake-case-structure.smithy
@@ -7,7 +7,6 @@ namespace test.smithy.traitcodegen.names
// ===================
// The following traits check that non-java-style names are
// correctly changed into a useable Java-compatible name
-
/// Snake cased
@trait
structure snake_case_structure {
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/trait-with-name-conflict.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/trait-with-name-conflict.smithy
index 0ed2f02dfad..457edf92148 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/trait-with-name-conflict.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/names/trait-with-name-conflict.smithy
@@ -4,7 +4,6 @@ namespace test.smithy.traitcodegen.names
// The following traits check to make sure that name conflicts between shapes and
// java classes used in the generated codegen code are correctly handled
-
/// Conflicts with AbstractTrait base class
@trait
structure Abstract {}
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/nested/nested-namespace.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/nested/nested-namespace.smithy
index 0dacd2eeae2..0afb579bc66 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/nested/nested-namespace.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/nested/nested-namespace.smithy
@@ -7,7 +7,6 @@ namespace test.smithy.traitcodegen.nested
// =======================
// The following traits check to make sure that traits within a nested smithy
// namespace are mapped to a nested java namespace
-
/// A trait that should be generated in a nested namespace
@trait
structure nestedNamespaceTrait {
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/structures/structure-trait.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/structures/structure-trait.smithy
index 9ff4944b609..e56dbb6868d 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/structures/structure-trait.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/structures/structure-trait.smithy
@@ -60,6 +60,7 @@ structure NestedA {
enum NestedB {
/// An A!
A
+
/// A B!
B
}
@@ -68,6 +69,7 @@ enum NestedB {
intEnum NestedC {
/// An A!
A = 1
+
/// A B!
B = 2
}
diff --git a/smithy-trait-codegen/src/test/resources/META-INF/smithy/timestamps/struct-with-nested-timestamps.smithy b/smithy-trait-codegen/src/test/resources/META-INF/smithy/timestamps/struct-with-nested-timestamps.smithy
index 394427bf6b3..960e4d8d82a 100644
--- a/smithy-trait-codegen/src/test/resources/META-INF/smithy/timestamps/struct-with-nested-timestamps.smithy
+++ b/smithy-trait-codegen/src/test/resources/META-INF/smithy/timestamps/struct-with-nested-timestamps.smithy
@@ -6,10 +6,13 @@ namespace test.smithy.traitcodegen.timestamps
structure structWithNestedTimestamps {
@required
baseTime: basicTimestamp
+
@required
dateTime: dateTimeTimestamp
+
@required
httpDate: httpDateTimestamp
+
@required
epochSeconds: epochSecondsTimestamp
}
diff --git a/smithy-waiters/src/main/resources/META-INF/smithy/waiters.smithy b/smithy-waiters/src/main/resources/META-INF/smithy/waiters.smithy
index ab2f354bb32..cf2e6caa327 100644
--- a/smithy-waiters/src/main/resources/META-INF/smithy/waiters.smithy
+++ b/smithy-waiters/src/main/resources/META-INF/smithy/waiters.smithy
@@ -7,8 +7,8 @@ namespace smithy.waiters
@trait(selector: "operation :not(-[input, output]-> structure > member > union[trait|streaming])")
@length(min: 1)
map waitable {
- key: WaiterName,
- value: Waiter,
+ key: WaiterName
+ value: Waiter
}
@pattern("^[A-Z]+[A-Za-z0-9]*$")
@@ -18,32 +18,32 @@ string WaiterName
@private
structure Waiter {
/// Documentation about the waiter. Can use CommonMark.
- documentation: String,
+ documentation: String
/// An ordered array of acceptors to check after executing an operation.
@required
- acceptors: Acceptors,
+ acceptors: Acceptors
/// The minimum amount of time in seconds to delay between each retry.
/// This value defaults to 2 if not specified. If specified, this value
/// MUST be greater than or equal to 1 and less than or equal to
/// `maxDelay`.
- minDelay: WaiterDelay = 2,
+ minDelay: WaiterDelay = 2
/// The maximum amount of time in seconds to delay between each retry.
/// This value defaults to 120 if not specified (or, 2 minutes). If
/// specified, this value MUST be greater than or equal to 1.
- maxDelay: WaiterDelay = 120,
+ maxDelay: WaiterDelay = 120
/// Indicates if the waiter is considered deprecated. A waiter SHOULD
/// be marked as deprecated if it has been replaced by another waiter or
/// if it is no longer needed (for example, if a resource changes from
/// eventually consistent to strongly consistent).
- deprecated: Boolean,
+ deprecated: Boolean
/// A list of tags associated with the waiter that allow waiters to be
/// categorized and grouped.
- tags: NonEmptyStringList,
+ tags: NonEmptyStringList
}
@range(min: 1)
@@ -60,11 +60,11 @@ list Acceptors {
structure Acceptor {
/// The state the acceptor transitions to when matched.
@required
- state: AcceptorState,
+ state: AcceptorState
/// The matcher used to test if the resource is in a given state.
@required
- matcher: Matcher,
+ matcher: Matcher
}
/// The transition state of a waiter.
@@ -89,7 +89,7 @@ enum AcceptorState {
union Matcher {
/// Matches on the successful output of an operation using a
/// JMESPath expression.
- output: PathMatcher,
+ output: PathMatcher
/// Matches on both the input and output of an operation using a JMESPath
/// expression. Input parameters are available through the top-level
@@ -97,18 +97,18 @@ union Matcher {
/// `output` field. This matcher can only be used on operations that
/// define both input and output. This matcher is checked only if an
/// operation completes successfully.
- inputOutput: PathMatcher,
+ inputOutput: PathMatcher
/// Matches if an operation returns an error and the error matches
/// the expected error type. If an absolute shape ID is provided, the
/// error is matched exactly on the shape ID. A shape name can be
/// provided to match an error in any namespace with the given name.
- errorType: String,
+ errorType: String
/// When set to `true`, matches when an operation returns a successful
/// response. When set to `false`, matches when an operation fails with
/// any error.
- success: Boolean,
+ success: Boolean
}
/// Defines how to test the result of a JMESPath expression against
@@ -117,16 +117,16 @@ union Matcher {
structure PathMatcher {
/// A JMESPath expression applied to the input or output of an operation.
@required
- path: String,
+ path: String
/// The expected return value of the expression.
@required
- expected: String,
+ expected: String
/// The comparator used to compare the result of the expression with the
/// expected value.
@required
- comparator: PathComparator,
+ comparator: PathComparator
}
/// Defines a comparison to perform in a PathMatcher.
@@ -147,7 +147,7 @@ enum PathComparator {
@private
list NonEmptyStringList {
- member: NonEmptyString,
+ member: NonEmptyString
}
@private
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/cannot-wait-on-streaming-operations.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/cannot-wait-on-streaming-operations.smithy
index 7ca718a8336..0201d198fee 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/cannot-wait-on-streaming-operations.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/cannot-wait-on-streaming-operations.smithy
@@ -6,11 +6,11 @@ use smithy.waiters#waitable
@waitable(
Success: {
- documentation: "A",
+ documentation: "A"
acceptors: [
{
- state: "success",
- matcher: {success: true}
+ state: "success"
+ matcher: { success: true }
}
]
}
@@ -21,7 +21,7 @@ operation StreamingInput {
@input
structure StreamingInputInput {
- messages: Messages,
+ messages: Messages
}
@streaming
@@ -33,11 +33,11 @@ structure SuccessMessage {}
@waitable(
Success: {
- documentation: "B",
+ documentation: "B"
acceptors: [
{
- state: "success",
- matcher: {success: true}
+ state: "success"
+ matcher: { success: true }
}
]
}
@@ -48,5 +48,5 @@ operation StreamingOutput {
@output
structure StreamingOutputOutput {
- messages: Messages,
+ messages: Messages
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/emits-danger-and-warning-typechecks.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/emits-danger-and-warning-typechecks.smithy
index 0dd85b9ad48..6d9057a710d 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/emits-danger-and-warning-typechecks.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/emits-danger-and-warning-typechecks.smithy
@@ -6,29 +6,31 @@ use smithy.waiters#waitable
@waitable(
Invalid1: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "`10`.foo", // can't select a field from a literal.
- "comparator": "booleanEquals",
- "expected": "true"
+ state: "success"
+ matcher: {
+ output: {
+ path: "`10`.foo"
+ // can't select a field from a literal.
+ comparator: "booleanEquals"
+ expected: "true"
}
}
}
]
- },
+ }
Invalid2: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "`true` < `false`", // can't compare these
- "comparator": "booleanEquals",
- "expected": "true"
+ state: "success"
+ matcher: {
+ output: {
+ path: "`true` < `false`"
+ // can't compare these
+ comparator: "booleanEquals"
+ expected: "true"
}
}
}
@@ -36,7 +38,7 @@ use smithy.waiters#waitable
}
)
operation A {
- input: AInput,
+ input: AInput
output: AOutput
}
@@ -45,5 +47,5 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/input-output-and-bug-test.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/input-output-and-bug-test.smithy
index 24c44826b02..313cbe58ce4 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/input-output-and-bug-test.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/input-output-and-bug-test.smithy
@@ -6,14 +6,14 @@ use smithy.waiters#waitable
@waitable(
A: {
- documentation: "A",
+ documentation: "A"
acceptors: [
{
- state: "success",
+ state: "success"
matcher: {
inputOutput: {
- path: "(input.Status == 'failed') && (output.Status == 'failed')",
- expected: "true",
+ path: "(input.Status == 'failed') && (output.Status == 'failed')"
+ expected: "true"
comparator: "booleanEquals"
}
}
@@ -22,7 +22,7 @@ use smithy.waiters#waitable
}
)
operation WaitersTest {
- input: WaitersTestInputOutput,
+ input: WaitersTestInputOutput
output: WaitersTestInputOutput
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-input.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-input.smithy
index 1b8e5e0dd42..898cf85614b 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-input.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-input.smithy
@@ -6,16 +6,12 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "inputOutput": {
- "path": "output.foo == 'hi'",
- "expected": "true",
- "comparator": "booleanEquals"
- }
+ state: "success"
+ matcher: {
+ inputOutput: { path: "output.foo == 'hi'", expected: "true", comparator: "booleanEquals" }
}
}
]
@@ -27,5 +23,5 @@ operation A {
@output
structure AOutput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-output.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-output.smithy
index c089cc9e9e6..0cac473cc86 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-output.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/inputOutput-operation-with-no-output.smithy
@@ -6,16 +6,12 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "inputOutput": {
- "path": "output.foo == 'hi'",
- "expected": "true",
- "comparator": "booleanEquals"
- }
+ state: "success"
+ matcher: {
+ inputOutput: { path: "output.foo == 'hi'", expected: "true", comparator: "booleanEquals" }
}
}
]
@@ -27,5 +23,5 @@ operation A {
@input
structure AInput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-boolean-expected-value.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-boolean-expected-value.smithy
index dc028f3f7f7..6f035be0e6d 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-boolean-expected-value.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-boolean-expected-value.smithy
@@ -6,45 +6,50 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "`true`",
- "comparator": "booleanEquals",
- "expected": "foo" // must be true | false
+ state: "success"
+ matcher: {
+ output: {
+ path: "`true`"
+ comparator: "booleanEquals"
+ expected: "foo"
+ // must be true | false
}
}
- },
+ }
{
- "state": "retry",
- "matcher": {
- "output": {
- "path": "`true`",
- "comparator": "booleanEquals",
- "expected": "true" // this is fine
+ state: "retry"
+ matcher: {
+ output: {
+ path: "`true`"
+ comparator: "booleanEquals"
+ expected: "true"
+ // this is fine
}
}
- },
+ }
{
- "state": "failure",
- "matcher": {
- "output": {
- "path": "`true`",
- "comparator": "booleanEquals",
- "expected": "false" // this is fine
+ state: "failure"
+ matcher: {
+ output: {
+ path: "`true`"
+ comparator: "booleanEquals"
+ expected: "false"
+ // this is fine
}
}
- },
+ }
]
}
)
operation A {
- input: AInput,
- output: AOutput,
- errors: [OhNo],
+ input: AInput
+ output: AOutput
+ errors: [
+ OhNo
+ ]
}
@input
@@ -52,7 +57,7 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
@error("client")
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-errorType.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-errorType.smithy
index 8d7c158aa49..aa98f4a6537 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-errorType.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-errorType.smithy
@@ -6,21 +6,21 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "errorType": "Nope"
- }
+ state: "success"
+ matcher: { errorType: "Nope" }
}
]
}
)
operation A {
- input: AInput,
- output: AOutput,
- errors: [OhNo],
+ input: AInput
+ output: AOutput
+ errors: [
+ OhNo
+ ]
}
@input
@@ -28,7 +28,7 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
@error("client")
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-inputoutput-path.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-inputoutput-path.smithy
index 71de9aaaa17..c50ddda0c4a 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-inputoutput-path.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-inputoutput-path.smithy
@@ -6,30 +6,27 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "inputOutput": {
- "path": "input.foop == output.bazz",
- "expected": "true",
- "comparator": "booleanEquals"
- }
+ state: "success"
+ matcher: {
+ inputOutput: { path: "input.foop == output.bazz", expected: "true", comparator: "booleanEquals" }
}
}
]
- },
+ }
B: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "inputOutput": {
- "path": "foo == baz", // needs top-level input or output
- "expected": "true",
- "comparator": "booleanEquals"
+ state: "success"
+ matcher: {
+ inputOutput: {
+ path: "foo == baz"
+ // needs top-level input or output
+ expected: "true"
+ comparator: "booleanEquals"
}
}
}
@@ -37,16 +34,16 @@ use smithy.waiters#waitable
}
)
operation A {
- input: AInput,
- output: AOutput,
+ input: AInput
+ output: AOutput
}
@input
structure AInput {
- foo: String,
+ foo: String
}
@output
structure AOutput {
- baz: String,
+ baz: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-jmespath-syntax.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-jmespath-syntax.smithy
index 702baee0577..d17bd786b36 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-jmespath-syntax.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-jmespath-syntax.smithy
@@ -6,32 +6,28 @@ use smithy.waiters#waitable
@waitable(
Invalid1: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "||",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "||", comparator: "booleanEquals", expected: "true" }
}
}
]
- },
+ }
Invalid2: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
+ state: "success"
+ matcher: {
+ output: {
// Note that this trips up the return type analysis too,
// but I want to make sure passing `10` to length is
// detected as an error.
- "path": "length(`10`)",
- "comparator": "booleanEquals",
- "expected": "true"
+ path: "length(`10`)"
+ comparator: "booleanEquals"
+ expected: "true"
}
}
}
@@ -39,7 +35,7 @@ use smithy.waiters#waitable
}
)
operation A {
- input: AInput,
+ input: AInput
output: AOutput
}
@@ -48,5 +44,5 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-output-structure-member-access.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-output-structure-member-access.smithy
index 3c7803beb5f..33550304052 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-output-structure-member-access.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-output-structure-member-access.smithy
@@ -6,31 +6,27 @@ use smithy.waiters#waitable
@waitable(
A: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "missingB == 'hey'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "missingB == 'hey'", comparator: "booleanEquals", expected: "true" }
}
}
]
}
)
operation A {
- input: AInput,
- output: AOutput,
+ input: AInput
+ output: AOutput
}
@input
structure AInput {
- foo: String,
+ foo: String
}
@output
structure AOutput {
- baz: String,
+ baz: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-return-types.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-return-types.smithy
index d3de721f8f9..34866c58da6 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-return-types.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/invalid-return-types.smithy
@@ -6,45 +6,49 @@ use smithy.waiters#waitable
@waitable(
Invalid1: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "length(@)",
- "comparator": "booleanEquals",
- "expected": "true" // oops can't compare a number to a boolean
+ state: "success"
+ matcher: {
+ output: {
+ path: "length(@)"
+ comparator: "booleanEquals"
+ expected: "true"
+ // oops can't compare a number to a boolean
}
}
- },
+ }
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "length(@)",
- "comparator": "stringEquals",
- "expected": "hi" // oops can't compare a number to a string
+ state: "success"
+ matcher: {
+ output: {
+ path: "length(@)"
+ comparator: "stringEquals"
+ expected: "hi"
+ // oops can't compare a number to a string
}
}
- },
+ }
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "length(@)",
- "comparator": "allStringEquals",
- "expected": "hi" // oops can't compare a number to an array
+ state: "success"
+ matcher: {
+ output: {
+ path: "length(@)"
+ comparator: "allStringEquals"
+ expected: "hi"
+ // oops can't compare a number to an array
}
}
- },
+ }
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "length(@)",
- "comparator": "anyStringEquals",
- "expected": "hi" // oops can't compare a number to an array
+ state: "success"
+ matcher: {
+ output: {
+ path: "length(@)"
+ comparator: "anyStringEquals"
+ expected: "hi"
+ // oops can't compare a number to an array
}
}
}
@@ -52,7 +56,7 @@ use smithy.waiters#waitable
}
)
operation A {
- input: AInput,
+ input: AInput
output: AOutput
}
@@ -61,5 +65,5 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/minDelay-greater-than-maxDelay.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/minDelay-greater-than-maxDelay.smithy
index 00a02403b6d..bdb0b382ebf 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/minDelay-greater-than-maxDelay.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/minDelay-greater-than-maxDelay.smithy
@@ -6,41 +6,33 @@ use smithy.waiters#waitable
@waitable(
Bad: {
- "documentation": "A",
- "minDelay": 10,
- "maxDelay": 5,
- "acceptors": [
+ documentation: "A"
+ minDelay: 10
+ maxDelay: 5
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hi'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hi'", comparator: "booleanEquals", expected: "true" }
}
}
]
- },
+ }
Good: {
- "minDelay": 5,
- "maxDelay": 10,
- "acceptors": [
+ minDelay: 5
+ maxDelay: 10
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hey'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hey'", comparator: "booleanEquals", expected: "true" }
}
}
]
}
)
operation A {
- input: AInput,
+ input: AInput
output: AOutput
}
@@ -49,5 +41,5 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/not-uppercamelcase.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/not-uppercamelcase.smithy
index 674e989f48e..b451aa089f2 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/not-uppercamelcase.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/not-uppercamelcase.smithy
@@ -6,24 +6,20 @@ use smithy.waiters#waitable
@waitable(
thingNotExists: {
- "documentation": "Something",
- "acceptors": [
+ documentation: "Something"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "baz == 'hi'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "baz == 'hi'", comparator: "booleanEquals", expected: "true" }
}
}
]
}
)
operation A {
- input: AInput,
- output: AOutput,
+ input: AInput
+ output: AOutput
}
@input
@@ -31,5 +27,5 @@ structure AInput {}
@output
structure AOutput {
- baz: String,
+ baz: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/output-on-bad-shapes.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/output-on-bad-shapes.smithy
index 61e58d3baa2..bac41e46bd3 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/output-on-bad-shapes.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/output-on-bad-shapes.smithy
@@ -6,15 +6,11 @@ use smithy.waiters#waitable
@waitable(
A: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hey'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hey'", comparator: "booleanEquals", expected: "true" }
}
}
]
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-inputoutput.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-inputoutput.smithy
index 88223aff5fb..f945924b5da 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-inputoutput.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-inputoutput.smithy
@@ -6,32 +6,28 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "inputOutput": {
- "path": "input.foo == output.baz",
- "expected": "true",
- "comparator": "booleanEquals"
- }
+ state: "success"
+ matcher: {
+ inputOutput: { path: "input.foo == output.baz", expected: "true", comparator: "booleanEquals" }
}
}
]
}
)
operation A {
- input: AInput,
+ input: AInput
output: AOutput
}
@input
structure AInput {
- foo: String,
+ foo: String
}
@output
structure AOutput {
- baz: String,
+ baz: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-waiters.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-waiters.smithy
index 8b4a9899d73..e2a1a9ac481 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-waiters.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/valid-waiters.smithy
@@ -6,121 +6,91 @@ use smithy.waiters#waitable
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hi'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hi'", comparator: "booleanEquals", expected: "true" }
}
}
]
- },
+ }
B: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hey'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hey'", comparator: "booleanEquals", expected: "true" }
}
}
]
- },
+ }
C: {
- "acceptors": [
+ acceptors: [
{
- "state": "retry",
- "matcher": {
- "output": {
- "path": "foo == 'bye'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "retry"
+ matcher: {
+ output: { path: "foo == 'bye'", comparator: "booleanEquals", expected: "true" }
}
- },
+ }
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "!foo",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "!foo", comparator: "booleanEquals", expected: "true" }
}
- },
+ }
{
- "state": "failure",
- "matcher": {
- "errorType": "OhNo"
- }
+ state: "failure"
+ matcher: { errorType: "OhNo" }
}
]
- },
+ }
D: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "errorType": OhNo
- }
+ state: "success"
+ matcher: { errorType: OhNo }
}
]
- },
+ }
E: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "[foo]",
- "expected": "hi",
- "comparator": "allStringEquals"
- }
+ state: "success"
+ matcher: {
+ output: { path: "[foo]", expected: "hi", comparator: "allStringEquals" }
}
- },
+ }
{
- "state": "failure",
- "matcher": {
- "output": {
- "path": "[foo]",
- "expected": "bye",
- "comparator": "anyStringEquals"
- }
+ state: "failure"
+ matcher: {
+ output: { path: "[foo]", expected: "bye", comparator: "anyStringEquals" }
}
}
]
- },
+ }
F: {
- "deprecated": true,
- "tags": ["A", "B"],
- "acceptors": [
+ deprecated: true
+ tags: ["A", "B"]
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "success": true
- }
- },
+ state: "success"
+ matcher: { success: true }
+ }
{
- "state": "failure",
- "matcher": {
- "success": false
- }
+ state: "failure"
+ matcher: { success: false }
}
]
}
)
operation A {
- input: AInput,
- output: AOutput,
- errors: [OhNo],
+ input: AInput
+ output: AOutput
+ errors: [
+ OhNo
+ ]
}
@input
@@ -128,7 +98,7 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
@error("client")
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-missing-success-state.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-missing-success-state.smithy
index 8a9a79a8aec..8fbd9ca8ce5 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-missing-success-state.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-missing-success-state.smithy
@@ -6,19 +6,17 @@ use smithy.waiters#waitable
@waitable(
MissingSuccessState: {
- "documentation": "This waiter is missing a success state",
- "acceptors": [
+ documentation: "This waiter is missing a success state"
+ acceptors: [
{
- "state": "failure",
- "matcher": {
- "success": true
- }
+ state: "failure"
+ matcher: { success: true }
}
]
}
)
operation A {
- input: AInput,
+ input: AInput
output: AOutput
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-name-conflicts.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-name-conflicts.smithy
index 11939b9f9be..3249383c6bb 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-name-conflicts.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/errorfiles/waiter-name-conflicts.smithy
@@ -5,44 +5,39 @@ namespace smithy.example
use smithy.waiters#waitable
service InvalidService {
- version: "2020-11-30",
- operations: [A, B],
+ version: "2020-11-30"
+ operations: [
+ A
+ B
+ ]
}
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hi'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hi'", comparator: "booleanEquals", expected: "true" }
}
}
]
- },
+ }
B: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hey'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hey'", comparator: "booleanEquals", expected: "true" }
}
}
]
}
)
operation A {
- input: AInput,
- output: AOutput,
+ input: AInput
+ output: AOutput
}
@input
@@ -50,43 +45,35 @@ structure AInput {}
@output
structure AOutput {
- foo: String,
+ foo: String
}
@waitable(
A: {
- "documentation": "A",
- "acceptors": [
+ documentation: "A"
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hi'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hi'", comparator: "booleanEquals", expected: "true" }
}
}
]
- },
+ }
B: {
- "acceptors": [
+ acceptors: [
{
- "state": "success",
- "matcher": {
- "output": {
- "path": "foo == 'hey'",
- "comparator": "booleanEquals",
- "expected": "true"
- }
+ state: "success"
+ matcher: {
+ output: { path: "foo == 'hey'", comparator: "booleanEquals", expected: "true" }
}
}
]
}
)
operation B {
- input: BInput,
- output: BOutput,
+ input: BInput
+ output: BOutput
}
@input
@@ -94,5 +81,5 @@ structure BInput {}
@output
structure BOutput {
- foo: String,
+ foo: String
}
diff --git a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/model-runtime-types.smithy b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/model-runtime-types.smithy
index 83fa7ee80be..8d5ef39f754 100644
--- a/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/model-runtime-types.smithy
+++ b/smithy-waiters/src/test/resources/software/amazon/smithy/waiters/model-runtime-types.smithy
@@ -21,23 +21,23 @@ integer SizedInteger2
integer SizedInteger3
list StringList {
- member: String,
+ member: String
}
@length(min: 5, max: 1000)
list SizedStringList {
- member: String,
+ member: String
}
map StringListMap {
- key: String,
- value: StringList,
+ key: String
+ value: StringList
}
@length(min: 5, max: 1000)
map SizedStringListMap {
- key: String,
- value: StringList,
+ key: String
+ value: StringList
}
union MyUnion {
@@ -49,8 +49,8 @@ structure MyStruct {
}
structure RecursiveStruct {
- foo: StringList,
- bar: RecursiveStructList,
+ foo: StringList
+ bar: RecursiveStructList
}
@length(min: 1, max: 1)