Skip to content

Upgrade smithy version to 1.54.0 #1540

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

Merged
merged 2 commits into from
Mar 3, 2025
Merged

Conversation

smilkuri
Copy link
Contributor

@smilkuri smilkuri commented Mar 2, 2025

Issue #, if available:
Internal JS-5755

Description of changes:
Updates smithy to 1.54.0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@smilkuri smilkuri requested a review from a team as a code owner March 2, 2025 20:13
@trivikr
Copy link
Contributor

trivikr commented Mar 3, 2025

Error thrown

Error: ROR] smithy.example#GetFoo: The operation `smithy.example#GetFoo` is marked with `smithy.rules#operationContextParams` which contains a key `opContextParamMultiSelectList` with a JMESPath path `fooListObjObj[*].[fooList[0], fooObject.bar, fooString]` with unsupported expressions: 'index'. | OperationContextParamsTrait /Users/runner/work/smithy-typescript/smithy-typescript/smithy-typescript-codegen/build/resources/test/software/amazon/smithy/typescript/codegen/endpointsV2/endpoints-operation-context-params.smithy:58:1

This validation was added in smithy-lang/smithy#2442

Since smithy-typescript clients do not have dependency on JMESPath, we added custom code to implement Multiselect List and Flatten which contained unit tests as per JMESPath docs

It looks like following support is not required:

- "opContextParamMultiSelectList": { path: "fooListObjObj[*].[fooList[0], fooObject.bar, fooString]" }
+ "opContextParamMultiSelectList": { path: "fooListObjObj[*].[fooObject.bar, fooString]" }

"opContextParamMultiSelectList": { path: "fooListObjObj[*].[fooList[0], fooObject.bar, fooString]" }

- "opContextParamMultiSelectList: { type: \"operationContextParams\", get: (input?: any) => input?.fooListObjObj?.map((obj: any) => [obj?.fooList[0],obj?.fooObject?.bar,obj?.fooString].filter((i) => i)) }",
+ "opContextParamMultiSelectList: { type: \"operationContextParams\", get: (input?: any) => input?.fooListObjObj?.map((obj: any) => [obj?.fooObject?.bar,obj?.fooString].filter((i) => i)) }",

"opContextParamMultiSelectList: { type: \"operationContextParams\", get: (input?: any) => input?.fooListObjObj?.map((obj: any) => [obj?.fooList[0],obj?.fooObject?.bar,obj?.fooString].filter((i) => i)) }",

@smilkuri smilkuri merged commit ee3ec22 into smithy-lang:main Mar 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants