Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unbound operation validator for protocol tests #2426

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions smithy-aws-protocol-tests/model/awsJson1_0/main.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ service JsonRpc10 {
OperationWithDefaults,
OperationWithRequiredMembers,
OperationWithNestedStructure
OperationWithRequiredMembersWithDefaults
]
}
1 change: 1 addition & 0 deletions smithy-aws-protocol-tests/model/awsJson1_1/main.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ service JsonProtocol {
OperationWithOptionalInputOutput,
PutAndGetInlineDocuments,
JsonEnums,
JsonIntEnums
NullOperation,
SparseNullsOperation,
GreetingWithErrors,
Expand Down
3 changes: 3 additions & 0 deletions smithy-aws-protocol-tests/model/restJson1/main.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ service RestJson {

// @httpResponseCode tests
HttpResponseCode,
ResponseCodeRequired
ResponseCodeHttpFallback

// @streaming tests
StreamingTraits,
Expand Down Expand Up @@ -133,6 +135,7 @@ service RestJson {
MalformedTimestampBodyDateTime,
MalformedTimestampBodyHttpDate,
MalformedContentTypeWithoutBody,
MalformedContentTypeWithoutBodyEmptyInput
MalformedContentTypeWithBody,
MalformedContentTypeWithPayload,
MalformedContentTypeWithGenericString,
Expand Down
27 changes: 27 additions & 0 deletions smithy-aws-protocol-tests/model/shared-types.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,33 @@ metadata suppressions = [
}
]

metadata validators = [
{
name: "EmitEachSelector"
id: "UnboundTestOperation"
message: "This operation in the AWS protocol tests is not bound to a service."
namespaces: [
// Overall protocol test suites.
"aws.protocoltests.json10"
"aws.protocoltests.json"
"aws.protocoltests.query"
"aws.protocoltests.ec2"
"aws.protocoltests.restjson.validation"
"aws.protocoltests.restjson"
"aws.protocoltests.restxml"
"aws.protocoltests.restxml.xmlns"
// Service specific test suites.
"com.amazonaws.apigateway"
"com.amazonaws.glacier"
"com.amazonaws.machinelearning"
"com.amazonaws.s3"
]
configuration: {
"selector": "operation :not(< service)"
}
}
]

namespace aws.protocoltests.shared

list StringList {
Expand Down
15 changes: 15 additions & 0 deletions smithy-protocol-tests/model/shared-types.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@

$version: "2.0"

metadata validators = [
{
name: "EmitEachSelector"
id: "UnboundTestOperation"
message: "This operation in the Smithy protocol tests is not bound to a service."
namespaces: [
// Overall protocol test suites.
"smithy.protocoltests.rpcv2Cbor"
]
configuration: {
"selector": "operation :not(< service)"
}
}
]

namespace smithy.protocoltests.shared

list StringList {
Expand Down
Loading