Bug Report Checklist
Description
When calling an API with a null date, you can't because the typescript type is wrong, and if you fudge it, it will throw an error because .toISOString does not exist on null.
openapi-generator version
5.3.0
OpenAPI declaration file content or url
openapi: 3.0.3
info:
title: Example
version: v1
paths: {}
components:
schemas:
Date:
type: string
format: date-time
nullable: true
Generation Details
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.3.0",
"generators": {
"user-api": {
"generatorName": "typescript-fetch",
"output": "src/libs/user-api",
"inputSpec": "https://.../users/v1/docs/spec/public/users/openapi.yml",
"additionalProperties": {
"modelPropertyNaming": "original",
"enumNameSuffix": ""
}
}
}
}
}
Steps to reproduce
Run openapi-generator-cli generate
Related issues/PRs
Suggest a fix
Make types:
Make coverter:
'col': value.col === undefined ? undefined : (value.date_of_birth.toISOString()),
Bug Report Checklist
Description
When calling an API with a null date, you can't because the typescript type is wrong, and if you fudge it, it will throw an error because .toISOString does not exist on null.
openapi-generator version
5.3.0
OpenAPI declaration file content or url
Generation Details
{ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { "version": "5.3.0", "generators": { "user-api": { "generatorName": "typescript-fetch", "output": "src/libs/user-api", "inputSpec": "https://.../users/v1/docs/spec/public/users/openapi.yml", "additionalProperties": { "modelPropertyNaming": "original", "enumNameSuffix": "" } } } } }Steps to reproduce
Run
openapi-generator-cli generateRelated issues/PRs
Suggest a fix
Make types:
Make coverter: