Adds a leading \n to a documentation string so that the ts-morph makes a block comment out of it.
text.
documentation text with leading \n.
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.
Generator options
the parsed services
Path to the service definition
Generator options
mappings for VDM service names to desired name
Instance of global name formatter to be used for the parsing process
the parsed service
Name of the edm type for example "Edm.String" or "Namespace.ComplexType"
the typename input for Edm types e.g. "Edm.String" or the type without the namesapce.
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 programmatically. 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)
Documentation
Getting started guide API documentation
Helpful Links