Typescript OData model generator for OData v4 services.
Produces Entity types, Complex types and Enums (each in a separate file) from the $metadata endpoint.
Inspired by jin-qu/jinqu-odata-cli and Breeze/breeze.tooling
Usage: ts-odata-model-gen [options]
Options:
-V, --version | output the version number |
-u, --url | OData service url |
-o, --outDir | output directory (default: "models") |
-b, --baseType | base type for entity types |
-f, --useInterfaces | use interfaces instead of classes |
-s, --strictNullability | use strict nullability assertions for properties |
-i, --initNonNullProps | use initializers for non-nullable properties |
-c, --camelCaseProps | use camelCase property names |
-k, --kebabCaseModules | use kebab-case module names |
-d, --useDateProps | use Date type for date/time properties |
--ignoreCertErrors | ignore SSL/TLS certificate errors |
-h, --help | display help for command |
Example:
ts-odata-model-gen --url https://localhost:5001/odata --outDir models --strictNullability --camelCaseProps --kebabCaseModules