Skip to content

Enums are not translated to types #10

@giovanni-orciuolo

Description

@giovanni-orciuolo

In my JSON schema I have this:

"CodeIdType": {
    "type": "string",
    "enum": [
      "Proxy",
      "Multisig",
      "Govec",
      "Staking"
    ]
}

CodeIdType is referenced in the generated TS, but the type itself is not generated. I expect to have something like:

export type CodeIdType = "Proxy" | "Multisig" | "Govec" | "Staking";

Just like string aliases are currently translated, for example:

"Addr": {
    "type": "string"
}

Becomes

export type Addr = string;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions