Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@sap-ux/ui5-middleware-fe-mockserver
Advanced tools
SAP Fiori tools - UI5 middleware for the Fiori elements mock server
The SAP Fiori - UI5 middleware for the Fiori elements mock server is a middleware extension for the UI5 Tooling. As an alternative to proxying OData requests to a live backend, it supports loading mock data for OData v2/v4 requests for supported Fiori elements templates. As the mock server runs locally without requiring a network connection to a backend system, it is useful for development and test scenarios.
npm
npm install --save-dev @sap-ux/ui5-middleware-fe-mockserver
yarn
yarn add @sap-ux/ui5-middleware-fe-mockserver --dev
pnpm
pnpm add @sap-ux/ui5-middleware-fe-mockserver --dev
In order to use the mock server, the npm module @sap-ux/ui5-middleware-fe-mockserver
needs to be added as devDependency and ui5.dependencies to package.json
, and a valid ui5.yaml
configuration needs to be provided.
Entries in package.json
[..]
"devDependencies": {
"@sap-ux/ui5-middleware-fe-mockserver": "^2"
},
"ui5": {
"dependencies": [
"@sap-ux/ui5-middleware-fe-mockserver"
]
}
[..]
Example for a yaml configuration file
specVersion: '2.0'
metadata:
name: <NAME>
type: application
server:
customMiddleware:
- name: sap-fe-mockserver
mountPath: /
afterMiddleware: compression
configuration:
annotations:
- localPath: './webapp/localService/myServiceAnnotation.xml'
urlPath: '/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations*'
services:
- urlPath: '/sap/opu/odata/sap/<SERVICE_NAME>'
metadataPath: './webapp/localService/metadata.xml'
mockdataPath: './webapp/localService/data'
- urlPath: '/sap/opu/odata/sap/<OTHER_SERVICE_NAME>'
metadataPath: './webapp/localService/other_metadata.xml'
mockdataPath: './webapp/localService/data'
If you are running the mockserver embedded in karma you need to change the configuration to use
beforeMiddleware: csp
instead of afterMiddleware: compression
Each service must provide at least two things
On top of that you can specify one of the following option
Additional option are available either per service of for all services if defined globally
You can also define static annotation file using the annotations
entry, each annotation must provide
Documentation
You can find more details on how to influence the mockserver behavior for mockdata by checking the documentation under Defining Mockdata
We also have samples available in the samples folder
Sample application
See the usage in demo apps SAP Fiori sample apps
Join the SAP Fiori tools Community. Ask Questions, Read the Latest Blogs, Explore Content. Please assign tag: SAP Fiori tools
To log an issue with SAP Fiori tools, please see Contact SAP Support.
Mockserver, Middleware
FAQs
SAP Fiori tools - UI5 middleware for the Fiori elements mock server
The npm package @sap-ux/ui5-middleware-fe-mockserver receives a total of 22,690 weekly downloads. As such, @sap-ux/ui5-middleware-fe-mockserver popularity was classified as popular.
We found that @sap-ux/ui5-middleware-fe-mockserver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.