Skip to content

Conversation

@bibermann
Copy link

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.

@bibermann bibermann force-pushed the 28-readonly-interfaces-option branch from 58d4c53 to d0cb367 Compare December 28, 2022 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Field with default value becomes optional on the TypeScript interface

1 participant