Bug Report Checklist
Description
Using the typescript-fetch generator, if you set additionalProperties.fileNaming = kebab-case, then any API tries to import the required models using the default PascalCase instead of the correct filename of kebab-case.
openapi-generator version
7.22. I am not sure if it's a regression as imports were using barrel imports before.
OpenAPI declaration file content or url
{
"$schema": "https://raw.githubusercontent.com/OpenAPITools/openapi-generator-cli/master/apps/generator-cli/src/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.22.0",
"generators": {
"myApi": {
"inputSpec": "https://localhost:5001/openapi/v1.json",
"output": "src/api-client/myApi",
"generatorName": "typescript-fetch",
"enablePostProcessFile": true,
"additionalProperties": {
"fileNaming": "kebab-case",
"stringEnums": true,
"supportsES6": true,
"strictSpec": true
},
"globalProperty": {
"supportingFiles": "",
"models": "",
"apis": "MyApi1"
}
}
}
}
}
Generation Details
Steps to reproduce
- using the above openapitools.json, run
openapi-generator-cli generate.
- inspect any api.ts file, and see that it's using incorrect file import paths
Related issues/PRs
Suggest a fix
typescript-angular does not have this problem. they are using the operations array instead of the import array to import models.
Bug Report Checklist
Description
Using the typescript-fetch generator, if you set
additionalProperties.fileNaming = kebab-case, then any API tries to import the required models using the default PascalCase instead of the correct filename of kebab-case.openapi-generator version
7.22. I am not sure if it's a regression as imports were using barrel imports before.
OpenAPI declaration file content or url
{ "$schema": "https://raw.githubusercontent.com/OpenAPITools/openapi-generator-cli/master/apps/generator-cli/src/config.schema.json", "spaces": 2, "generator-cli": { "version": "7.22.0", "generators": { "myApi": { "inputSpec": "https://localhost:5001/openapi/v1.json", "output": "src/api-client/myApi", "generatorName": "typescript-fetch", "enablePostProcessFile": true, "additionalProperties": { "fileNaming": "kebab-case", "stringEnums": true, "supportsES6": true, "strictSpec": true }, "globalProperty": { "supportingFiles": "", "models": "", "apis": "MyApi1" } } } } }Generation Details
Steps to reproduce
openapi-generator-cli generate.Related issues/PRs
Suggest a fix
typescript-angular does not have this problem. they are using the
operationsarray instead of theimportarray to import models.