This fixes #28 by providing a --readonly-interfaces option that prevents non-optional fields with default values to become optional in the TypeScript interface.
--readonly-interfaces can be read as "create interfaces for data that is read by an API", i.e. the interface for data generated by pydantic (in contrast to data that gets deserialized by pydantic).
For more information, see README.md as well as tests/expected_results/optionals/README.md.
This fixes #28 by providing a
--readonly-interfaces
option that prevents non-optional fields with default values to become optional in the TypeScript interface.--readonly-interfaces
can be read as "create interfaces for data that is read by an API", i.e. the interface for data generated by pydantic (in contrast to data that gets deserialized by pydantic).For more information, see
README.md
as well astests/expected_results/optionals/README.md
.