Script that automatically populates a TypeORM entity with the class-validator
validators we use to decorate. Meant to be used with entities generated by the typeorm-model-generator
script available from npm.
First clone the repo. You need some version of Python 3 installed, if it doesn't work try 3.8 because that's what I made it on :^). To set it up, run
pip install -r requirements.txt
It should be good to use now. The syntax is
py main.py path-to-input-file
and it prints the result on stdout
. So to store the output in a file, you can run
py main.py path-to-input-file > path-to-desired-output-file
where the output file doesn't need to already exist. If it does, it'll be overwritten.