bcherny/json-schema-to-typescript

Using -i with wildcard overwrites source JSON file

Open

#365 opened on Feb 10, 2021

View on GitHub
 (7 comments) (1 reaction) (0 assignees)TypeScript (449 forks)github user discovery
buggood first issuehelp wanted

Repository metrics

Stars
 (3,302 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

To reproduce this problem, download the attached file:

example.zip

Then execute the following commands

unzip ./example.zip 
json2ts -i test/resources/multi-example/**/*.json --cwd test/resources/multi-example/schemas/
cat test/resources/multi-example/schemas/personForm.json 

File "personForm.json" is overwritten. Source file should never be overwritten.

Contributor guide