Skip to content

Commit dcfdc3a

Browse files
committed
Add unbound operation validator for protocol tests
1 parent 05cd11c commit dcfdc3a

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed

smithy-aws-protocol-tests/model/awsJson1_0/main.smithy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ service JsonRpc10 {
4141
OperationWithDefaults,
4242
OperationWithRequiredMembers,
4343
OperationWithNestedStructure
44+
OperationWithRequiredMembersWithDefaults
4445
]
4546
}

smithy-aws-protocol-tests/model/awsJson1_1/main.smithy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ service JsonProtocol {
2626
OperationWithOptionalInputOutput,
2727
PutAndGetInlineDocuments,
2828
JsonEnums,
29+
JsonIntEnums
2930
NullOperation,
3031
SparseNullsOperation,
3132
GreetingWithErrors,

smithy-aws-protocol-tests/model/restJson1/main.smithy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ service RestJson {
6565

6666
// @httpResponseCode tests
6767
HttpResponseCode,
68+
ResponseCodeRequired
69+
ResponseCodeHttpFallback
6870

6971
// @streaming tests
7072
StreamingTraits,
@@ -133,6 +135,7 @@ service RestJson {
133135
MalformedTimestampBodyDateTime,
134136
MalformedTimestampBodyHttpDate,
135137
MalformedContentTypeWithoutBody,
138+
MalformedContentTypeWithoutBodyEmptyInput
136139
MalformedContentTypeWithBody,
137140
MalformedContentTypeWithPayload,
138141
MalformedContentTypeWithGenericString,

smithy-aws-protocol-tests/model/shared-types.smithy

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,33 @@ metadata suppressions = [
1818
}
1919
]
2020

21+
metadata validators = [
22+
{
23+
name: "EmitEachSelector"
24+
id: "UnboundTestOperation"
25+
message: "This operation in the AWS protocol tests is not bound to a service."
26+
namespaces: [
27+
// Overall protocol test suites.
28+
"aws.protocoltests.json10"
29+
"aws.protocoltests.json"
30+
"aws.protocoltests.query"
31+
"aws.protocoltests.ec2"
32+
"aws.protocoltests.restjson.validation"
33+
"aws.protocoltests.restjson"
34+
"aws.protocoltests.restxml"
35+
"aws.protocoltests.restxml.xmlns"
36+
// Service specific test suites.
37+
"com.amazonaws.apigateway"
38+
"com.amazonaws.glacier"
39+
"com.amazonaws.machinelearning"
40+
"com.amazonaws.s3"
41+
]
42+
configuration: {
43+
"selector": "operation :not(< service)"
44+
}
45+
}
46+
]
47+
2148
namespace aws.protocoltests.shared
2249

2350
list StringList {

smithy-protocol-tests/model/shared-types.smithy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77

88
$version: "2.0"
99

10+
metadata validators = [
11+
{
12+
name: "EmitEachSelector"
13+
id: "UnboundTestOperation"
14+
message: "This operation in the Smithy protocol tests is not bound to a service."
15+
namespaces: [
16+
// Overall protocol test suites.
17+
"smithy.protocoltests.rpcv2Cbor"
18+
]
19+
configuration: {
20+
"selector": "operation :not(< service)"
21+
}
22+
}
23+
]
24+
1025
namespace smithy.protocoltests.shared
1126

1227
list StringList {

0 commit comments

Comments
 (0)