ts-odata-scaffolder
v1.0.3
Published
**Scaffold the QueryContext for ts-odata-client from the odata schema**
Downloads
90
Readme
TS odata scaffolder
Scaffold the QueryContext for ts-odata-client from the odata schema
Usage
node build/main.js -u http://localhost:5000/odata -o ../odata/src/generated_context.ts
Usage: main [options]
Options:
-v, --version output the version number
-u --uri The odata host
-f --file The file with the odata $metadata
-o --out The path to the output file
-h, --help output usage information
Provide either an url to the odata endpoint or provide a path to the file that contains the $metadata. Currently we support odata 4.0, 4.1 and 4-H. Odata 4.0 and 4.1 use the xmlparsing_v4
parser while the 4-h uses the
xmlparsing_v4H
parser. The -h
version are the Hoppinger made odata flavours wich contains more data in their $metadata than the regular odata flavours. They will however result in the same generated querycontext.
The genereted querycontext exports the models and the endpoints from you odata endpoint. See the readme of the odata client for more information on how to write queries.