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

Support JMESPath flatten in OperationContextParams #1537

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Feb 27, 2025

Issue #, if available:

Description of changes:
Support JMESPath flatten in OperationContextParams


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

@trivikr trivikr force-pushed the op-context-params-flatten branch from 121df98 to b4efe8e Compare February 27, 2025 16:47
@trivikr trivikr marked this pull request as ready for review February 27, 2025 16:52
@trivikr trivikr requested a review from a team as a code owner February 27, 2025 16:52
value = value + separator + key.substring(0, key.length() - 3) + ".flat()";
} else {
// key is on object
value = value + separator + key + ").flat()";
Copy link
Contributor

@siddsriv siddsriv Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec question i believe: will there always be an opening parenthesis? since we are doing a concatenation with ").flat()"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. When the key is on object, there's already a map function on it which needs to be closed before flatten can be called.

@trivikr trivikr merged commit ef8d825 into main Feb 27, 2025
10 checks passed
@trivikr trivikr deleted the op-context-params-flatten branch February 27, 2025 18:16
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