aws-pdk icon indicating copy to clipboard operation
aws-pdk copied to clipboard

[BUG] (type-safe-api) array responses produce broken code

Open cogwirrel opened this issue 1 year ago • 3 comments

Describe the bug

Returning an array as the top level response from an operation causes code to be generated which does not compile.

Expected Behavior

Working code.

Current Behavior

Broken code eg:

    const marshal = (statusCode: number, responseBody: any): string => {
        let marshalledBody = responseBody;
        switch(statusCode) {
            case 200:
                marshalledBody = JSON.stringify(Array<AssetResponse>ToJSON(marshalledBody));
                break;

Reproduction Steps

Use spec from https://github.com/aws/aws-pdk/issues/863

Possible Solution

No response

Additional Information/Context

No response

PDK version used

0.23.70

What languages are you seeing this issue on?

Typescript, Java, Python

Environment details (OS name and version, etc.)

osx

cogwirrel avatar Oct 20 '24 03:10 cogwirrel

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Dec 23 '24 00:12 github-actions[bot]

This is still an issue

rubenfonseca avatar Dec 23 '24 08:12 rubenfonseca

Is this still being looked at? Also facing the same issue

kenrictractable avatar Aug 08 '25 04:08 kenrictractable