[jsc-to-ts] Discards descriptions on enums
- Dominant language
- TypeScript
- Stars
- 447
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Consider this schema:
```json
{
"title": "RDAP schema",
"definitions": {
"RdapEvent": {
"title": "RdapEvent",
"description": "This data structure represents events that have occurred on an instance of\nan object class.",
"type": "object",
"properties": {
"eventAction": {
"description": "the reason for the event",
"type": "string"
}
},
"required": ["eventAction"],
"additionalProperties": false
}
}
}
```
typeconv translates this to the following TypeScript definition:
```ts
/**
* This data structure represents events that have occurred on an instance of
* an object class.
*/
export interface RdapEvent {
/** the reason for the event */
eventAction: string;
}
```
However if you update `eventAction`'s definition to
```json
{
"description": "the reason for the event",
"enum": ["registration", "reregistration", "last changed"]
}
```
The property's TSDoc comment is gone:
```ts
/**
* This data structure represents events that have occurred on an instance of
* an object class.
*/
export interface RdapEvent {
eventAction: "registration" | "reregistration" | "last changed";
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.