Closed
Description
Here is a property in my swagger.json
"Retained9": {
"maximum": 100,
"minimum": 0,
"type": "integer",
"description": "Retained9\r\nThis property is....\r\n",
"format": "int32",
"default": "100",
"nullable": true
},
Using openapi-typescript
version 6.7.6
this generates
/**
* Format: int32
* @description Retained9
* This property is...
*
* @default 100
*/ Retained9?: number | null;
But using openapi-typescript
version 7.4.4
this generates
/**
* Format: int32
* @description Retained9
* This property is used...
*
* @default 100
*/
Retained9: number;
It is good that the useless and annoying ?
has gone, but in the specification the property is nullable and therefore it is an error to have removed the | null
.