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
|‑‑module | name or filepath of the python module you would like to convert. All the pydantic models within it will be converted to typescript interfaces. Discoverable submodules will also be checked. |
24
-
|‑‑output | name of the file the typescript definitions should be written to. Ex: './frontend/apiTypes.ts' |
25
-
|‑‑exclude | name of a pydantic model which should be omitted from the resulting typescript definitions. This option can be defined multiple times, ex: `--exclude Foo --exclude Bar` to exclude both the Foo and Bar models from the output. |
26
-
|‑‑json2ts‑cmd | optional, the command used to invoke json2ts. The default is 'json2ts'. Specify this if you have it installed locally (ex: 'yarn json2ts') or if the exact path to the executable is required (ex: /myproject/node_modules/bin/json2ts) |
19
+
### CLI options
20
+
21
+
`--module MODULE`
22
+
: name or filepath of the python module you would like to convert. \
23
+
All the pydantic models within it will be converted to typescript interfaces. \
24
+
Discoverable submodules will also be checked.
25
+
26
+
`--output OUTPUT`
27
+
: name of the file the typescript definitions should be written to. Ex: './frontend/apiTypes.ts'
28
+
29
+
`--exclude EXCLUDE`
30
+
: name of a pydantic model which should be omitted from the resulting typescript definitions. \
31
+
This option can be defined multiple times,
32
+
ex: `--exclude Foo --exclude Bar` to exclude both the Foo and Bar models from the output. \
33
+
34
+
`--json2ts-cmd JSON2TS_CMD`
35
+
: optional, the command used to invoke json2ts. \
36
+
Specify this if you have json-schema-to-typescript installed locally (ex: 'yarn json2ts')
37
+
or if the exact path to the executable is required (ex: /myproject/node_modules/bin/json2ts). \
0 commit comments