Options
All
  • Public
  • Public/Protected
  • All
Menu

SAP Cloud SDK for JavaScript Logo

@sap-cloud-sdk/generator

This packages contains the generator to create your own service module using a service specification (.edmx file).

Installation

$ npm install @sap-cloud-sdk/generator

Usage (CLI)

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.

Usage (programatically)

You can also use the generator programmatically. You will have to provide the options anyways.

import { generate } from '@sap-cloud-sdk/generator';

// initialize generator options based on what you want to do
const options: GeneratorOptions = initializeOptions();

// generate the client using the provided options
generate(options);

For more detailed overview visit our generator documentation.

Support

The recommended way to get in touch with us is to create an issue in our github repository. Select the issue category Bug, Feature or Question depending on the nature of your request. We try to provide fixes, features and answers as soon as possible.

We also monitor questions on StackOverflow and ansers.sap.com but prefer issues on github.

Contribute

If you would like to contribute to the SAP Cloud SDK, please make yourself familiar with our contributing guidelines and follow the given instructions.

Links



License

The SAP Cloud SDK is released under the Apache License Version 2.0.

Copyright Ⓒ 2021 SAP SE or an SAP affiliate company. All rights reserved.

Index

Variables

defaultValueProcessesJsGeneration

defaultValueProcessesJsGeneration: 16 = 16

Functions

generate

  • generate(options: GeneratorOptions): Promise<void>
  • Parameters

    • options: GeneratorOptions

    Returns Promise<void>

generateProject

  • generateProject(options: GeneratorOptions): Promise<Project | undefined>
  • Parameters

    • options: GeneratorOptions

    Returns Promise<Project | undefined>

generateSourcesForService

  • generateSourcesForService(service: VdmServiceMetadata, project: Project, options: GeneratorOptions): Promise<void>
  • Parameters

    • service: VdmServiceMetadata
    • project: Project
    • options: GeneratorOptions

    Returns Promise<void>

transpileDirectories

  • transpileDirectories(directories: Directory[]): Promise<void[]>
  • Parameters

    • directories: Directory[]

    Returns Promise<void[]>