Closed
Description
Thank you for the great project @drwpow !
I am trying to migrate to the v7, I only noticed an issue with nullable enums.
When I run npx -y openapi-typescript@next test.json > test.ts
on this spec:
{
"openapi": "3.1.0",
"info": {
"title": "Minimal API with Nullable Enum",
"version": "1.0.0"
},
"paths": {
"/example": {
"get": {
"summary": "Get Example Value",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"enum": ["option1", "option2", "option3"],
"nullable": true
}
}
}
}
}
}
}
}
}
}
}
For me value should be nullable: value?: "option1" | "option2" | "option3" | null;
Is it a bug ?
Originally posted by @gduliscouet-ubitransport in #1368 (comment)