Closed as not planned
Description
Description
"type": "array",
"items": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"profile_picture_url": {
"type": "string",
"nullable": True,
},
},
"required": [
"unique_id",
"first_name",
"last_name",
"profile_picture_url",
],
}
In this example OpenAPI spec, I get a generated type where profile_picture_url
is of type string
, not string | undefined
or string | null
.
Reproducible example or configuration
"type": "array",
"items": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"profile_picture_url": {
"type": "string",
"nullable": True,
},
},
"required": [
"unique_id",
"first_name",
"last_name",
"profile_picture_url",
],
}
`"npx",
"@hey-api/openapi-ts",
"-i",
"generated/openapi.json",
"-o",
output_dir,
"-c",
"@hey-api/client-fetch",`
OpenAPI specification (optional)
"type": "array",
"items": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"profile_picture_url": {
"type": "string",
"nullable": True,
},
},
"required": [
"unique_id",
"first_name",
"last_name",
"profile_picture_url",
],
}
System information (optional)
Latest versions of everything as of Jan 29