Commit 4baefd1
[smithy-rs] Add support for
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
We have to support the new [`operationContextParams`
trait](https://smithy.io/2.0/additional-specs/rules-engine/parameters.html#smithy-rules-operationcontextparams-trait)
for endpoint resolution. This trait specifies JMESPath expressions for
selecting parameter data from the operation's input type.
## Description
<!--- Describe your changes in detail -->
* Add codegen support for the [JMESPath
`keys`](https://jmespath.org/specification.html#keys) function (required
by the trait
[spec](https://smithy.io/2.0/additional-specs/rules-engine/parameters.html#smithy-rules-operationcontextparams-trait))
* Add codegen support for the trait itself. This is achieved by
generating `get_param_name` functions for each param specified in
`operationContextParams`. These functions pull the data out of the input
object and it is added to the endpoint params in the
`${operationName}EndpointParamsInterceptor`
## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Updated the existing test suite for JMESPath codegen to test the `keys`
function. Updated the existing EndpointsDecoratorTest with an
`operationContextParams` trait specifying one param of each supported
type to test the codegen.
## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._operationContextParams Endpoints trait (#3755)1 parent dd4230c commit 4baefd1
File tree
15,586 files changed
+47162
-385
lines changed- sdk
- accessanalyzer/src/operation
- account/src/operation
- acmpca/src/operation
- acm/src/operation
- amplifybackend/src/operation
- amplifyuibuilder/src/operation
- amplify/src/operation
- amp/src/operation
- apigatewaymanagement/src/operation
- apigatewayv2/src/operation
- apigateway/src/operation
- appconfigdata/src/operation
- appconfig/src/operation
- appfabric/src/operation
- appflow/src/operation
- appintegrations/src/operation
- applicationautoscaling/src/operation
- applicationcostprofiler/src/operation
- applicationdiscovery/src/operation
- applicationinsights/src/operation
- applicationsignals/src/operation
- appmesh/src/operation
- apprunner/src/operation
- appstream/src/operation
- appsync/src/operation
- apptest/src/operation
- arczonalshift/src/operation
- artifact/src/operation
- athena/src/operation
- auditmanager/src/operation
- autoscalingplans/src/operation
- autoscaling/src/operation
- b2bi/src/operation
- backupgateway/src/operation
- backup/src/operation
- batch/src/operation
- bcmdataexports/src/operation
- bedrockagentruntime/src/operation
- bedrockagent/src/operation
- bedrockruntime/src/operation
- bedrock/src/operation
- billingconductor/src/operation
- braket/src/operation
- budgets/src/operation
- chatbot/src/operation
- chimesdkidentity/src/operation
- chimesdkmediapipelines/src/operation
- chimesdkmeetings/src/operation
- chimesdkmessaging/src/operation
- chimesdkvoice/src/operation
- chime/src/operation
- cleanroomsml/src/operation
- cleanrooms/src/operation
- cloud9/src/operation
- cloudcontrol/src/operation
- clouddirectory/src/operation
- cloudformation/src/operation
- cloudfrontkeyvaluestore/src/operation
- cloudfront/src/operation
- cloudhsmv2/src/operation
- cloudhsm/src/operation
- cloudsearchdomain/src/operation
- cloudsearch/src/operation
- cloudtraildata/src/operation
- cloudtrail/src/operation
- cloudwatchevents/src/operation
- cloudwatchlogs/src/operation
- cloudwatch/src/operation
- codeartifact/src/operation
- codebuild/src/operation
- codecatalyst/src/operation
- codecommit/src/operation
- codeconnections/src/operation
- codedeploy/src/operation
- codeguruprofiler/src/operation
- codegurureviewer/src/operation
- codegurusecurity/src/operation
- codepipeline/src/operation
- codestarconnections/src/operation
- codestarnotifications/src/operation
- codestar/src/operation
- cognitoidentityprovider/src/operation
- cognitoidentity/src/operation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
15,586 files changed
+47162
-385
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
247 | 250 | | |
248 | 251 | | |
249 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
247 | 250 | | |
248 | 251 | | |
249 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
256 | 259 | | |
257 | 260 | | |
258 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
0 commit comments