Overview
Quick Start
For a quick start check out the "Getting Started" page.
What is the SAP Cloud SDK for JavaScript?
The SAP Cloud SDK for JavaScript is a set of libraries that reduces the effort of building applications on the SAP Business Technology Platform (SAP BTP). It abstracts common tasks on SAP BTP so that you can concentrate on your business logic instead of writing boiler plate code. The image below shows the general architecture of an application built with the SAP Cloud SDK.
The Core Libraries
The core libraries are the heart of the SAP Cloud SDK for JavaScript. They contain the request execution and connectivity logic as well as command line interfaces (CLIs) to generate OData and OpenAPI clients. The image below shows the relationship between the individual core libraries.
@sap-cloud-sdk/connectivity
The connectivity library provides functionality to read and exchange with services like the destination, XSUAA, and connectivity service. It provides the basic types needed to reflect the concept of a destination throughout the SAP Cloud SDK for JavaScript.
@sap-cloud-sdk/http-client
The HTTP client library is a thin HTTP client, that allows you to execute requests by leveraging the concept of destinations. You can flexibly configure a request to your needs and send arbitrary HTTP requests to the given destination.
@sap-cloud-sdk/odata-v2
, @sap-cloud-sdk/odata-v4
, and @sap-cloud-sdk/openapi
The OData v2, v4, and OpenAPI libraries build the foundation for API clients. They contain OData and OpenAPI-specific abstractions, that the client libraries use to expose their APIs.
@sap-cloud-sdk/generator
and @sap-cloud-sdk/openapi-generator
The OData and OpenAPI generators are CLIs that generate client libraries based on the services' specifications (either EDMX format or OpenAPI/Swagger). You can use them to generate typed API clients.
Supported Node Versions
We always support the latest Active LTS version of Node. You can check the automated tests to see a list of all supported and tested versions.
Supported OData and OpenAPI Versions
The SAP Cloud SDK supports OData v2 and v4, as well as OpenAPI 2.0 and 3.0.
Licensing
All core libraries are available as open-source npm packages in the @sap-cloud-sdk
scope on npm under the Apache 2.0 license.
You can find the source code on GitHub.
The license of clients generated with the SAP Cloud SDK depends on the used service spec license.
Release Schedule
We usually release bi-weekly.
We intend to release a major version of the SAP Cloud SDK for JavaScript every six to twelve months. For details, check the release policy.
Comparison With SAP OData Library
There is also a second open-source library for consuming OData services developed by SAP. The SAP OData library is developed by a different team than the SAP Cloud SDK. It evaluates service specifications at runtime and helps you execute requests. The table below tries to draw a line between the two open-source libraries:
OData library | SAP Cloud SDK |
---|---|
Supports JavaScript. | Supports JavaScript and TypeScript. |
Operates dynamically on the metadata and creates an on-the-fly-client. | Typed API clients can be generated. An generic, untyped client is also available. |
Connectivity needs to be handled manually. | The SAP Cloud SDK handles connectivity on the SAP BTP for typed and untyped API clients. |
Contributing
We are happy to review and incorporate contributions. For details on contributing, check our contribution guide.
Feature Matrix
Legend: ✔️ - Generally Available, ❌ - Not Available, ⚙ - Beta, 📅 - Planned
Feature | SAP Cloud SDK JavaScript | |||
---|---|---|---|---|
Category | Name | Status | Docs | Notes |
Legacy | ❌ | Take a look at the node-soap library | ||
Legacy | ❌ | Take a look at the SAP NetWeaver RFC SDK client bindings for Node.js | ||
Legacy | ❌ | Take a look at the SAP NetWeaver RFC SDK client bindings for Node.js | ||
OData | ✔️ | |||
OData | ✔️ | |||
OData | Generic not typed OData client | ❌ | We expose generic HTTP client aware of connectivity abstractions | |
OData | ✔️ | |||
OpenAPI | OpenAPI 2.0 typed client | ✔️ | ||
OpenAPI | OpenAPI 3.0 typed client | ✔️ | ||
OpenAPI | OpenAPI code generator | ✔️ | ||
Messaging | Enterprise messaging | 📅 | Planned. Depends on CAP | |
Advanced | Resilience pattern | ❌ | ||
Advanced | Caching pattern | ❌ | ||
Environment | ✔️ | |||
Environment | ✔️ | |||
Environment | ✔️ | |||
Environment | Deploy with Confidence (DwC) | ❌ | ||
Environment | ❌ | Not recommended for new projects | ||
Environment | ❌ | Out of scope | ||
Connectivity | ✔️ | |||
Connectivity | ✔️ | |||
Connectivity | ✔️ | |||
Connectivity | ✔️ | |||
Connectivity | Authentication | ✔️ | ||
Connectivity | Multi-tenancy | ✔️ | ||
Connectivity | Proxy | ✔️ | ||
Connectivity | HTTP Client wrapper | ✔️ | ||
Connectivity | ✔️ | |||
Connectivity | ✔️ | |||
MDI | MDI | ❌ |