Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@sap/edm-converters
Advanced tools
This module provides several model converters. The following converters are currently supported:
Each converter is contained in separate folder inside the lib folder.
A detailed description of a converter is provided in the README.md
of each converter sub-folder, or you may check the API documentation
in the index.js
and other files. Please note that it is also possible
to compile an HTML version of the API documentation with:
cd @sap/edm-converters
npm install # this will install the development dependencies
npm run doc # this will generate the documentation
(If the module is installed into the global node package folder,
use npm root -g
to find and navigate to it.)
The model converters can be used to convert the OData EDMX V2 or EDMX V4 model of a remote service into the EDM V4 JSON format. This EDM V4 JSON format can then be used with the OData Consumption library in module @sap/odata-v4 to consume remote OData services.
The converters can be called via commandline or programmtically via an API
The @sap/edm-converters provide a commandline interface and a API for use with node.
If you want to use the commandline interface we recommend to install the @sap/edm-converters with
npm install -g @sap/edm-converters
Installing it globally eases the usage of the converters from any folder.
If you do so, then after installation the convert_edm
symlink/script should be created.
You can test this with calling convert_edm -v
to show the converter version.
If you want to used the converters from your node application, then you can either install it locally or global. Just add:
const converters = require('@sap/edm-converters'):
The converter can then be accessed via:
converters.MetadataConverterFactory.createEdmxV20ToJsonV40(<option>);
or
converters.MetadataConverterFactory.createEdmxV40ToJsonV40(<option>);
Please check the API documentation in
lib/<converter>/index.js
for documentation about the parameters of the converter.
All converters follow the following pattern
convert_edm <converter> <file to be converted> <further arguments>
Note: Currently absolute path as well as relative path to your model is supported.
Currently the converters edmxV20ToJsonV40 and edmxV40ToJsonV40 are supported. Common sample arguments are:
-i, --input <file to be converted>
Input file to be converted--inputdir <input directory>
Containing the source files, if is relative-o, --output <output file>
Target file to be generated--outputdir <output directory>
Output directory, if target file is relative or more files are generated-l, --loglevel
Use 'e'/'i'(default)/'d' to show log information (e=error-log, i=info-log ,d=debug-log)-t, --target
Omit or set to 'cs02' to produce the Oasis CSDL 4.01-CS02 format;
if the Oasis CSDL Json 4.01-CS01 format should be produced, set to 'cs01'.
The CS01 format can be used as the EDM JSON to bootstrap the Okra library.convert_edm --help
convert_edm edmxV40ToJsonV40 --help
This package is provided under the terms of the SAP Developer License Agreement.
FAQs
Edm converter tools
We found that @sap/edm-converters demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.