@s1seven/schema-tools-generate-interfaces
v0.0.45
Published
Tool to generate TS interfaces from schema
Downloads
8
Keywords
Readme
Schema-tools-generate-interfaces
The generate-interfaces
module is using json-schema-to-typescript to generate TS interfaces and types using a JSON / OpenAPI schema.
Install
npm install @s1seven/schema-tools-generate-interfaces
Examples
The example wrap the generate
module in a function using process.argv
.
First argument is the schema url to generate from, the second argument is the filepath where interfaces will be saved.
node ./examples/generate-interfaces.js https://schemas.s1seven.com/en10168-schemas/v0.0.2/schema.json ./certificate.ts
This library was generated with Nx.
Building
Run nx build generate-interfaces
to build the library.
Running unit tests
Run nx test generate-interfaces
to execute the unit tests via Jest.