You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"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:
/** * This data structure represents events that have occurred on an instance of * an object class. */exportinterfaceRdapEvent{/** the reason for the event */eventAction: string;}
However if you update eventAction's definition to
{
"description": "the reason for the event",
"enum": ["registration", "reregistration", "last changed"]
}
The property's TSDoc comment is gone:
/** * This data structure represents events that have occurred on an instance of * an object class. */exportinterfaceRdapEvent{eventAction: "registration"|"reregistration"|"last changed";}
The text was updated successfully, but these errors were encountered:
Slightly orthogonal, typeconv discards descriptions on enum definitions as well. Consider this schema:
{
"definitions": {
"EventAction": {
"description": "This is some action that happened.",
"enum": ["registration", "reregistration", "last changed"]
},
"Event": {
"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",
"allOf": [{ "$ref": "#/definitions/EventAction" }]
}
},
"required": ["eventAction"],
"additionalProperties": false
}
}
}
typeconv translates this to:
exporttypeEventAction="registration"|"reregistration"|"last changed";/** * This data structure represents events that have occurred on an instance of * an object class. */exportinterfaceEvent{eventAction: EventAction;}
While something like this would be more reasonable:
/** This is some action that happened. */exporttypeEventAction="registration"|"reregistration"|"last changed";/** * This data structure represents events that have occurred on an instance of * an object class. */exportinterfaceEvent{/** the reason for the event */eventAction: EventAction;}
Consider this schema:
typeconv translates this to the following TypeScript definition:
However if you update
eventAction
's definition toThe property's TSDoc comment is gone:
The text was updated successfully, but these errors were encountered: