{"id":16003122,"url":"https://github.com/mauriciolauffer/openui5-model-json-crud","last_synced_at":"2025-08-01T04:34:59.387Z","repository":{"id":32976286,"uuid":"147296291","full_name":"mauriciolauffer/openui5-model-json-crud","owner":"mauriciolauffer","description":"An OpenUI5 library which extends JSONModel to support CRUD operations","archived":false,"fork":false,"pushed_at":"2023-12-05T00:39:46.000Z","size":877,"stargazers_count":10,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T06:19:42.760Z","etag":null,"topics":["crud","javascript","jsonmodel","openui5","openui5-framework","plugin","sap","sapui5","ui5"],"latest_commit_sha":null,"homepage":"https://mauriciolauffer.github.io/openui5-model-json-crud/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},"funding":{"github":"mauriciolauffer"}},"created_at":"2018-09-04T06:09:01.000Z","updated_at":"2025-01-10T19:30:10.000Z","dependencies_parsed_at":"2023-12-05T01:35:15.659Z","dependency_job_id":"a286f6c1-79ea-4d2e-8867-abca1f896b77","html_url":"https://github.com/mauriciolauffer/openui5-model-json-crud","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-model-json-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-model-json-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-model-json-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciolauffer%2Fopenui5-model-json-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauriciolauffer","download_url":"https://codeload.github.com/mauriciolauffer/openui5-model-json-crud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243894465,"owners_count":20365034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["crud","javascript","jsonmodel","openui5","openui5-framework","plugin","sap","sapui5","ui5"],"created_at":"2024-10-08T10:06:24.411Z","updated_at":"2025-03-18T02:31:44.778Z","avatar_url":"https://github.com/mauriciolauffer.png","language":"JavaScript","funding_links":["https://github.com/sponsors/mauriciolauffer"],"categories":[],"sub_categories":[],"readme":"# openui5-model-json-crud\n\n[![npm](https://img.shields.io/npm/v/openui5-model-json-crud)](https://www.npmjs.com/package/openui5-model-json-crud) [![test](https://github.com/mauriciolauffer/openui5-model-json-crud/actions/workflows/test.yml/badge.svg)](https://github.com/mauriciolauffer/openui5-model-json-crud/actions/workflows/test.yml)\n\nAn OpenUI5 library which extends JSONModel to support CRUD (Create, Read, Update, Delete) operations. It uses fetch (not jQuery.ajax) to send requests to the server and populates a JSON Model with the responses.\nAs aforementioned, OpenUI5 CRUD JSON Model uses fetch hence it returns Promises.\n\n## Demo\n\nYou can check out a live demo here:\n\n\u003chttps://mauriciolauffer.github.io/openui5-model-json-crud/demo/webapp/index.html\u003e\n\n![Demo Screenshot](./openui5-model-json-crud.png)\n\n## Project Structure\n\n* demo - Library's live demo\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-model-json-crud as an npm module\n\n```sh\n$ npm install openui5-model-json-crud\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.model.json.crud\": {}\n      }\n    },\n    \"resourceRoots\": {\n      \"openui5.model.json.crud\": \"./FOLDER_WHERE_YOU_PLACED_THE_LIBRARY/openui5/model/json/crud/\"\n    }\n  }\n}\n```\n\n### How to use\n\nImport openui5-model-json-crud to your UI5 controller using *sap.ui.define* or *sap.ui.require*:\n\n```javascript\nsap.ui.require([\n  'openui5/model/json/crud/CRUDModel'\n], function(CRUDModel) {\n  const serviceUrl = 'https://api.jikan.moe/v3/'; //backend root URL\n  const crudModel = new CRUDModel(serviceUrl);\n  this.getView().setModel(crudModel, 'CRUDModel');\n  //'search/anime?q=DBZ' is the path to the service to be called, it'll be concatenated to serviceUrl\n  //'/DBZ' is the path to the property into the model, in case you want to updated the model with the response;\n  // empty value does not update the local model, it only returns the response\n  crudModel.read('search/anime?q=DBZ', '/DBZ')\n    .then(function() {\n      console.log('Data selected from API');\n    })\n    .catch(function(err) {\n      console.error(err.toString());\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-model-json-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauriciolauffer%2Fopenui5-model-json-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciolauffer%2Fopenui5-model-json-crud/lists"}