Takes a name and returns a transformation that is guaranteed to be compliant with npm naming rules.
The name to be transformed if necessary.
Name that is guaranteed to be compliant.
Applies a prefix to a string if present.
The string to be prefixed.
The optional prefix.
Prefixed string.
@sap/cloud-sdk-generator
Generate your own service module using a service specification (.edmx file).
Installation
Usage
The generator is primarily meant to be used on the command line:
generate-odata-client --inputDir path/to/your/service-specification(s) --outputDir path/where/the/modules/are/stored
Run
generate-odata-client --help
for further options.You can also use the generator programatically. You will have to provide the options anyways.
import { generateProject } from '@sap/cloud-sdk-generator'; // initialize generator options based on what you want to do const options: GeneratorOptions = initializeOptions(); // creates a Project datastructure with all sourcefiles based on your options const project = generateProject(options); // here you can modify you project if you need to // save the files at the specified location project.save(); // alternatively you can generate and save the project in one step with: generate(options)