[BUG][typescript-axios] The wrong type is generated by additionalProperties
#20029
Open
5 of 6 tasks
Labels
additionalProperties
#20029
Bug Report Checklist
Description
When there is an
additionalProperty
value in schemas, it generates incorrect TypeScript code typed asNull
instead ofnull
.openapi-generator version
7.9.0 (
@openapitools/openapi-generator-cli
is 2.15.3)OpenAPI declaration file content or url
Note
It works fine when there is no
additionalProperties
optionCaution
It works incorrectly when there is an
additionalProperties
optionGeneration Details
Note
It works fine when there is no
additionalProperties
option.openapi-generator/FILES
models/sample-data.ts
Caution
It works incorrectly when there is an
additionalProperties
option.openapi-generator/FILES
models/sample-data.ts
models/sample-data-sample-property.ts
Steps to reproduce
$ npm install @openapitools/openapi-generator-cli@2.15.3 # Generate the code with the `sample.yaml` I've uploaded the above $ npx openapi-generator-cli generate \ -g typescript-axios \ -i sample.yaml \ -o sample \ --additional-properties stringEnums=true,legacyDiscriminatorBehavior=false,withSeparateModelsAndApi=true,modelPackage=models,apiPackage=apis,useSingleRequestParameter=true
Related issues/PRs
Nothing
Suggest a fix
It should generate the
null
instead ofNull
The text was updated successfully, but these errors were encountered: