Created by: masmgr
Fixes #7174 (closed). Please review.
Use /
instead of File.Separator
. File.Separator
is /
in Windows.
A target method is postProcessOperationsWithModels
of openapi-generator\modules\openapi-generator\src\main\java\org\openapitools\codegen\languages\TypeScriptClientCodegen.java.
Before
im.put("filename", ((String) im.get("import")).replace(".", File.Separator));
After
im.put("filename", ((String) im.get("import")).replace(".", "/"));
By this, OpenAPI generator generated valid import path in typescript.
Expected Code
import { Pet } from '../models/Pet';
Actual Code
import { Pet } from '..\models\Pet';