-
-
Notifications
You must be signed in to change notification settings - Fork 281
Description
Description
Description:
I’ve encountered a serious issue with the @hey-api/openapi-ts package. It appears that the tool has the potential to clear a directory when executed, which can lead to unintentional data loss.
Steps to Reproduce:
Install the package and configure it according to the documentation.
Run the tool to generate TypeScript types from an OpenAPI specification.
Observe that it might clear the directory or remove files unexpectedly.
Expected Behavior:
The tool should generate TypeScript types without modifying or deleting any files in the project directory unless explicitly configured to do so.
Actual Behavior:
The tool seems to clear or delete files in the specified directory, causing potential data loss.
Possible Impact:
Important files could be accidentally deleted.
Risk of data loss in the project directory without sufficient warning.
Recommendations:
The tool should have better safeguards in place to prevent accidental deletion of files.
It would be helpful if the tool issued a clearer warning or confirmation before performing destructive operations.
Users should be able to configure the behavior of the tool to avoid modifying or deleting critical files.
This should help you explain the issue clearly. Let me know if you'd like to adjust any details!
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example
OpenAPI specification (optional)
No response
System information (optional)
No response