Open rallets opened 9 months ago
I'm running into this issue as well, did you ever find a solution? I've thought about looking into writing a custom template but that feels like a lot of work - and I agree with you that this is a bug!
@chris-hut I changed my approach in the generation of the apis/models. In the backend (Asp.net core) I added a custom swagger document just for the frontend, and decorated (minimal api) all the endpoint I was interested in. In this way I was able to generate only what I needed, and basically bypassed this bug ☺️
Bug Report Checklist
Description
I'm excluding some apis and models using
.openapi-generator-ignore
. The apis and models are filtered correctly, but theapis/index.ts
andmodels/index.ts
files contain the import of ALL the possible files, filtered or not. This is breaking the typescript build.Am I doing something wrong, or this is effectively a bug?
openapi-generator version
7.4.0-SNAPSHOT
OpenAPI declaration file content or url
Full repro, including the code generated by openapi-generator.
https://github.com/rallets/openapi-generator-bug
Steps to reproduce
Just run the syncapi.bat script that use docker
Related issues/PRs
Haven't found similar issues.
Suggest a fix
The index.ts files should not include the excluded files.
Thank you