pydantic-to-typescript
pydantic-to-typescript copied to clipboard
Fix bug when using --module foo and foo is a directory.
- The current check would try to load that as a file and fail.
- Pointing to the file itself (foo/init.py) doesn't work because then the _is_submodule check fails, because the module name is a random UUID in that case.
PYTHONPATH=. pydantic2ts.py --module foo --output foo.tsworks in this case.