gristlabs / gristlabs/ts-interface-builder

enum is not generated properly

Open
#32 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
138
Forks
31
PR merge metrics
No merged PRs in 30d

Description

Hi I looked at past issues and saw that enums should now be implemented... Also saw some manual types, but where do I put them? all the TI files are regularly overwritten

This is the openapi fragment:

```
Address:
description: Address data for shipping or billing
type: object
properties:

AddressTypeID:
type: string
enum:
- BA
- EX
description: BA - Billing Address, EX - Expedition
```

This is the output from ts-interface-builder:

```
/**
* This module was automatically generated by `ts-interface-builder`
*/
import * as t from "ts-interface-checker";
// tslint:disable:object-literal-key-quotes

export const Address = t.iface([], {
"AddressTypeID": t.enumlit("Address", "AddressTypeID"),
});

const exportedTypeSuite: t.ITypeSuite = {
Address,
};
export default exportedTypeSuite;
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.