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

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

Open
cogwirrel opened this issue Oct 20, 2024 · 0 comments
Open

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

cogwirrel opened this issue Oct 20, 2024 · 0 comments
Labels
bug Something isn't working needs-triage

Comments

@cogwirrel
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant