{"id":16003150,"url":"https://github.com/mauriciolauffer/openui5-smart-mockserver","last_synced_at":"2026-03-10T08:03:45.123Z","repository":{"id":32654448,"uuid":"137966737","full_name":"mauriciolauffer/openui5-smart-mockserver","owner":"mauriciolauffer","description":"An extended and smarter version of UI5 MockServer for meaningful mock data","archived":false,"fork":false,"pushed_at":"2025-04-24T01:29:45.000Z","size":2953,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T12:46:18.852Z","etag":null,"topics":["fakerjs","javascript","mock-data","mock-server","mocking","openui5","openui5-framework","openui5-smart-mockserver","sap","sapui5","ui5"],"latest_commit_sha":null,"homepage":"https://mauriciolauffer.github.io/openui5-smart-mockserver/demo/webapp/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauriciolauffer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mauriciolauffer"}},"created_at":"2018-06-20T01:56:15.000Z","updated_at":"2025-04-24T01:29:47.000Z","dependencies_parsed_at":"2024-10-27T15:18:31.116Z","dependency_job_id":"a2491b2f-eb91-422f-beec-46fba6691345","html_url":"https://github.com/mauriciolauffer/openui5-smart-mockserver","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/mauriciolauffer/openui5-smart-mockserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-smart-mockserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-smart-mockserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-smart-mockserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-smart-mockserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauriciolauffer","download_url":"https://codeload.github.com/mauriciolauffer/openui5-smart-mockserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-smart-mockserver/sbom","scorecard":{"id":628516,"data":{"date":"2025-06-23T05:34:59Z","repo":{"name":"github.com/mauriciolauffer/openui5-smart-mockserver","commit":"c60b19d5eca5be0c15142a9a3192ac90d00a3b30"},"scorecard":{"version":"v5.1.1","commit":"cd152cb6742c5b8f2f3d2b5193b41d9c50905198"},"score":5.5,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dependency-update-tool"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#security-policy"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/codeql-analysis.yml:13","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:9","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/scorecards-analysis.yml:16","Info: topLevel permissions set to 'read-all': .github/workflows/auto-assign.yml:9","Info: topLevel permissions set to 'read-all': .github/workflows/codeql-analysis.yml:8","Info: topLevel permissions set to 'read-all': .github/workflows/npm-publish.yml:8","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: topLevel permissions set to 'read-all': .github/workflows/scorecards-analysis.yml:11","Info: topLevel permissions set to 'read-all': .github/workflows/test.yml:9"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/mauriciolauffer/openui5-smart-mockserver/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/mauriciolauffer/openui5-smart-mockserver/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mauriciolauffer/openui5-smart-mockserver/test.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:29","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 1 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#sast"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#fuzzing"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#contributors"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Info: 'stale review dismissal' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Info: 'up-to-date branches' is required to merge on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#signed-releases"}},{"name":"CI-Tests","score":2,"reason":"1 out of 5 merged PRs checked by a CI test -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#ci-tests"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T07:11:51.830Z","repository_id":32654448,"created_at":"2025-08-21T07:11:51.830Z","updated_at":"2025-08-21T07:11:51.830Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30327570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fakerjs","javascript","mock-data","mock-server","mocking","openui5","openui5-framework","openui5-smart-mockserver","sap","sapui5","ui5"],"created_at":"2024-10-08T10:06:31.276Z","updated_at":"2026-03-10T08:03:45.090Z","avatar_url":"https://github.com/mauriciolauffer.png","language":"JavaScript","funding_links":["https://github.com/sponsors/mauriciolauffer"],"categories":[],"sub_categories":[],"readme":"# openui5-smart-mockserver\n\n[![npm](https://img.shields.io/npm/v/openui5-smart-mockserver)](https://www.npmjs.com/package/openui5-smart-mockserver) [![test](https://github.com/mauriciolauffer/openui5-smart-mockserver/actions/workflows/test.yml/badge.svg)](https://github.com/mauriciolauffer/openui5-smart-mockserver/actions/workflows/test.yml)\n\nAn extended and smarter version of UI5 MockServer for meaningful mock data.\n\nOpenUI5 Smart MockServer uses the open source library Faker.js to generate better fake data for testing your app or for a demo.\nYou can use any available method in [Faker.js](https://github.com/marak/Faker.js/#api-methods).\n\nSmart data can be automatically generated based on OData SAP Semantics Annotations. You don't need to code anything, just run Smart MockServer with a metadata.xml containing SAP Semantics Annotations.\nIn case your metadata.xml doesn't have SAP Semantics annotations, you can set Smart Rules manually mapping the OData property to a Faker.js method.\n\n*Regular MockServer:* just a bunch of texts and numbers\n![Regular MockServer](./mockserver.png)\n\n*Smart MockServer:* meaningful data, better for tests and presentations to customer\n![Smart MockServer\"\u003e](./smartmockserver.png)\n\n## OData SAP Semantics Annotations\n\nOData SAP Semantic Annotations tell which of the OData properties contain e.g. a phone number, a part of a name or address, or something related to a calendar event or an analytic query. This is important for apps running on mobile devices that want to seamlessly integrate into contacts, calendar, and telephony.\n\u003chttps://wiki.scn.sap.com/wiki/display/EmTech/SAP+Annotations+for+OData+Version+2.0#SAPAnnotationsforODataVersion2.0-Property_sap_semanticsAttributesap:semantics\u003e\n\nSmart MockServer will generate data for these properties automatically, but not for all of them, have a look at the demo to see the supported *sap:semantics* annotations.\n\n## Faker.js\n\nFor any references, please follow\n\nFaker.js: \u003chttps://github.com/marak/Faker.js\u003e\n\nFaker.js methods: \u003chttps://github.com/marak/Faker.js/#api-methods\u003e\n\n## Demo\n\nYou can check out a live demo here:\n\n\u003chttps://mauriciolauffer.github.io/openui5-smart-mockserver/demo/webapp/index.html\u003e\n\nAnd for a live demo using ServiceWorker:\n\n\u003chttps://mauriciolauffer.github.io/openui5-smart-mockserver/demo-sw/webapp/index.html\u003e\n\n## Project Structure\n\n* demo - Library's live demo\n* demo-sw - Library's live demo with ServiceWorker\n* dist - Distribution folder which contains the library ready to use\n* src  - Development folder\n* test - Testing framework for the library\n\n## Getting started\n\n### Installation\n\nInstall openui5-smart-mockserver as an npm module\n\n```sh\n$ npm install openui5-smart-mockserver\n```\n\n### Configure manifest.json\n\nAdd the library to *sap.ui5/dependencies/libs* and set its path in *sap.ui5/resourceRoots* in your manifest.json file, as follows:\n\n```json\n{\n  \"sap.ui5\": {\n    \"dependencies\": {\n      \"libs\": {\n        \"openui5.smartmockserver\": {}\n      }\n    },\n    \"resourceRoots\": {\n      \"openui5.smartmockserver\": \"./FOLDER_WHERE_YOU_PLACED_THE_LIBRARY/openui5/smartmockserver/\"\n    }\n  }\n}\n```\n\n### How to use\n\nYou can use Smart MockServer just like you use your old MockServer!\nImport openui5-smart-mockserver to your UI5 controller using *sap.ui.define* or *sap.ui.require*:\n\n```javascript\nsap.ui.define([\n    'openui5/smartmockserver/SmartMockServer'\n  ], function (SmartMockServer) {\n    'use strict';\n\n    return {\n      init: function() {\n        const metadataUrl = 'local/path/to/the/file/metadata.xml';\n        const mockServerUrl = 'odata/service/url';\n        const mockServer = new SmartMockServer({ rootUri: mockServerUrl });\n\n        // You only need to call this method in case your metadata.xml doesn't have sap:semantics annotations\n        // and you want to create nice data for the OData property\n        mockServer.setSmartRules(this._getSmartRules());\n\n        SmartMockServer.config({\n          autoRespond: true,\n          autoRespondAfter: 1\n        });\n\n        mockServer.simulate(metadataUrl, {\n          bGenerateMissingMockData: true\n        });\n\n        mockServer.start();\n      },\n\n      _getSmartRules: function() {\n      //Here we define the smart rules for entity's properties\n        const smartRules = []; //Smart rules must be an array with objects such as the following example\n        smartRules.push({\n          entityName: 'Employee', //Entity Name\n          properties: [\n            {\n              name: 'FirstName', // Entity's property name\n              fakerMethod: 'name.firstName' //Faker.js method which will be used for this property\n            },\n            { name: 'Address', fakerMethod: 'location.streetAddress' },\n            { name: 'Phone', fakerMethod: 'phone.number' },\n            { name: 'Email', fakerMethod: 'internet.email' }\n          ]\n        });\n        return smartRules;\n      }\n    };\n  }\n);\n```\n\n## Author\n\nMauricio Lauffer\n\n* LinkedIn: [https://www.linkedin.com/in/mauriciolauffer](https://www.linkedin.com/in/mauriciolauffer)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciolauffer%2Fopenui5-smart-mockserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauriciolauffer%2Fopenui5-smart-mockserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciolauffer%2Fopenui5-smart-mockserver/lists"}