Skip to content

[Bug][http-client-js] When an Enum has a value of 0, the output value is missing in http-client-js #7026

Open
@sho-pb

Description

@sho-pb

Describe the bug

An Enum with a value of "0" is defined as shown below:

enum TestEnum {
  Key1: 0,
  Key2: 1,
}

model Widget {
  id: string;
  weight: int32;
  color: "red" | "blue";
  testEnum: TestEnum;
}

When this is compiled with http-client-js, the Enum output in the generated models will be missing the value 0, as shown below:

export enum TestEnum {
  Key1 = , // 0 is missing
  Key2 = 1
}

Reproduction

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions