smithy-lang / smithy

Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
https://smithy.io
Apache License 2.0
1.7k stars 201 forks source link

Fix docs for `aws.iam#serviceResolvedConditionKeys` and `aws.iam#conditionKeyValue` #2287

Closed david-perez closed 1 month ago

david-perez commented 1 month ago

Besides missing imports, aws.iam#conditionKeyValue was referring to an undefined condition key.

Error if you build the current model:

Shape: smithy.example#OperationAInput$key
File:  /home/ANT.AMAZON.COM/davidpz/code/smithy-rs-main/codegen-server-test/../codegen-core/common-test-models/simple.smithy:22:9

19| @conditionKeys(["myservice:ActionContextKey1"])
20| operation OperationA {
21|     input := {
22|         @conditionKeyValue("ActionContextKey1")
  |         ^

This operation `smithy.example#OperationA` scoped within the
`smithy.example#MyService` service with member
`smithy.example#OperationAInput$key` refers to an undefined condition key
`ActionContextKey1`. Expected one of the following defined condition keys:
[`myservice:ActionContextKey1`]

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

david-perez commented 1 month ago

Would have been caught by https://github.com/smithy-lang/smithy/issues/298.