aws / aws/aws-cdk

(stepfunctions): java sdk JsonPath.mapAt

Open
#28,288 0 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-stepfunctions effort/medium feature-request jsii p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

The java library is tougher to work with than Typescript (or other languages) because you can't just throw random json into the object and call it a day. You have to deal with the types, even though you don't want to. I want to pass a parameter into the `BatchSubmitJob` `BatchContainerOverrides.environment`. But I can't, because its a `Map`.

There is

### Use Case

There are functions for dealing with string, numbers and lists, but no maps:
```
JsonPath.stringAt(path);
JsonPath.numberAt(path);
JsonPath.listAt(path);
```

### Proposed Solution

What I want:
```
JsonPath.mapAt(path):
```

### Other Information

There is a `JsonPath.objectAt(path)` function, but for the life of me I can't make it useful. It returns an `IResolvable` and I can't seem to turn that into anything. So it might as well not exist.

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.112.0

### Environment details (OS name and version, etc.)

MacOS M1. Java 17

Contributor guide

Open the contributing guide

Research direction

Locate the JsonPath.stringAt, numberAt, listAt, and objectAt implementations and their existing tests, then compare how the Java Step Functions bindings represent map values. Done means JsonPath.mapAt(path) is available for passing a JSON map such as BatchContainerOverrides.environment, with coverage showing the expected generated value.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java, typescript
Domain
cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.