cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

Option to use system temporary directory #218

Closed dlid closed 2 years ago

dlid commented 2 years ago

Hi,

we've just started using ng-open-gen and it looks great. However we have a small issue when the new files are generated in a folder next to the output folder.

Our VS Code workspace contains a lot of files already, so when all the files from ng-openapi-gen is created in the temp dir and then deleted again, VSCode search engine starts indexing files in the background and the whole system kind of freezes sometimes on our Window development environments.

So I figured it could be useful to have the option to generate the tempdir in the system temp folder instead of next to the output dir.

I have created a fork and made the changes, but since I have not contributed earlier I figured it would be a good idea to add this suggestion as an issue before I create the Pull Request just to see if this is an idea that other people may find useful.

The option could be a simple boolean like this:

"useTempDir": true
mojoaxel commented 2 years ago

Good idea! I would prefer, if the system's tmp folder is used by default but could be overwritten by an option, if needed. Something like this:

"tmpDir": "/custom/tmp"
luisfpg commented 2 years ago

Closing this as https://github.com/cyclosproject/ng-openapi-gen/pull/219 was merged