You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I have a directory (e.g., my_project/models/) containing many Python modules, each with multiple Pydantic models. I’d like to know if there’s a way to automatically generate TypeScript types for all Pydantic models in a directory or package, without manually specifying each module.
Does pydantic2ts support this functionality natively? Or would I need to implement this myself, e.g., by dynamically importing all models in the directory?
The text was updated successfully, but these errors were encountered:
Hi, pydantic2ts doesn't currently support this functionality but I think it should be fairly simple to add. And it makes sense as a feature. I'll give it a try within the next few days.
I'll also allow --module to be specified multiple times, idk why I haven't done that before now
Hi,
I’m currently using pydantic2ts to generate TypeScript types from my Pydantic models, and it works great when specifying a single module like:
pydantic2ts --module my_project.models.some_model --output ./types/some_model.ts
However, I have a directory (e.g., my_project/models/) containing many Python modules, each with multiple Pydantic models. I’d like to know if there’s a way to automatically generate TypeScript types for all Pydantic models in a directory or package, without manually specifying each module.
Does pydantic2ts support this functionality natively? Or would I need to implement this myself, e.g., by dynamically importing all models in the directory?
The text was updated successfully, but these errors were encountered: