actions-marketplace-validations/Pydantic to Typescript
Convert pydantic models into typescript definitions and ensure that your type definitions are in sync.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| python-module | name or filepath of the root python module. Typescript interfaces will be generated for all of the pydantic models contained within this module and its discoverable submodules. | yes | — |
| ts-file | path to the file where the resulting typescript definitions will be saved. Example: './frontend/apiTypes.ts'. | yes | — |
| exclude-models | comma-separated list of the names of any pydantic models which should be omitted from the resulting typescript definitions. | no | "" |
| fail-on-mismatch | Boolean flag indicating if type definition mismatches should cause this action to fail. | no | true |
| GITHUB_TOKEN | Value for secrets.GITHUB_TOKEN, necessary for pull requests to be automatically opened. | no | — |
Outputs
| name | description |
|---|---|
| mismatch | If true, the current typescript definitions in 'inputs.ts-file' are different from the ones which were automatically generated from the pydantic models. |