@cap-js-community/odata-v2-adapter
Formerly@sap/cds-odata-v2-adapter-proxyuntil 2023-04
Exposes a CAP service as OData V2 for clients that cannot move to V4.
Facts
Where it sits
Who is behind it
In the atlas: maintains 10@cap-js-communityOliver KlemenzOliver KlemenzMaintains this
In the atlas: maintains 4, contributes to 6@oklemenz2maintainersAjinkya PatilContributes to this
In the atlas: contributes to 112@ajinkyapatil8190Andre MeyeringContributes to this
In the atlas: contributes to 10@bugwelleChristian GeorgiContributes to this
In the atlas: maintains 1, contributes to 53@chgeoDaniel HutzelContributes to this
In the atlas: contributes to 32, wrote 3@danjoaOlenaContributes to this
In the atlas: contributes to 11@etimrHeiko WitteborgContributes to this
In the atlas: contributes to 18@hm23Iwona HahnContributes to this
In the atlas: contributes to 7@iwonahahnJohannes VogelContributes to this
In the atlas: contributes to 25@johannes-vogelNils SchnabelContributes to this
In the atlas: contributes to 8@nilsRené JeglinskyContributes to this
In the atlas: contributes to 20@renejeglinsky15 contributors
Before choosing this
Conditions
LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
- § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
- § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
- § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
What it declares
Every artifact
- Type
- CDS plugin
- Origin
- By a community org
- Runtime
- Node.js
As a CDS plugin
- Distributed through
- npm
For OData
- Protocols
- OData V2
Connections
Exposing data and operations through OData
CAP bookshop with Fiori elements UI deployed whole to Cloud Foundry
Fiori overview page comparing aggregated and plain donut-chart cards
CAP Node.js runtime
CAP and UI5 app for in-place table maintenance with SmartTable
CAP project simulating S/4HANA Private Edition OData APIs locally
Download
Install
npm add @cap-js-community/odata-v2-adapterDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from cap-js-community/odata-v2-adapter under Apache-2.0, readOData V2 Adapter for CDS
About this Project
Exposes a full-fledged OData V2 service, converting OData V2 requests to CDS OData V4 service calls and responses back. Runs in the context of the SAP Cloud Application Programming Model (CAP) using CDS Node.js module @sap/cds or CDS Java modules com.sap.cds.
Table of Contents
- Getting Started
- Options
- Documentation
- Contributions
- Features
- OData V2/V4 Delta
- Support, Feedback, Contributing
- Code of Conduct
- Licensing
Getting Started
- Run
npm add @cap-js-community/odata-v2-adapterin@sap/cdsproject - Execute
cds-serveto start server- OData V2 service is available at
http://localhost:4004/odata/v2/<service> - OData V4 service is available at
http://localhost:4004/odata/v4/<service>
- OData V2 service is available at
Options
The OData V2 adapter for CDS instantiates an Express router. The following options are available:
- plugin: OData V2 adapter is instantiated as part of the CDS plugin. Default is
true. - build: In case of a plugin scenario, a build step is registered to prepare the OData V2 metadata. Use 'all' to mass compile EDMX files. Default is
true. - base: Base path under which the service is reachable. Default is
''. - path: Path under which the service is reachable. Default is
'odata/v2'. Default path is'v2'for CDS < 7 ormiddlewaresdeactivated. - model: CDS service model (path(s) or CSN). Default is
'all'. - port: Target port which points to OData V4 backend port. Default is process.env.PORT or
4004. - target: Target which points to OData V4 backend host:port. Use
'auto'to infer the target from server url after listening. Default is e.g.'auto'. - targetPath: Target path to which is redirected. Default is
'odata/v4'. Default path is''for CDS < 7 ormiddlewaresdeactivated. - services: Service mapping object from url path name to service name. Default is
{}. - mtxRemote: CDS model is retrieved remotely via MTX endpoint for a multitenant scenario (classic MTX only). Default is
false. - mtxEndpoint: Endpoint to retrieve MTX metadata when the option 'mtxRemote' is active (classic MTX only). Default is
'/mtx/v1'. - ieee754Compatible: Edm.Decimal and Edm.Int64 are serialized IEEE754 compatible. Default is
true. - fileUploadSizeLimit: File upload file size limit (in bytes) for multipart/form-data requests. Default is
10485760(10 MB). - continueOnError: Indicates to OData V4 backend to continue on error. Default is
false. - isoTime: Use ISO 8601 format for type cds.Time (Edm.Time). Default is
false. - isoDate: Use ISO 8601 format for type cds.Date (Edm.DateTime). Default is
false. - isoDateTime: Use ISO 8601 format for type cds.DateTime (Edm.DateTimeOffset). Default is
false. - isoTimestamp: Use ISO 8601 format for type cds.Timestamp (Edm.DateTimeOffset). Default is
false. - isoDateTimeOffset: Use ISO 8601 format for type Edm.DateTimeOffset (cds.DateTime, cds.Timestamp). Default is
false. - bodyParserLimit: Request and response body parser size limit. Default is
cds.server.body_parser.limitor'100mb'. - returnCollectionNested: Collection of entity types is returned nested into a results section. Default is
true. - returnComplexNested: Function import return structure of complex type (non collection) is nested using the function import name. Default is
true. - returnPrimitiveNested: Function import return structure of primitive type (non collection) is nested using the function import name. Default is
true. - returnPrimitivePlain: Function import return value of a primitive type is rendered as a plain JSON value. Default is
true. - messageTargetDefault: Specifies the message target default, if the target is undefined. Default is
'/#TRANSIENT#'. - caseInsensitive: Transforms search functions i.e., substringof, startswith, endswith to case-insensitive variant. Default is
false. - propagateMessageToDetails: Propagates root error or message always to a details section. Default is
false. - contentDisposition: Default content disposition for media streams (inline, attachment), if not available or calculated. Default is
'attachment'. - calcContentDisposition: Calculate content disposition for media streams even if already available. Default is
false. - quoteSearch: Specifies if a search expression is quoted automatically. Default is
true. - fixDraftRequests: Specifies if unsupported draft requests are converted to a working version. Default is
false. - changesetDeviationLogLevel: Log level of batch changeset content-id deviation logs (none, debug, info, warn, error). Default is
'info'. - defaultFormat: Specifies the default entity response format (json, atom). Default is
'json'. - processForwardedHeaders: Specifies if
x-forwardedheaders are processed. Default istrue. - cacheDefinitions: Specifies if the definition elements are cached. Default is
true. - cacheMetadata: Specifies the caching and provisioning strategy of metadata (e.g., edmx) (memory, disk, stream). Default is
'memory'. - registerOnListening: Routes are registered on CDS
listeningevent instead of registering routes immediately. Default istrue. - excludeNonSelectedKeys: Excludes non-selected keys from entity response (OData V4 auto-includes keys). Default is
false. - httpAgent: Object to be passed to http(s) request (see Node's https agent and http agent objects). Default is
null. - jsonDateOffset: JSON date serialization includes timezone offset. Default is
true. - toggles: Applies CDS before middlewares and feature toggle middleware, to propagate CDS toggles into
req.features. Default isfalse.
CDS Env
All OData V2 adapter for CDS options can be specified as part of CDS project-specific configuration
under section cds.cov2ap and accessed during runtime via cds.env.cov2ap.
Options can also be passed as command line environment variable, by converting the camel-cased option name to a snake-case.
Underscores (_) need then to be escaped as double underscore (__) when provided via command line environment variable.
Examples:
path=>CDS_COV2AP_PATH=odatav2quoteSearch=>quote_search=>CDS_COV2AP_QUOTE__SEARCH=false
Documentation
Singleton
CDS OData V2 adapter is instantiated via the CDS plugin as a singleton, which is exposed at:
const cds = require("@sap/cds");
cds.cov2ap;
The singleton can also be instantiated manually and accessed in a custom server via:
const cov2ap = require("@cap-js-community/odata-v2-adapter");
cov2ap.singleton();
@sap/cdsis a mandatory dependency and needs to be available as module.
Before Middlewares
Before middleware routes can be registered on the OData V2 adapter for CDS singleton, to be executed before the main route processing. The before middleware routes can be registered as a single function or as an array of route functions.
Single before route can be registered as follows:
const cds = require("@sap/cds");
cds.on("bootstrap", (app) => {
cds.cov2ap.before = (req, res, next) => {
// custom route processing
next();
};
});
Multiple before routes can be registered as follows:
const cds = require("@sap/cds");
cds.on("bootstrap", (app) => {
cds.cov2ap.before = [
(req, res, next) => {
// custom route processing
next();
},
(req, res, next) => {
// custom route processing
next();
},
];
});
CDS Middlewares
The standard CDS before middlewares can be applied to the OData V2 adapter routes via the following configuration:
const cds = require("@sap/cds");
cds.on("bootstrap", (app) => {
cds.cov2ap.before = cds.middlewares.before;
});
Dynamic HTTP Agent
Using before middlewares, a dynamic HTTP(s) agent can be registered via req.agent as follows:
const cds = require("@sap/cds");
cds.on("bootstrap", (app) => {
cds.cov2ap.before = (req, res, next) => {
req.agent = new https.Agent({});
next();
};
});
Custom Bootstrap
- Deactivate bootstrap via CDS plugin:
- Set
cds.cov2ap.plugin: falseinpackage.json
- Set
- Enhance or create
./srv/server.js:const cds = require("@sap/cds"); const cov2ap = require("@cap-js-community/odata-v2-adapter"); cds.on("bootstrap", (app) => app.use(cov2ap())); module.exports = cds.server;
@sap/cdsis a mandatory dependency and needs to be available as module.
Logging
Logging is based on cds.log, therefore, CDS logging configurations apply.
Logging Modules
| Component | Module Name(s) |
|---|---|
| OData V2 adapter for CDS | cov2ap |
Kibana Logging
To enable Kibana friendly logging for cds.log
feature toggle cds.features.kibana_formatter: true needs to be set.
Debug Mode
Debug mode can be activated to log requests and responses processed (V2) and initiated (V4) by OData V2 adapter for CDS. The following information can be retrieved for analysis:
- Request url, headers, body
- Response: status code/message, headers, body
Debug log level can be activated
- via command line environment variable:
CDS_LOG_LEVELS_COV2AP=debug - via
cds.envin code:cds.env.log.levels.cov2ap = "debug"
Details on how to set a CDS environment can be found at cds.env.
Log Levels
Logging can be configured to respect the following log levels:
- error: Error logs are written (includes warn)
- warn: Warning logs are written (includes info)
- info: Info logs are written (includes debug)
- debug: Debug logs are written
- trace: Same as debug
- silent: No logs are written
Logging Components
cds.log.levels.cov2ap: "error"
[cov2ap] - Proxy:Proxy processing error[cov2ap] - Cache:Metadata cache error[cov2ap] - Authorization:Authorization header parsing error[cov2ap] - MetadataRequest:Metadata request processing error[cov2ap] - Request:Request processing error[cov2ap] - Response:Response processing error[cov2ap] - Batch:Batch processing error[cov2ap] - AggregationKey:Aggregation key error[cov2ap] - MediaStream:Media stream processing error[cov2ap] - FileUpload:File upload processing error
cds.log.levels.cov2ap: "warn"
[cov2ap] - Service:Invalid service definition (name, path)[cov2ap] - Context:Invalid (sub-)definition (name, path)[cov2ap] - ContentDisposition:Content disposition warning
cds.log.levels.cov2ap: "info"
[cov2ap] - Batch:Changeset order deviation (req, res)
cds.log.levels.cov2ap: "debug"
[cov2ap] - Request:Log OData V2 client request (url, headers, body)[cov2ap] - ProxyRequest:Log OData V4 proxy request (url, headers, body)[cov2ap] - ProxyResponse:Log OData V4 proxy response (status code/message, headers, body)[cov2ap] - Response:Log OData V2 client response (status code/message, headers, body)
http-proxy-middleware
[cov2ap] - [HPM]: Proxy middleware processing logs
CDS Annotations
The following OData V2 adapter for CDS-specific annotations is supported:
Service Level:
@protocol: [{ kind: 'odata-v2', path: '<path>' }]: Specifies an additional custom relative OData V2 protocol service path (prepending OData V2 protocol prefix)@protocol: [{ kind: 'odata-v2', path: '/<path>' }]: Specifies an additional custom absolute OData V2 protocol service path (ignoring OData V2 protocol prefix)@cov2ap.ignore: Exclude service from OData V2 adapter conversion (service is not exposed as OData V2 service)
Entity Level:
@cov2ap.analytics: false: Suppress analytics conversion for the annotated entity, if set tofalse.@cov2ap.analytics.skipForKey: Suppress analytical conversion for the annotated entity if all dimension key elements are requested@cov2ap.deltaResponse: 'timestamp': Delta response '__delta' is added to response data of annotated entity with current timestamp information.@cov2ap.isoTime: Values of type cds.Time (Edm.Time) are represented in ISO 8601 format for annotated entity.@cov2ap.isoDate: Values of type cds.Date (Edm.DateTime) are represented in ISO 8601 format for annotated entity.@cov2ap.isoDateTime: Values of type cds.DateTime (Edm.DateTimeOffset) are represented in ISO 8601 format for annotated entity.@cov2ap.isoTimestamp: Values of type cds.Timestamp (Edm.DateTimeOffset) are represented in ISO 8601 format for annotated entity.@cov2ap.isoDateTimeOffset: Values of type Edm.DateTimeOffset (cds.DateTime, cds.Timestamp) are represented in ISO 8601 format for annotated entity.
Entity Element Level:
@Core.ContentDisposition.Filename: <element>: Specifies an entity element, representing the filename during file upload/download.@Core.ContentDisposition.Type: '<value>': Controls the content disposition behavior in client/browser (inlineorattachment).@cov2ap.headerDecode: [...]: Array of sequential decoding procedures ('uri,' 'uriComponent,' 'base64') used for media entity upload header.
CDS Modeling Restrictions
CDS project configuration cds.odata.version shall be set to v4, as OData V2 maps to OData V4.
CDS supports modeling features that are not compatible with OData V2 standard:
- Singletons: Usage of annotation
@odata.singletonis not supported in combination with OData V2 - Structured Types: Usage of
cds.odata.structs: trueis not supported in combination with OData V2 - Map Type: Usage of data type
cds.Mapis not supported in combination with OData V2 - Arrayed Types: Usages of
array oformanyin entity element definitions lead to CDS compilation error:Element must not be an "array of" for OData V2 - Managed Compositions: The usage of managed composition (currently) produces Format Exception in Fiori Elements V2 for Date/Time data types
To provide an OData V2 service based on the OData V2 adapter for CDS, those CDS modeling features must not be used. In general, any CDS OData API flavor must not be used in combination with OData V2 adapter for CDS.
Per default, those modeling incompatibilities are reported as Warning and will not stop the compilation.
The resulting EDMX V2 may be invalid and not processable by an OData V2 client. To prevent this situation and fail
early to detect modeling incompatibilities, the severity for respective codes can be increased to Error,
by setting the following environment variables:
{
"cdsc": {
"severities": {
"odata-spec-violation-array": "Error",
"odata-spec-violation-param": "Error",
"odata-spec-violation-returns": "Error",
"odata-spec-violation-assoc": "Error",
"odata-spec-violation-constraints": "Error"
}
}
}
Cloud Foundry Deployment
When deploying the OData V2 adapter for CDS to Cloud Foundry, make sure that it has access to the whole CDS model.
Especially, it’s the case, that normally the Node.js server is only based on folder srv and folder db is then missing on Cloud Foundry.
To come around this situation, trigger a cds build during development time, that generates a csn.json at location gen/srv/srv/csn.json.
Point your Cloud Foundry deployment of the OData V2 adapter for CDS to the folder gen/srv (using manifest.json or MTA), so that
the CDS models can be found via file srv/csn.json, during runtime execution on Cloud Foundry.
Make sure that all i18n property files reside next to the csn.json in a i18n or _i18n folder, to be detected by localization.
Multitenancy, Feature Toggles and Extensibility (MTX)
OData V2 adapter for CDS supports multitenant scenarios. Basic extensibility is already supported in combination with the CDS MTX module. More advanced extensibility scenarios and feature toggles are supported in combination with the CDS Streamlined MTX services.
Ensure that cds.xt.ModelProviderService is served internally, to allow extended CSN and EDMX retrieval.
Out-of-the-box Feature Toggles
Out-of-the-box Feature Toggles support can be activated via adapter option cds.cov2ap.toggles: true.
When active, all CDS before middlewares (cds.middlewares.before) are automatically applied to cds.cov2ap.before
and in addition another feature toggle middleware propagates CDS feature toggles cds.context.features into req.features of OData V2 request.
For production scenarios, a custom feature toggle middleware can be registered to fill cds.context.features
as follows on CDS boostrap, which is respected also by this module.
const cds = require("@sap/cds");
cds.middlewares.add(
(req, res, next) => {
if (cds.context.tenant === "t1") {
cds.context.features = ["advanced"];
}
next();
},
{ before: "ctx_model" },
);
Custom Feature Toggles
To provide the feature toggle vector to be used to build up the corresponding CSN and EDMX metadata documents,
the Express request object req needs to enhance by feature definitions. To add support for a specific feature toggles management,
you can add simple Express middleware as follows, for example, in your server.js:
const cds = require("@sap/cds");
cds.on(
"bootstrap",
(app) =>
(cds.cov2ap.before = (req, res, next) => {
req.features = ["advanced"];
next();
}),
);
If features are tenant-specific, apply the CDS before middlewares, so that cds.context.tenant is accessible:
const cds = require("@sap/cds");
cds.middlewares.add((req, res, next) => {
if (cds.context.tenant === "t1") {
req.features = ["advanced"];
}
next();
});
cds.cov2ap.before = cds.middlewares.before;
Details see CDS Middlewares.
Build Task
The CDS OData V2 adapter includes an CDS build task that allows preparing the OData V2 EDMX files for server and MTX sidecar app.
The build task is only automatically available when the adapter is bootstrapped via the CDS plugin mechanism (default).
It is then automatically active but can be deactivated using option cds.cov2ap.build: false.
Please note that when project has own cds.build.tasks configuration, the CDS OData V2 adapter build task needs to be added manually as well.
Also in case of a custom server bootstrap, the build task needs to be registered manually.
The build task generates each OData V2 EDMX file one-by-one for each OData service, excluding services annotated with @cov2ap.ignore.
For performance reasons all EDMX files can be compiled together, via configuration cds.cov2ap.build: "all".
Please note that in case of all mode, all services are compiled including none-OData services and those annotated with @cov2ap.ignore,
but only not ignored OData services are written to disk.
Unit-Tests
This repository comes with a suite of unit-tests covering the complete proxy implementation. The tests can be executed as follows:
- SQLite-based:
npm run test:unit(source)
- HANA based:
- Place HANA credentials at
test-hana/_env/db/default-services.jsonin format:{ "hana": [ { "credentials": {} } ] } - Deploy HANA (root dir):
npm run deploy:hana - Run tests (root dir):
npm run test:hana(source)
- Place HANA credentials at
- Postgres-based:
- Start Postgres on port
5432 - Assure default configuration is available (user, password, database) is set to
postgres - Deploy HANA (root dir):
npm run deploy:postgres - Run tests (root dir):
npm run test:postgres(source)
- Start Postgres on port
- CI Tests (SQLite + HANA):
npm test
All tests are executed as part of the GitHub Actions Continuous Integration (CI) pipeline.
SAP Fiori Elements V2
The OData V2 service provided by the OData V2 adapter for CDS can be used to serve an SAP Fiori Elements V2 UI.
SAP Fiori Elements V2 examples:
- SQLite-based:
- HANA based:
- Parameters: Parameterized entity app (source)
- Postgres-based:
- Basic Edit: Basic editing app (source)
Examples can be tested as follows:
- Start server:
- SQLite based:
npm run start:sqlite - HANA based:
npm run start:hana - Postgres based:
npm run start:postgres
- SQLite based:
- Open Fiori Launchpad: http://localhost:4004/flp.html
Compression Support
Response compressions can be enabled, by registering the compression Node.js
module in Express app at bootstrap time, e.g., in srv/server.js:
const cds = require("@sap/cds");
const compression = require("compression");
cds.on("bootstrap", (app) => {
cds.cov2ap.before = [compression({ filter: shouldCompress })];
});
function shouldCompress(req, res) {
const type = res.getHeader("Content-Type");
if (type && typeof type === "string" && type.startsWith("multipart/mixed")) {
return true;
}
// fallback to standard filter function
return compression.filter(req, res);
}
The shown compression filter function enables compression including
OData Batch ($batch) calls with content type multipart/mixed.
Approuter Compression
@sap/approuter now support out-of-the-box compression for OData $batch calls with multipart/mixed.
It's disabled by default but can be enabled using option compressResponseMixedTypeContent.
Custom Serving
CAP Node.js Custom
- Run
npm install @cap-js-community/odata-v2-adapter -sin@sap/cdsproject - Create new file
./srv/index.js:
const express = require("express");
const cds = require("@sap/cds");
const cov2ap = require("@cap-js-community/odata-v2-adapter");
const host = "0.0.0.0";
const port = process.env.PORT || 4004;
(async () => {
const app = express();
// OData V2
app.use(cov2ap());
// OData V4
await cds.connect.to("db");
await cds.serve("all").in(app);
const server = app.listen(port, host, () => console.info(`app is listing at ${host}:${port}`));
server.on("error", (error) => console.error(error.stack));
})();
- Run
node srv/indexfrom the project root to start the server:- OData V2 service will be available at
http://localhost:4004/odata/v2/<service-path> - OData V4 service will be available at
http://localhost:4004/odata/v4/<service-path>
- OData V2 service will be available at
@sap/cdsis a mandatory dependency and needs to be available as module.
CAP Java Custom
For CAP Java projects prefer the Native CDS OData V2 Adapter (com.sap.cds/cds-adapter-odata-v2).
- Run
npm install @cap-js-community/odata-v2-adapter -sin@sap/cdsproject - Provide CDS models (
db,srv,app) or compile a generated CSN (see details below) - Create new file
./srv/index.js:
const express = require("express");
const cov2ap = require("@cap-js-community/odata-v2-adapter");
const host = "0.0.0.0";
const port = process.env.PORT || 4004;
(async () => {
const app = express();
// OData V2
app.use(
cov2ap({
target: "<odata-v4-backend-url>", // locally e.g. http://localhost:8080
services: {
"<odata-v4-service-path>": "<qualified.ServiceName>",
},
registerOnListening: false,
}),
);
const server = app.listen(port, host, () => console.info(`app is listing at ${host}:${port}`));
server.on("error", (error) => console.error(error.stack));
})();
- Run
node srv/indexfrom the project root to start the server:- OData V2 service will be available at
http://localhost:4004/odata/v2/<odata-v4-service-path> - OData V4 service shall be available e.g., at
http://localhost:8080/<odata-v4-service-path>
- OData V2 service will be available at
@sap/cdsis a mandatory dependency and needs to be available as module.
Additional Considerations
- A deployed version of OData V2 adapter for CDS shall have option
targetset to the deployed OData V4 backend URL. This can be retrieved from the Cloud Foundry environment usingprocess.env, for example, from thedestinationsenvironment variable. Locally, e.g., http://localhost:8080 can be used. - In option
services, every OData V4 service URL path needs to map to the corresponding fully qualified CDS service name, e.g."/odata/v4/MainService/": "test.MainService", to establish the backlink connection between OData URL and its CDS service. - Make sure that your CDS models are also available in the project.
Those reside either in
db,srv,addfolders, or a compiled (untransformed)srv.jsonis provided. This can be generated by using the following command:cds srv -s all -o . - Alternatively, a
cds buildcan be triggered as described in section "Cloud Foundry Deployment." - If not detected automatically, the model path can be set with option
model(especially ifcsn.json/srv.jsonoption is used). - Make sure that all i18n property files reside next to the
csn.jsonin ai18nor_i18nfolder, to be detected by localization. - In a multitenant scenario in combination with a standalone app, the CDS model can be retrieved remotely via MTX endpoint (
mtxEndpoint) by setting optionmtxRemote: true. - Option
mtxEndpointcan be specified as absolute url (starting withhttp://orhttps://), to be able to address MTX Sidecar possibly available under a target different from OData v4 backend URL. If not specified absolutely,targetis prepended tomtxEndpoint.
Contributions
- Unit Tests:
npm test - Test Server:
npm start- Service:
http://localhost:4004/odata/v2/main - Metadata:
http://localhost:4004/odata/v2/main/$metadata - Data:
http://localhost:4004/odata/v2/main/Header?$expand=Items
- Service:
For more details see the CONTRIBUTION guide.
Features
- GET, POST, PUT / MERGE / PATCH, DELETE
- Batch support
- Actions, Functions
- Analytical Annotations
- Deep Expands/Selects
- JSON, Atom (XML) format
- Deep Structures
- Data Type Mapping
- IEEE754Compatible
- Messages / Error Handling
- Location Header
- count / $value
- Entity with Parameters
- File Upload (binary, multipart/form-data)
- Stream Support (Octet and Url)
- Content Disposition
- Content-ID
- Multitenancy (mtx, mtxs)
- Feature Toggles
- Extensibility
- Draft Support
- Search Support
- Localization
- Temporal Data
- Tracing Support
- Logging Correlation
- ETag Support (Concurrency Control)
- Next Links (skiptoken)
- Delta Responses (deltatoken)
- Continue-On-Error
- X-HTTP-Method
OData V2/V4 Delta
What’s New in OData Version 4.0
Support, Feedback, Contributing
This project is open to feature requests/suggestions, bug reports, etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
Code of Conduct
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Licensing
Copyright 2025 SAP SE or an SAP affiliate company and contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.
History
Fixes 3
Notes
Fixed
- Reduce invalid (sub-)definition log level to info
- Multiple protocol annotations like
@rest @odataare now handled correctly. - Resolve tenant from
app_tid, ifzidis missing in JWT token
Features 1, Fixes 2
Notes
Added
- CDS 10
Fixed
- Propagate subdomain to logs (if available)
- Align
sap-messageheader with the specification
Features 1, Fixes 1
Notes
Fixed
- Support
cds.middlewares.beforein adapter before middlewares
Added
- Adapter option
cds.cov2ap.toggles: truepropagates CDS toggles into OData V2 request (applyingcds.middlewares.before)
- Support
Fixes 2
Notes
Fixed
- Fixes for Express 5 (with CDS 9.7)
- Mass compile EDMX for all services on CDS build task, via env
cds.cov2ap.build: "all"
Fixes 1
Notes
Fixed
- Parse 'null' parameter string value as
nullfor actions, when not quoted explicitly
- Parse 'null' parameter string value as
Fixes 4
Notes
Fixed
- Consume file upload stream in error case
- Option
jsonDateOffset: falseto suppress timezone offset in JSON date serialization - Draft messages are not (yet) supported for OData V2
- Projects using CDS OData V2 Adapter need to set
cds.fiori.draft_messages: false
Fixes 2
Notes
Fixed
- Use
node-fetchlibrary to support http(s) agent - Allow dynamic http(s) agent via
req.agentincds.cov2ap.beforemiddleware
- Use
Fixes 2
Notes
Fixed
- Paths with leading slash
/are handled resiliently - Option
httpAgentto pass http(s) agent to requests
- Paths with leading slash
Fixes 5
Notes
Fixed
- Specific logger component for http proxy middleware
- Expose
countin response forAtom (XML)format - Escape XML entities in values for
Atom (XML)format - Option
excludeNonSelectedKeys: trueto exclude non-selected keys from response (OData V4 auto-includes keys) - Serialize date with empty value correctly
Fixes 2
Notes
Fixed
- Fix content-type for failing $metadata call
- Update supported CDS types for OData V2
Fixes 4
Notes
Fixed
- Support deactivation of IEEE754 compatibility for OData V2
- With
ieee754Compatible: falsenumbers are represented as JSON numbers (not strings anymore)- JSON numbers may lose precision with this configuration due to number conversion
- Make request and response data conversion more stable
- Fix
util.extend()Node 22 warning
Fixes 2
Notes
Fixed
- Option to disable route registration on CDS
listeningviaregisterOnListening: false - Document that
cds.Mapis not supported
- Option to disable route registration on CDS
Fixes 2
Notes
Fixed
- Decode
$in__nextlink - Make
multipart/mixedparser more robust for blank line detection
- Decode
Features 2, Fixes 1
Notes
Fixed
- Set
content-lengthheader correctly for OData V4 request in batch mode
Added
- CI Matrix Test Node 22
- Test with Postgres
- Set
Fixes 5
Notes
Fixed
- Improve expand/select handling and support
*notation - Expose CDS OData V2 Adapter singleton instance from CDS plugin at
cds.cov2ap - Allow to register
beforeexpress routes for CDS OData V2 Adapter router viacds.cov2ap.before - Option to cache and stream generated EDMX from disk instead of keeping it in memory
- Use new
cds.build.registerAPI version
- Improve expand/select handling and support
Fixes 4
Notes
Fixed
- Fix expand and select of navigation properties
- Fix error response for errors during media stream read
- Do not log authorization header in debug traces
- Decode request url for debug traces
Fixes 3
Notes
Fixed
- Adopt new http proxy middleware
- Remove
odata-versionheader from request - Remove obsolete documentation about
cds.odata.v2proxy.urlpathas now derived from protocols
Fixes 5
Notes
Fixed
- Convert OData V2 date string more relaxed allowing optional backslashes before forward slashes
- Fix definition element cache for prototypes
- Freeze definition element cache to prevent modification and store it as symbol
- Option to disable definition cache via
cacheDefinitions: false - ESLint interface typings correctly
Fixes 7
Notes
Fixed
- Support OData V2 CDS protocol annotation via (
@protocol: [{ kind: 'odata-v2', path: '<path>' }]) - Expose OData V2 service at specified
odata-v2protocol path, in addition to default endpoint - Make pipeline stream errors only warnings as root cause is already logged
- Serve OData V2 Adapter routes always after CDS listening (also for non-plugin case)
- Fix build task in case of compilation errors
- Fix build task to also include pre-compiled OData V2 EDMX files in
srv - Fix build task for Java
- Support OData V2 CDS protocol annotation via (
Fixes 2
Notes
Fixed
- Make data type conversion of values more robust
- Fix bound action call error, where action parameter name also is an entity element name
Fixes 2
Notes
Fixed
- Fix
undefinedaccess for message filtering - Remove header
connectionfor propagation viafetch
- Fix
Fixes 4
Notes
Fixed
- Fix definition lookup for suffixed entity names (e.g.
.texts) - Support message target context relative to draft root
- Support request header
sap-messages: transientOnly"where state messages with target not starting with/#TRANSIENTare removed - Log message target context resolution issues as reduced level (
debug)
- Fix definition lookup for suffixed entity names (e.g.
Fixes 2
Notes
Fixed
- Build task only applicable if MTX sidecar is active
- Use adapter singleton in CDS plugin
Removed 2, Features 6
Notes
Removed
- Drop Node.js 16 support (as out-of-maintenance)
- Replace
node-fetchby standardfetch
Added
- Support Node.js 20 (as new active)
- Default of
targetchanged toauto - Activate CDS plugin per default (can be disabled with option
plugin: false) - Activate CDS build to precompile OData V2 metadata per default (can be disabled with option
build: false) - Start CDS OData V2 adapter as CDS plugin in test setup
- Protect against double instantiation, when loaded via CDS plugin
Fixes 9
Notes
Fixed
- Respect return type for unbound actions/functions for message target resolution
- Convert transient and absolute message targets correctly
- Access prepared EDMX files if existing, otherwise compile like before
- Register build plugin to prepare V2 metadata (enabled via adapter option
build: true) - Skip conversion for element name only message targets
- Check ModelProviderService before access
- Service annotation
@cov2ap.ignoreto exclude service from OData V2 adapter - Log error with status code 400 as warning (before it was error)
- Replace deprecated
substrusages
Fixes 4
Notes
Fixed
- Support union queries as parameterized views
- Fix pull requests actions for external contributions
- Simplify plugin detection again
- Performance improvements
Fixes 2
Notes
Fixed
- Automatically activate plugin, if mentioned explicitly in
cds.plugins - Move custom server section in README under advanced section, as plugin is the preferred way to bootstrap adapter
- Automatically activate plugin, if mentioned explicitly in
Features 1, Fixes 2
Notes
Added
- Set CDS OData V2 protocol
Fixed
- Fix absolute service path starting with target path parts e.g.
/odata - Fix escaping of backslashes in search phrases
Features 1, Changed 1
Notes
Changed
- Switch to
better-sqlite3via@cap-js/sqlite
Added
- Suppress analytical conversion via entity annotation
@cov2ap.analytics.skipForKey, if all dimension key elements are requested
- Switch to
Fixes 1
Notes
Fixed
- Remove support for
serve_on_root. Define path explicitly tov2to restore previous behavior
- Remove support for
Fixes 1
Notes
Fixed
- Fix compatibility for option
middlewaresdisabled or featureserve_on_rootenabled
- Fix compatibility for option
Features 3
Notes
Added
- CDS 7 support
- Default route with CDS < 7 or option
middlewaresdisabled or featureserve_on_rootenabled staysv2 - Default route with CDS >= 7 is
/odata/v2
Fixes 3
Notes
Fixed
- Replace deprecated usage of
req.runwithcds.run - Update of
node-fetch - Remove soon deprecated
req.getUriInfo
- Replace deprecated usage of
Features 1, Fixes 1
Notes
Added
- Bootstrapping via CDS plugin (
cds.cov2ap.plugin: true)
Fixed
- Update
xml2jsdependency to fix security vulnerability
- Bootstrapping via CDS plugin (
Features 1, Fixes 1
Notes
Added
- Transition to open source code
Fixed
- Bound entity operation result is correctly nested with entity name prefix
Fixes 3
Notes
Fixed
- Cache invalidation for Streamlined MTX (extensibility enabled) with CDS 6.6.1
- Use named parameters for mtxs actions to protect against incompatible changes
- Allow status code 304 (not modified) when reading OData V4 metadata (as success)
Fixes 4
Notes
Fixed
- Provide subdomain information to logs
- Use correct correlation-id for logging (setup CDS context correctly)
- React to incompatible change of mtxs getEdmx, to provide (internal) model parameter
- Enhance example app to show usage of bound/unbound OData V2 actions in Fiori UI via annotation
Fixes 4
Notes
Fixed
- Reject proxy processing of non OData services
- Use stream pipeline for result streaming
- Proxy does not end request to target anymore after writing body
- Document that managed compositions will not work correctly in Fiori Elements V2
Fixes 2
Notes
Fixed
- Keep
ID__parameter as query option for bound action/function on analytical entities - Remove introduced query option
selectfor bound action calls on analytical entities again
- Keep
Fixes 7
Notes
Fixed
- Provide
valuesection ofID__aggregation key as query optionselectto bound action handler - Accept aggregation annotations in lowercase and uppercase writing
- Support
@Aggregation.ReferenceElementand@Aggregation.Referenceannotations to perform aggregation on different element - Only a single aggregation reference element is supported, specified as array with single element, e.g.
['element'] - Cast aggregation values of
#COUNT_DISTINCTtoIntegertype to be represented as number (not as string), if typed accordingly - Map default aggregation
#COUNTto virtual property$countof$apply - Remove unneeded temporary aggregation
$COUNT. Use#COUNTinstead.
- Provide
Fixes 3
Notes
Fixed
- Escape entity key value for bound action key parameter mapping
- Support action parameters that overload bound entity key names
- Support action/function on analytical entities via
ID__aggregation key
Fixes 5
Notes
Fixed
- Support new CDS integer types
- Fallback target
autotodefaulttarget until dynamictarget/portassignment is available - Prevent loading OData V4
$metadatawhen OData V2$metadatais requested - Fix draft requests re-write for
$filter - Proxy option to disable
x-forwardedheader processing (processForwardedHeaders: false)
Fixes 3
Notes
Fixed
Atom (XML)format fixes- Trim spaces for filter function parameter transformations
- Allow passing proxy options as command line env (
camelCasetosnake_case, escape_by doubling)
Fixes 2
Notes
Fixed
- Fix logging layers and debug trace activation
- Connect
cds.logwithhttp-proxy-middleware
Fixes 5
Notes
Fixed
- Fix data type conversion for single attribute value responses (incl. $value)
- Fix response mapping of parameters for
Parametersentity - Respect
$format=jsonfor service root document - Introduce proxy options to specify OData default format (default is
json) Atom (XML)format support
Fixes 6
Notes
Fixed
- Respect
$selectfilter fordeferredsstructure - Fix definition lookup for service entities with scoped name
- Fix definition lookup for unbound service operations (actions, functions) with scoped name
- Improve Kibana logging even more
- Use project specific logger
- Document that option
fileUploadSizeLimitonly applies to uploads viaPOSTusingmultipart/form-datarequests
- Respect
Fixes 3
Notes
Fixed
- Improve Kibana logging
- Improve error and warning logging messages
- Make log level of
Changeset order deviationconfigurable viachangesetDeviationLogLevel. Default is now'info'.
Fixes 4
Notes
Fixed
- Fix media upload via associations/compositions using POST
- Fix duplication of streaming request data for media entity (chunked)
- Fix result structure for parameterized entities entry addressed by key (object or not found)
- Update README on sample apps
Fixes 3
Notes
Fixed
- Remove logging library
@sap/logging. Usecds.loginstead. - Remove obsolete proxy option
disableNetworkLog - Proxy option
fixDraftRequestssuppresses unsupported draft expand toSiblingEntityand injectsSiblingEntity: null
- Remove logging library
Fixes 7
Notes
Fixed
- Compile CSN for Node.js when loaded from CDS MTX services
- Check on
cds.requires.multitenancyinstead of deprecatedcds.requires.db.multiTenant(compatible) - Support
$countwith parameterized entities - Make decoding of JWT token body more robust (error log in case of invalid JWT)
- Synchronize parallel loading of CSN and EDMX
- First (alpha) support for CDS Streamlined MTX (no extensibility support yet)
- Move
@types/expressto devDependencies
Fixes 3
Notes
Fixed
- CDS 6 compatible version
- Enhance proxy option
targetwith modeautoto handle dynamic target/port assignment (e.g. for unit-tests) - Represent time component of
cds.Date/Edm.DateTimewith second precision (i.e.00:00:00)
Fixes 3
Notes
Fixed
- Add
Typesuffix to fix__metadata.typefor parameterized entities (datajs did skip date type conversion) - Fix parameterized entities navigation links
- Enhance Fiori Elements example apps
- Add
Fixes 4
Notes
Fixed
- Change README on Approuter compression flag
compressResponseMixedTypeContent - Fill and process surrogate key
ID__correctly in case of analytical queries - Add an example Fiori Elements applications showcasing hierarchical
TreeTableusage - Rework UI application examples (basic, draft and hierarchy apps)
- Change README on Approuter compression flag
Fixes 3
Notes
Fixed
- Filter out annotation elements in response data starting with
odata.or including@odata.. - Elements starting with
@are excluded as before. - Propagate special headers to forwarded calls (i.e. starting with
dwc).
- Filter out annotation elements in response data starting with
Fixes 2
Notes
Fixed
- Fix if elements are annotated with
@cds.api.ignore - Abort file upload when limit is reached
- Fix if elements are annotated with
Fixes 7
Notes
Fixed
- Remove internal repository reference
- Document that Singletons are not available in OData V2
- Ignore omitted elements annotated with
@cds.api.ignore - Support validated for absolute context urls via
cds.odata.contextAbsoluteUrl. - Skip aggregation for measures with aggregation
#NONEand#NOP - Support
$countaggregations for measures with aggregation#COUNT - Changed OData type mapping for
Edm.Bytetocds.Integer
Fixes 3
Notes
Fixed
- Refactorings to support universal CSN
- Refactorings to support metadata prototype layering
- Include
searchin$applyaggregations
Fixes 2
Notes
Fixed
- Fix for
falsyvalues during data type conversion for functions and actions - Add OData V2 links via link providers to HTML index page
- Fix for
Fixes 3
Notes
Fixed
- Refactor locale determination from CDS
- Serialize body to string in case of type
objectbefore calculating content length - Support
AnalyticalContextannotations in addition to deprecatedAnalyticsannotations
Fixes 1
Notes
Fixed
- Proxy option
calcContentDispositionto calculatecontent-dispositionheader even if already available
- Proxy option
Fixes 1
Notes
Fixed
- Proxy option
fixDraftRequeststo convert unsupported draft request to a working version (default: false)
- Proxy option
Fixes 4
Notes
Fixed
- Fix README for combined custom backend bootstrap
- Allow annotation
@odata.typein lower case format - Allow type prefix
datetimein addition todatetimeoffset - Add peer dependency @types/express
Fixes 3
Notes
Fixed
- Prevent additional call to fill
content-disposition, in case header is already provided with stream - Support OData V2
binarymedia upload via POST for entities with element of typeBinaryand without@Core.MediaTypeannotations - Return server error as response, if OData V4 server does not support media upload without
@Core.MediaTypeannotation- e.g.
No payload deserializer available for resource kind 'PRIMITIVE' and mime type 'image/png'
- e.g.
- Prevent additional call to fill
Fixes 1
Notes
Fixed
- Unquote action/function parameter of types
cds.UUID,cds.Binary,cds.LargeBinary,cds.Date,cds.Time,cds.DateTime,cds.Timestamp
- Unquote action/function parameter of types
Fixes 5
Notes
Fixed
- Prevent parsing body for HEAD requests against $batch
- Fix single quotes of URL parameters for request body conversion respecting line breaks
- Introduce proxy option
quoteSearchto control search expression quoting. Default istrue - Fix bound action call to entity key having association type
- Fix action/function parameter of types date, time, datetime
Fixes 3
Notes
Fixed
- Catch and handle unexpected errors during proxy request processing
- Validate request body and content-type in request
- Switch of internal NPM repository (Nexus -> Artifactory)
Fixes 4
Notes
Fixed
- Change action/function return type value representation for primitive types to include nesting to conform to OData standard
- Introduce proxy options
returnPrimitiveNested: falseto keep previous action/function return value representation for primitive types - Introduce proxy option
returnCollectionNestedto control collection of entity type nesting into aresultssection. Default istrue - Fill standardized
x-correlation-idrequest header in addition tox-correlationidfor proxy requests
Fixes 7
Notes
Fixed
- Add README documentation for annotation
@Core.ContentDisposition.Type - Change
content-dispositionheader default frominlinetoattachment - Proxy option
contentDispositionto specify default content disposition for media streams (inline, attachment) - Unescape single quotes of action URL parameters for request body conversion
- Fix action/function return type representation for
cds.LargeString - Improve formatting of README and CHANGELOG
- Adjust repository url
- Add README documentation for annotation
Fixes 2
Notes
Fixed
Content-Dispositionheader filename is now url encoded- Annotation
@Core.ContentDisposition.Typeto specify content disposition type (e.g. inline, attachment (default), etc.)
Fixes 3
Notes
Fixed
- Proxy option
propagateMessageToDetailsto always propagate root error or message to details section - Support for fetching Edmx metadata locally via
cds.mtx.getEdmx - Support for fetching Edmx metadata remotely via MTX service url
- Proxy option
Fixes 3
Notes
Fixed
- Convert ContentID for warning messages and error body and propagate to details
- Fix batch boundary parsing from content type with charset definition
- Functions
startswithandendswithrespect proxy optioncaseInsensitive
Fixes 2
Notes
Fixed
- Fix query options not part of action parameters
- Proxy option
caseInsensitiveto transform search function e.g.substringofto case-insensitive variant
Fixes 3
Notes
Fixed
- Add metadata type of inline return type for actions and functions
- Proxy option
messageTargetDefaultto specify default message target, if undefined - Empty proxy option
messageTargetDefaultleaves message target untouched
Fixes 4
Notes
Fixed
- Support inline return type for actions and functions
- Default undefined message target to
/#TRANSIENT# - Return 404 for unknown service name during model compilation
- Enhance logging to contain service name for service lookup from request
Fixes 1
Notes
Fixed
- Prevent unnecessary expensive
isExtendedcall per request using metadata cache
- Prevent unnecessary expensive
Fixes 3
Notes
Fixed
- Support annotation
@odata.Typefor non-UUID CDS types - Set header
x-cds-odata-version: v2to indicate target OData version to CDS runtime - Explain usage of response compression in README
- Support annotation
Fixes 2
Notes
Fixed
- Change OData V4
continue-on-errordefault tofalse - Proxy option
continueOnError: trueavailable to activatecontinue-on-error
- Change OData V4
Fixes 2
Notes
Fixed
- Change action/function return type value representation for complex and primitive types
- Introduce proxy options
returnComplexNestedandreturnPrimitivePlainto keep previous action/function return value representation
Fixes 3
Notes
Fixed
- Convert additional targets of response messages
- Transform leading part of locale to lower-case
- Fix local entity name determination for scoped entities, e.g.
.texts
Fixes 2
Notes
Fixed
- Merge headers and body of POST and PUT media entity upload calls
- Handle error case in PUT media entity upload call
Fixes 3
Notes
Fixed
- CDS 5 compatibility (>= 1.6.0 needed for CDS 5)
- Support
content-dispositionheader in media entity upload - Introduction of element annotation
@cov2ap.headerDecodeto decode header values
Fixes 2
Notes
Fixed
- Fix crash for bound action without return type
- Consider bound action binding parameter for messages targets
Fixes 2
Notes
Fixed
- Support action/function array parameter types
- Introduce proxy option
bodyParserLimitfor body parser size limit
Fixes 10
Notes
Fixed
- Respect offset for
Edm.DateTimeOffset, and default to UTC offset (+0000) - Fix ticks and offset calculation for type
DateTimeOffsetto handle offset as minutes - Update README for custom bootstrap to give
proxy()priority overcds.serve(as withcds run) - Make authorization header parsing more robust
- Provide
__metadatatype information for function/action result - Data format of type
cds.Time (Edm.Time)is switchable to ISO 8601 with proxy optionisoTimeor entity annotation@cov2ap.isoTime - Data format of type
cds.Date (Edm.DateTime)is switchable to ISO 8601 with proxy optionisoDateor entity annotation@cov2ap.isoDate - Data format of type
cds.DateTime / Edm.DateTimeOffsetis switchable to ISO 8601 with proxy optionisoDateTimeor entity annotation@cov2ap.isoDateTime - Data format of type
cds.Timestamp / Edm.DateTimeOffsetis switchable to ISO 8601 with proxy optionisoTimestampor entity annotation@cov2ap.isoTimestamp - Process DateTimeOffset always as UTC information (with
Z)
- Respect offset for
Fixes 3
Notes
Fixed
- Change accept header to
application/json, if acceptxmlis requested - Fix single service support bound to root url
- Data format of type
Edm.DateTimeOffset(cds.DateTime,cds.Timestamp) is switchable to ISO 8601 with proxy optionisoDateTimeOffsetor entity annotation@cov2ap.isoDateTimeOffset
- Change accept header to
Fixes 3
Notes
Fixed
- Support boolean header value in media entity
- Prevent escaping of quotes in url for batch requests
- Add
media_srcandcontent-typein__metadatafor media entities
Fixes 2
Notes
Fixed
- Match headers case-insensitive for custom body in media entity
- Parse header string values for non-string types in media entity
Fixes 2
Notes
Fixed
- Enable OData V4
continue-on-errorper default - Add proxy option to deactivate
continue-on-error
- Enable OData V4
Fixes 5
Notes
Fixed
- Support mapping of
__nextannotation - Forward file upload headers to media entity POST call
- Explain annotation
@Core.ContentDisposition.Filenamein README - Update README on OData API flavors
- Fix links for navigation collections and query options
- Support mapping of
Fixes 3
Notes
Fixed
- Support custom body for binary media upload via POST
- Set
Acceptheader for$batchproxy request tomultipart/mixed - Set missing response header
Content-Transfer-Encoding: binary
Fixes 1
Notes
Fixed
- Log warning for change set order violation, instead returning an error response
Fixes 3
Notes
Fixed
- Support OData V2
binarymedia upload via POST - Support OData V2
multipart/form-data mediaupload via POST - Update README on logging layers
- Support OData V2
Fixes 5
Notes
Fixed
- Rewrite batch success status code from
200to202 - Remove OData V4 header
odata-entityid - Propagate
Content-IDin response to HTTP request headers - Remove artificially added
Content-IDheader from batch response - Fix
Content-IDorder check for deviations between request and response
- Rewrite batch success status code from
Fixes 2
Notes
Fixed
- Fix entity uris with
x-forwarded-pathheaders for OData batch calls - Support of
odata-entityidheader rewrite
- Fix entity uris with
Fixes 2
Notes
Fixed
- Fix entity uris with
x-forwarded-pathheaders - Forward
x-request-id,x-correlationidfor metadata request
- Fix entity uris with
Fixes 4
Notes
Fixed
- Respect
Content-IDin HTTP request headers - Update on peer dependencies
- Update README on OData V2 Adapter for CAP Java
- Update README on mission statement
- Respect
Fixes 2
Notes
Fixed
- Update README on option
cds.env.odata.v2proxy.urlpath - Delta response annotation
@cov2ap.deltaResponse: 'timestamp'
- Update README on option
Fixes 3
Notes
Fixed
- Prepare
Delta Responsessupport in proxy (not yet supported by CDS) - Remove metadata information in request payload deeply
- Update README on CDS modelling restrictions
- Prepare
Fixes 4
Notes
Fixed
- Rename proxy option
standalonetomtxRemote - Allow proxy option
mtxEndpointto be absolute http url - Support for
cds.envfor proxy options under sectioncds.cov2ap - Update README and JSDoc documentation
- Rename proxy option
Fixes 5
Notes
Fixed
- Fix
$filterfunction conversion - Fix remote CSN fetch for standalone proxy
- Fix
@sap.aggregation.roleannotation detection - Annotation
@cov2ap.analytics: falseto suppress analytical conversion - Update README documentation
- Fix
Fixes 4
Notes
Fixed
- CDS 4 compatibility
- Improve logging layers
- Update README documentation
- Improve JWT tenant processing
Fixes 2
Notes
Fixed
- Fix aggregation grouping on filtered elements
- Support
sap:analytical annotations
Fixes 2
Notes
Fixed
- Move annotation
ContentDisposition.Filenameto data element - Improve stability of content disposition
- Move annotation
Fixes 4
Notes
Fixed
- Replace
pathRewriteoption bytargetPathoption - Fix
baseproxy option - Respect OData annotation
@odata.Type - Alternative annotation
@Common.ContentDisposition.Filename
- Replace
Fixes 2
Notes
Fixed
- Fix escaping of quote for function parameters
- SAP Fiori Elements V2 sample app
Fixes 3
Notes
Fixed
- Service Document in XML format (default)
- Update dependencies
- Disable network log per default
Fixes 4
Notes
Fixed
- Update dependencies
- Update README on localization
- Toggle switch for network logging
- Allow HANA
SYSUUIDas UUID
Fixes 8
Notes
Fixed
- Align model resolving
- Fix data types conversion for numbers
- Fix data types recognition in functions
- Support response compression
- Prevent unnecessary data serialization for tracing
- Performance optimization for entity key/uri calculation
- General performance optimizations
- Update dependencies
Fixes 4
Notes
Fixed
- Make function call with request body more robust
- Fallback severity for detail messages to error
- Keep request body for action call
- Update README on CF deployment
Fixes 2
Notes
Fixed
- Fix analytics default value for all OData types
- Fix long running data type conversion for filter elements
Fixes 5
Notes
Fixed
- Fix
$filterin analytics query - Fix count for empty analytics result
- Fix result projection for analytics query
- Fix analytics
nullresult values - Only add root error, if no details messages
- Fix
Fixes 2
Notes
Fixed
- Add root error as first detail message
- Error code including
transitionmarks transition message
Fixes 3
Notes
Fixed
- Fix
$filterfor navigation elements - Fix OData annotations conversion for Java backends
- Add request authorization parsing for logging
- Fix
Fixes 9
Notes
Fixed
- Fix ETag Support (Concurrency Control)
- Support streaming from URL media
- Adding custom path rewrite
- Custom
server.jssupport - Fix for rendering aggregation of integers
- Fix time duration parsing
- Misc fixes and improvements
- General housekeeping
- Moving from
axiostonode-fetch
Fixes 7
Notes
Fixed
- Improve
$valuehandling for streaming - Fix stream filename retrieval
- Optimize edmx localization
- Improve logging and tracing handling
- Fix for external services (e.g. Java backend) support
- Re-add
servicesconfiguration for external service mapping - Fix for search phrase
- Improve
Fixes 4
Notes
Fixed
- Support for virtual hosts (e.g. Cloud Connector)
- Fix decode URI for path name
- Fix IEEE754 compatibility for single requests
- Add IEEE754 compatibility option switch
Fixes 4
Notes
Fixed
- Protect
$metadatacall - Fix
$filterparentheses nesting - Fix
allmodel loading from app, srv - Improve
$filterhandling, incl. data type and negative tests
- Protect
Fixes 2
Notes
Fixed
- Remove
servicesconfiguration, as it is obsolete - Fix nested functions in
$filter
- Remove
Fixes 4
Notes
Fixed
- Allow CSN JSON object as model option
- Raise error, if service not found based on path
- Fix service paths with hyphen
- Fix
cds.Date,cds.Timedata type mappings
Fixes 3
Notes
Fixed
- Increased body size limit
- Fix engine config, to allow Node >= 8
- Map
cds.DateTimeandcds.TimestamptoEdm.DateTimeOffset
Fixes 4
Notes
Fixed
__countis now of type String- Aggregation values are converted according to dynamic type
- Search support
- Fix for converting warning messages
Fixes 2
Notes
Fixed
- Check CDS multitenancy/extensibility (mtx)
- Allow options that are falsy for Javascript
Fixes 3
Notes
Fixed
- Raise error message for not supported aggregation function (e.g.
#FORMULA) - Fixed entity key calculation for key associations
- Fixed DateTime representation in entity key structure
- Raise error message for not supported aggregation function (e.g.
Fixes 2
Notes
Fixed
- Passing through responses in XML (just for errors)
- Data-type mapping on aggregation values works for non-strings
Others providing
Compare all 7 on the OData page →- com.sap.cds:cds-adapter-odata-v2com.sap.cds:cds-adapter-odata-v2The OData V2 protocol adapter for CAP Java, which the runtime serves natively once this beta module is on the classpath, so a V2 frontend keeps working without a change to the CDS model.sap official, capOData V2 protocol adapter built into the CAP Java runtime
- com.sap.cds:cds-adapter-odata-v4com.sap.cds:cds-adapter-odata-v4The OData V4 protocol adapter for CAP Java, auto-exposing every Application Service in the model at /odata/v4/<Service> without protocol code of its own, active by default in the CDS Maven Archetype.sap official, capOData V4 protocol adapter for CAP Java Application Services
- @odatano/core@odatano/coreA CAP plugin that serves the Cardano blockchain as OData V4, giving enterprise-shaped access to a public chain, funded through Cardano Catalyst.independent, capCAP plugin serving the Cardano blockchain as OData V4
- @odatano/nightgate@odatano/nightgateIndexes the Midnight blockchain and submits transactions to it from CAP, exposed as OData V4, with command-line tools for schema deltas, key rotation and migration.independent, capCAP plugin indexing the Midnight blockchain, exposed as OData V4
- @root3287/cap-segw@root3287/cap-segwA CAP build tool that compiles a CDS service into the ABAP Model Provider and Data Provider classes a SAP Gateway SEGW project expects, for OData V4 by default or V2.independent, capCompiler from a CDS service to SEGW model and data provider classes
- @sap/cds@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, capCAP Node.js runtime
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- OData V2
- First seen.
For your agent
- Ref
artifact:cap-js-community-odata-v2-adapter- JSON
- /artifacts/cap-js-community-odata-v2-adapter.json
- MCP
- Connecting an agent