@sap-ux/fe-mockserver-plugin-cds
Lets the Fiori Elements mock server take a CDS file as its metadata source, so a UI is developed against the real model before a service exists.
Facts
Where it sits
Who is behind it
In the atlas: maintains 137, wrote 14@SAPmaintainerAndis RedmansContributes to this
In the atlas: contributes to 13@815areAnjanContributes to this
In the atlas: contributes to 7@anjan-poonachaApurv TrivediContributes to this
In the atlas: contributes to 1@ApurvtrivedibthillayContributes to this
In the atlas: contributes to 1@bthillayd023613Contributes to this
In the atlas: contributes to 1@d023613Austin DevineContributes to this
In the atlas: maintains 7, contributes to 25@devineaDilpreet KaurContributes to this
In the atlas: contributes to 1@dilpreet101Dirk TeufelContributes to this
In the atlas: contributes to 19@drktflerlethorContributes to this
In the atlas: contributes to 2@erlethorDominik HeimContributes to this
In the atlas: contributes to 25@heimwege28 contributors
What it declares
Every artifact
- Type
- Package
- Origin
- By SAP
As a package
- Where it runs
- Inside its host
- Distributed through
- npm
Connections
Proving a service still does what it did, without a deployment
Download
Install
npm add @sap-ux/fe-mockserver-plugin-cdsDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from SAP/open-ux-odata under Apache-2.0, read@sap-ux/fe-mockserver-plugin-cds
MetadataProcessor plugin for the fe-mockserver that allows to use cds file as source for the metadataPath.
Installation
npm
npm install --save-dev @sap-ux/fe-mockserver-plugin-cds
yarn
yarn add @sap-ux/fe-mockserver-plugin-cds --dev
pnpm
pnpm add @sap-ux/fe-mockserver-plugin-cds --dev
Note: You will also need to install and provide a @sap/cds-compiler version.
Usage
In the mockserver configuration, specify that you want to use this plugin for the metadata processing as follows :
- name: sap-fe-mockserver
beforeMiddleware: compression
configuration:
metadataProcessor:
name: "@sap-ux/fe-mockserver-plugin-cds"
service:
urlPath: /here/goes/your/serviceurl
metadataPath: ./webapp/localService/metadata.cds
mockDataPath: ./webapp/localService/mockdata
You can also specify that you want this to generate a v2 service by using the following syntax
- name: sap-fe-mockserver
beforeMiddleware: compression
configuration:
metadataProcessor:
name: "@sap-ux/fe-mockserver-plugin-cds"
options:
odataVersion: v2
service:
urlPath: /here/goes/your/serviceurl
metadataPath: ./webapp/localService/metadata.cds
mockDataPath: ./webapp/localService/mockdata
i18n
If you use i18n reference in your project the plugin will automatically replace the i18n reference with the actual value from the i18n file.
The i18n file should be in the same folder as the metadata file and should be named i18n.properties
- or in an i18n folder in the same directory as the metadata file.
- or in an _i18n folder in the same directory as the metadata file.
- or in an _i18n folder one level above the metadata file.
- or you can define i18nPath property in the configuration to add more location relative to the cds file
- name: sap-fe-mockserver
beforeMiddleware: compression
configuration:
metadataProcessor:
name: "@sap-ux/fe-mockserver-plugin-cds"
options:
odataVersion: v2
service:
urlPath: /here/goes/your/serviceurl
metadataPath: ./webapp/localService/metadata.cds
mockDataPath: ./webapp/localService/mockdata
i18nPath: ../otherlocation/i18n // relative to the metadata file
Keywords
CDS Plugin Mockserver
History
Fixes 1
Notes
Patch Changes
- e13606e: We now also support CDS 5.x
Fixes 1
Notes
Patch Changes
- 50bfb29: feat: Enhance mock server with service-level metadata processor override
Features 1
Notes
Minor Changes
- 06d1cab: CDS Parsing now respects proper CDS syntax for multiple files
Fixes 1
Notes
Patch Changes
- 3ed5c7c: Add support for parsing sap* inline annotations for entity types
Others providing
Compare all 8 on the Testing page →- com.sap.cds:cds-services-bomcom.sap.cds:cds-services-bomThe Maven bill of materials for CAP Java, pinning every com.sap.cds module in a release, from the API and core runtime to the Spring Boot starters and the CQN engine, to the same version.sap official, capMaven bill of materials pinning CAP Java module versionsfrom CAP
- @cap-js/cds-test@cap-js/cds-testTest support for CAP Node.js, installed as a dev dependency: it starts the project's server for the test, hands the test an HTTP client bound to it, and carries the assertions.sap official, capTest support for CAP Node.js: server start, HTTP client, assertionsfrom CAP
- cds-cucumbercds-cucumberBehaviour-driven tests for CAP applications: Gherkin scenarios that drive a running service rather than assertions written against handlers.community org, capGherkin scenarios driving a running CAP servicefrom CAP
- sapbrunosapbrunoA terminal UI that runs Bruno collections against a CAP service, fetching an OAuth2 client_credentials token before each run so collections that fail with 401 under bru run work in CI.independent, capTerminal UI running Bruno collections against a CAP servicefrom CAP
- cds-launchpad-plugincds-launchpad-pluginIndexes every SAPUI5 application in a workspace into one sandbox launchpad served by the CDS server, so all of them can be opened from a single page while developing.independent, capSandbox launchpad for all SAPUI5 apps in a CAP workspacefrom CAP
- enforce-export-coverageenforce-export-coverageA static-analysis command line that checks every exported TypeScript function has a corresponding test, without running the test suite.independent, generalStatic check that each exported TypeScript function has a testfrom General
- @saptools/bruno@saptools/brunoA command line that runs Bruno collections against XSUAA-protected apps on Cloud Foundry, fetching the app's token and writing it into the selected environment file before each run.independent, btpRunner for Bruno collections against XSUAA-protected CF appsfrom BTP/BAIP
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
- Typed cds-plugin by placement, which defaults every candidate to that. It is not one.
- Lets the Fiori Elements mock server take a CDS file as its metadata source, so a UI is developed against the real model before a service exists.
- First seen.
For your agent
- Ref
artifact:sap-ux-fe-mockserver-plugin-cds- JSON
- /artifacts/sap-ux-fe-mockserver-plugin-cds.json
- MCP
- Connecting an agent