Skip to content

handle blank enum #1636

Open
Open
@stefanprobst

Description

@stefanprobst

i am getting the following from a django restframework generated openapi doc:

components:
  schemas:
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null

which this generator transforms into:

// src/api/models/BlankEnum.ts
export enum BlankEnum {
    = '',
}

and

// src/api/models/NullEnum.ts
export type NullEnum = {
};

note how src/api/models/BlankEnum.ts is invalid syntax and causes a compile error

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions