Open
Description
Schema Inaccuracy
In many webhooks schemas that contain the pushed_at
property, it is not defined correctly.
"pushed_at": {
"oneOf": [
{ "type": "integer" },
{ "type": "string", "format": "date-time" }
],
"type": ["null", "integer", "string"]
},
When you transform that into typescript, it generates the following
pushed_at: (number | string) &
(
| (null & (number | string))
| (number & (number | string))
| ((number | string) & string)
);
Expected
This format results in no duplication, and is much more concise as to what the actual types of the values are
"pushed_at": {
"oneOf": [
{ "type": "integer" },
{ "type": "string", "format": "date-time" },
{ "type": "null" }
],
},
That would result in this generated typescript code:
pushed_at: number | string | null;
Reproduction Steps
n/a