Skip to content

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

@cogwirrel

Description

@cogwirrel

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 #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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions