The generate-interfaces
module is using json-schema-to-typescript to generate TS interfaces and types using a JSON / OpenAPI schema.
npm install @s1seven/schema-tools-generate-interfaces
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.
Run nx build generate-interfaces
to build the library.
Run nx test generate-interfaces
to execute the unit tests via Jest.