From 403ed0b80b6ac3fed0237b7d5f4f1926579f7b3a Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Tue, 16 Nov 2021 12:58:34 -0800 Subject: [PATCH] Remove OperationMissingInput|Output These validators nudged modelers to define explicit input and output references for every operation, but added a lot of noise and don't achieve the core objective of defining a dedicated input and output shape for every operation. Better validation could be added through a linter that discourages the use of Unit for operations at all. --- .../operation-input-output-and-unit-types.md | 5 --- .../awsJson1_0/empty-input-output.smithy | 2 - .../model/awsJson1_0/endpoint-paths.smithy | 1 - .../model/awsJson1_0/endpoints.smithy | 2 - .../model/shared-types.smithy | 14 ------- .../clientendpointdiscovery/no-input.errors | 1 - .../clientendpointdiscovery/no-output.errors | 1 - .../errorfiles/http-checksum-trait.smithy | 2 +- .../contains-reserved-words-validator.json | 2 - .../input-output-structure-reuse.json | 2 - .../missing-paginated-trait-validator.json | 4 -- ...tandard-operation-verb-validator-test.json | 4 -- .../smithy/model/loader/AstModelLoader.java | 9 ----- .../smithy/model/loader/IdlModelParser.java | 9 ----- .../smithy/model/loader/LoaderUtils.java | 38 ------------------- .../auth/auth-trait-invalid-shape-id.json | 6 --- ...th-trait-must-target-auth-definitions.json | 6 --- ...uth-trait-must-target-service-schemes.json | 6 --- .../validators/examples-trait-validator.json | 6 --- .../validators/host-request-validator.json | 2 - .../http-checksum-required-trait.json | 2 - .../http-method-semantics-validator.json | 6 --- .../http-request-response-validator.json | 2 - ...ttp-response-code-semantics-validator.json | 6 --- .../http-uri-conflict-validator.json | 2 - .../lifecycle/valid-implicit-lifecycles.json | 2 - .../validates-idempotent-lifecycles.json | 2 - ...es-instance-and-collection-operations.json | 2 - .../validates-readonly-lifecycles.json | 2 - .../linters/emit-each-selector-validator.json | 3 -- .../paginated/paginated-invalid.json | 2 - .../validators/paginated/paginated-valid.json | 2 - .../service-conflict-validator.json | 6 --- .../validators/single-operation-binding.json | 6 --- .../validators/streaming-trait-event.json | 2 - .../mqtt/traits/errorfiles/job-service.smithy | 2 - .../errorfiles/mqtt-topic-labels.smithy | 2 - .../subscribe-missing-output.smithy | 1 - ...cannot-wait-on-streaming-operations.smithy | 2 - ...inputOutput-operation-with-no-input.smithy | 1 - ...nputOutput-operation-with-no-output.smithy | 1 - .../errorfiles/output-on-bad-shapes.smithy | 1 - 42 files changed, 1 insertion(+), 178 deletions(-) diff --git a/designs/operation-input-output-and-unit-types.md b/designs/operation-input-output-and-unit-types.md index 10ad509605e..5dd34c97a88 100644 --- a/designs/operation-input-output-and-unit-types.md +++ b/designs/operation-input-output-and-unit-types.md @@ -180,11 +180,6 @@ structure GetFooOutput {} To encourage models to utilize the `@input` and `@output` traits, built-in validation will be added to Smithy. -When an operation does not define input or output explicitly a WARNING -validation event will be emitted with the ID `OperationMissingInput` or -`OperationMissingOutput`. This can be avoided by explicitly assigning the input -or output of an operation to a shape, including `smithy.api#Unit`. - If an operation input targets a shape other than `smithy.api#Unit` that is not marked with the `@input` trait, a WARNING validation event is emitted with the ID `OperationMissingInputTrait`. A similar event with an ID of 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 599212e86a8..f76f25b9f5b 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 @@ -12,7 +12,6 @@ use smithy.test#httpResponseTests /// The example tests how requests and responses are serialized when there's /// no request or response payload because the operation has no input or output. /// While this should be rare, code generators must support this. -@suppress(["OperationMissingInput", "OperationMissingOutput"]) operation NoInputAndNoOutput {} apply NoInputAndNoOutput @httpRequestTests([ @@ -114,7 +113,6 @@ apply NoInputAndNoOutput @httpResponseTests([ /// no request or response payload because the operation has no input and the /// output is empty. While this should be rare, code generators must support /// this. -@suppress(["OperationMissingInput"]) operation NoInputAndOutput { output: NoInputAndOutputOutput } 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 176e62678d2..4486b3fffbb 100644 --- a/smithy-aws-protocol-tests/model/awsJson1_0/endpoint-paths.smithy +++ b/smithy-aws-protocol-tests/model/awsJson1_0/endpoint-paths.smithy @@ -20,5 +20,4 @@ use smithy.test#httpRequestTests appliesTo: "client" } ]) -@suppress(["OperationMissingInput", "OperationMissingOutput"]) operation HostWithPathOperation {} diff --git a/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy b/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy index 3da9b054eba..84412b90eab 100644 --- a/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy +++ b/smithy-aws-protocol-tests/model/awsJson1_0/endpoints.smithy @@ -23,7 +23,6 @@ use smithy.test#httpRequestTests } ]) @endpoint(hostPrefix: "foo.") -@suppress(["OperationMissingInput", "OperationMissingOutput"]) operation EndpointOperation {} @@ -47,7 +46,6 @@ operation EndpointOperation {} } ]) @endpoint(hostPrefix: "foo.{label}.") -@suppress(["OperationMissingOutput"]) operation EndpointWithHostLabelOperation { input: EndpointWithHostLabelOperationInput, } diff --git a/smithy-aws-protocol-tests/model/shared-types.smithy b/smithy-aws-protocol-tests/model/shared-types.smithy index b2e25f79e6b..8b1c6e29e92 100644 --- a/smithy-aws-protocol-tests/model/shared-types.smithy +++ b/smithy-aws-protocol-tests/model/shared-types.smithy @@ -33,20 +33,6 @@ metadata suppressions = [ reason: """ This is a temporary solution until we rewrite these tests to define input, output, and use the `@input` and `@output` traits.""" - }, - { - id: "OperationMissingInput", - namespace: "*", - reason: """ - This is a temporary solution until we rewrite these tests to define input, output, - and use the `@input` and `@output` traits.""" - }, - { - id: "OperationMissingOutput", - namespace: "*", - reason: """ - This is a temporary solution until we rewrite these tests to define input, output, - and use the `@input` and `@output` traits.""" } ] diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-input.errors b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-input.errors index ad9885a1126..e69de29bb2d 100644 --- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-input.errors +++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-input.errors @@ -1 +0,0 @@ -[WARNING] ns.foo#PutObject: This operation does not define output | OperationMissingOutput diff --git a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-output.errors b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-output.errors index 35a438c7cb7..afd17fff875 100644 --- a/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-output.errors +++ b/smithy-aws-traits/src/test/resources/software/amazon/smithy/aws/traits/errorfiles/clientendpointdiscovery/no-output.errors @@ -1,2 +1 @@ -[WARNING] ns.foo#DescribeEndpoints: This operation does not define output | OperationMissingOutput [ERROR] ns.foo#DescribeEndpoints: Endpoint discovery operation output must only contain an `Endpoints` member, but found: [] | ClientEndpointDiscovery 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 585baf15bfa..fe17a6e31a1 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 @@ -15,7 +15,7 @@ structure NoBehaviorInput {} @httpChecksum( requestChecksumRequired: true, ) -@suppress(["UnstableTrait", "OperationMissingInput"]) +@suppress(["UnstableTrait"]) operation NoInput { output: Unit } diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/contains-reserved-words-validator.json b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/contains-reserved-words-validator.json index 2a469b75b54..a6427c46938 100644 --- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/contains-reserved-words-validator.json +++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/contains-reserved-words-validator.json @@ -202,8 +202,6 @@ }, "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"}, {"id": "OperationInputOutputName", "namespace": "ns.foo"} ], "validators": [ diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.json b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.json index 8cebe2e7946..0c8857514f3 100644 --- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.json +++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/input-output-structure-reuse.json @@ -106,8 +106,6 @@ }, "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"}, {"id": "OperationMissingInputTrait", "namespace": "ns.foo"}, {"id": "OperationMissingOutputTrait", "namespace": "ns.foo"} ], diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-paginated-trait-validator.json b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-paginated-trait-validator.json index 50a42517a32..05bdf783154 100644 --- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-paginated-trait-validator.json +++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/missing-paginated-trait-validator.json @@ -256,10 +256,6 @@ } }, "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ], "validators": [ { "name": "MissingPaginatedTrait" diff --git a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/standard-operation-verb-validator-test.json b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/standard-operation-verb-validator-test.json index af62a4653b2..ea4fdf167a1 100644 --- a/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/standard-operation-verb-validator-test.json +++ b/smithy-linters/src/test/resources/software/amazon/smithy/linters/errorfiles/standard-operation-verb-validator-test.json @@ -42,10 +42,6 @@ } }, "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ], "validators": [ { "name": "StandardOperationVerb", diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/loader/AstModelLoader.java b/smithy-model/src/main/java/software/amazon/smithy/model/loader/AstModelLoader.java index 6d0e0ea0769..6792f1998eb 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/loader/AstModelLoader.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/loader/AstModelLoader.java @@ -246,15 +246,6 @@ private void loadOperation(ShapeId id, ObjectNode node, FullyResolvedModelFile m .id(id) .source(node.getSourceLocation()) .addErrors(loadOptionalTargetList(modelFile, id, node, ERRORS)); - - if (!node.getMember("input").isPresent()) { - modelFile.events().add(LoaderUtils.createOperationMissingInput(id, node.getSourceLocation())); - } - - if (!node.getMember("output").isPresent()) { - modelFile.events().add(LoaderUtils.createOperationMissingOutput(id, node.getSourceLocation())); - } - loadOptionalTarget(modelFile, id, node, "input").ifPresent(builder::input); loadOptionalTarget(modelFile, id, node, "output").ifPresent(builder::output); modelFile.onShape(builder); diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/loader/IdlModelParser.java b/smithy-model/src/main/java/software/amazon/smithy/model/loader/IdlModelParser.java index 55970ff7a49..ca5b6aec7ec 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/loader/IdlModelParser.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/loader/IdlModelParser.java @@ -549,15 +549,6 @@ private void parseOperationStatement(ShapeId id, SourceLocation location) { ObjectNode node = IdlNodeParser.parseObjectNode(this, id.toString()); LoaderUtils.checkForAdditionalProperties(node, id, OPERATION_PROPERTY_NAMES, modelFile.events()); modelFile.onShape(builder); - - if (!node.getMember("input").isPresent()) { - modelFile.events().add(LoaderUtils.createOperationMissingInput(id, location)); - } - - if (!node.getMember("output").isPresent()) { - modelFile.events().add(LoaderUtils.createOperationMissingOutput(id, location)); - } - optionalId(node, "input", builder::input); optionalId(node, "output", builder::output); optionalIdList(node, ERRORS_KEYS, builder::addError); diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/loader/LoaderUtils.java b/smithy-model/src/main/java/software/amazon/smithy/model/loader/LoaderUtils.java index 41b1c10cfad..83ae57ef033 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/loader/LoaderUtils.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/loader/LoaderUtils.java @@ -110,42 +110,4 @@ static boolean containsErrorEvents(List events) { } return false; } - - /** - * Helper method to create a validation event when input is not explicitly defined. - * - * @param id Shape ID of the operation. - * @param location Where the operation is defined. - * @return Returns the event. - */ - static ValidationEvent createOperationMissingInput(ShapeId id, SourceLocation location) { - return ValidationEvent.builder() - .id("OperationMissingInput") - .severity(Severity.WARNING) - .shapeId(id) - .sourceLocation(location) - .message("This operation does not define input, so it defaults to smithy.api#Unit. Defining input " - + "for an operation, even if you don't need it today, future-proofs the operation by " - + "allowing input members to be added later.") - .build(); - } - - /** - * Helper method to create a validation event when output is not explicitly defined. - * - * @param id Shape ID of the operation. - * @param location Where the operation is defined. - * @return Returns the event. - */ - static ValidationEvent createOperationMissingOutput(ShapeId id, SourceLocation location) { - return ValidationEvent.builder() - .id("OperationMissingOutput") - .severity(Severity.WARNING) - .shapeId(id) - .sourceLocation(location) - .message("This operation does not define output, so it defaults to smithy.api#Unit. Defining output " - + "for an operation, even if you don't need it today, future-proofs the operation by " - + "allowing output members to be added later.") - .build(); - } } diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-invalid-shape-id.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-invalid-shape-id.json index 891f30c3b26..81a7a6982c9 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-invalid-shape-id.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-invalid-shape-id.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ] - }, "shapes": { "ns.foo#InvalidShapeId": { "type": "operation", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-auth-definitions.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-auth-definitions.json index db63fe99070..fcc95d893d3 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-auth-definitions.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-auth-definitions.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ] - }, "shapes": { "ns.foo#Valid1": { "type": "operation", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-service-schemes.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-service-schemes.json index 6e5cf4ed92c..fae8cd44135 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-service-schemes.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/auth/auth-trait-must-target-service-schemes.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ] - }, "shapes": { "ns.foo#Service": { "type": "service", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/examples-trait-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/examples-trait-validator.json index 17486e4afbf..b78084ea8e8 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/examples-trait-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/examples-trait-validator.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"} - ] - }, "shapes": { "ns.foo#Operation": { "type": "operation", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/host-request-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/host-request-validator.json index 1c32c164014..f9dce7312ec 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/host-request-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/host-request-validator.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.json index 0755e81679f..fd7a952eddc 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-checksum-required-trait.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.json index 76e871027f1..dc0d4564f7c 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-method-semantics-validator.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ] - }, "shapes": { "ns.foo#A": { "type": "operation", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-request-response-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-request-response-validator.json index 2d4d2eb149c..4e47e61cb6b 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-request-response-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-request-response-validator.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"}, {"id": "OperationMissingInputTrait", "namespace": "ns.foo"}, {"id": "OperationMissingOutputTrait", "namespace": "ns.foo"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-response-code-semantics-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-response-code-semantics-validator.json index 5b677ca00a7..934cdc6c159 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-response-code-semantics-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-response-code-semantics-validator.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"} - ] - }, "shapes": { "ns.foo#A": { "type": "operation", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-uri-conflict-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-uri-conflict-validator.json index a6f0c823b5b..39494af8fa0 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-uri-conflict-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/http-uri-conflict-validator.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/valid-implicit-lifecycles.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/valid-implicit-lifecycles.json index 324cbdd25c7..d24857c974b 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/valid-implicit-lifecycles.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/valid-implicit-lifecycles.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-idempotent-lifecycles.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-idempotent-lifecycles.json index 91657ae3237..374977d9c29 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-idempotent-lifecycles.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-idempotent-lifecycles.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-instance-and-collection-operations.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-instance-and-collection-operations.json index abea065f6a1..aeb796fa976 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-instance-and-collection-operations.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-instance-and-collection-operations.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-readonly-lifecycles.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-readonly-lifecycles.json index 1159bcffe13..c17a9b101bc 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-readonly-lifecycles.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/lifecycle/validates-readonly-lifecycles.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/linters/emit-each-selector-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/linters/emit-each-selector-validator.json index 205f5bba678..1aa40a17dc9 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/linters/emit-each-selector-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/linters/emit-each-selector-validator.json @@ -128,9 +128,6 @@ "type": "operation", "input": { "target": "ns.foo#OperationBInput" - }, - "traits": { - "smithy.api#suppress": ["OperationMissingOutput"] } }, "ns.foo#OperationBInput": { diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-invalid.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-invalid.json index 85f7e5a0af4..b60510daaec 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-invalid.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-invalid.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-valid.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-valid.json index b18a438fb09..1bd3808a70a 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-valid.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/paginated/paginated-valid.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"}, {"id": "OperationMissingInputTrait", "namespace": "*"}, {"id": "OperationMissingOutputTrait", "namespace": "*"} ] diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/service-conflict-validator.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/service-conflict-validator.json index 23de44b4a41..3f96c73853b 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/service-conflict-validator.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/service-conflict-validator.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "*"}, - {"id": "OperationMissingOutput", "namespace": "*"} - ] - }, "shapes": { "ns.foo#MyService": { "type": "service", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/single-operation-binding.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/single-operation-binding.json index 60056f52ff8..38286991352 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/single-operation-binding.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/single-operation-binding.json @@ -1,11 +1,5 @@ { "smithy": "1.0", - "metadata": { - "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"} - ] - }, "shapes": { "ns.foo#MyService": { "type": "service", diff --git a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/streaming-trait-event.json b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/streaming-trait-event.json index 451c4f1d406..4a5f92344b9 100644 --- a/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/streaming-trait-event.json +++ b/smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/streaming-trait-event.json @@ -2,8 +2,6 @@ "smithy": "1.0", "metadata": { "suppressions": [ - {"id": "OperationMissingInput", "namespace": "ns.foo"}, - {"id": "OperationMissingOutput", "namespace": "ns.foo"}, {"id": "OperationMissingInputTrait", "namespace": "ns.foo"}, {"id": "OperationMissingOutputTrait", "namespace": "ns.foo"} ] 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 755c98debfc..3ac12bf0f20 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 @@ -1,9 +1,7 @@ $version: "1.0" metadata suppressions = [ - {id: "OperationMissingInput", namespace: "aws.iotjobs"}, {id: "OperationMissingInputTrait", namespace: "aws.iotjobs"}, - {id: "OperationMissingOutput", namespace: "aws.iotjobs"}, {id: "OperationMissingOutputTrait", namespace: "aws.iotjobs"}, ] 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 dfc1f69314c..80ff8541d34 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 @@ -2,7 +2,6 @@ namespace smithy.example // Missing input for {foo} property. @smithy.mqtt#publish("events1/{foo}") -@suppress(["OperationMissingInput", "OperationMissingOutput"]) operation Operation1 {} @@ -51,7 +50,6 @@ structure Operation4Input { // No errors. @smithy.mqtt#publish("events5/{foo}") -@suppress(["OperationMissingOutput"]) operation Operation5 { input: Operation5Input } diff --git a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-missing-output.smithy b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-missing-output.smithy index 73281534bcd..a7f96920453 100644 --- a/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-missing-output.smithy +++ b/smithy-mqtt-traits/src/test/resources/software/amazon/smithy/mqtt/traits/errorfiles/subscribe-missing-output.smithy @@ -3,5 +3,4 @@ namespace smithy.example @smithy.mqtt#subscribe("events") -@suppress(["OperationMissingInput", "OperationMissingOutput"]) operation Foo {} 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 53d9c6f506f..2b780f35d1d 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 @@ -13,7 +13,6 @@ use smithy.waiters#waitable ] } ) -@suppress(["OperationMissingOutput"]) operation StreamingInput { input: StreamingInputInput } @@ -41,7 +40,6 @@ structure SuccessMessage {} ] } ) -@suppress(["OperationMissingInput"]) operation StreamingOutput { output: StreamingOutputOutput } 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 5ed6d899ccb..8cd4ca3c721 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 @@ -19,7 +19,6 @@ use smithy.waiters#waitable ] } ) -@suppress(["OperationMissingInput"]) operation A { output: AOutput } 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 926aaff5908..1be40a8989b 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 @@ -19,7 +19,6 @@ use smithy.waiters#waitable ] } ) -@suppress(["OperationMissingOutput"]) operation A { input: AInput } 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 9aaded7da3e..1b0e401aa7a 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 @@ -18,5 +18,4 @@ use smithy.waiters#waitable ] } ) -@suppress(["OperationMissingInput", "OperationMissingOutput"]) operation A {}