openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.ui.core.util.MockServer: set up against a JSONModel

Open born2dev opened this issue 8 years ago • 2 comments

Dear UI5-Team,

in my OpenUI5 application I use the JSONModel, so no ODataModel.

In order to do the CRUD operations to the backend you can find statements like

return jQuery.ajax({ url : "https://some.domain.de/path-to/entity"

Then the result is set to the JSONModel:

this.getComponent().getModel().setProperty(sPath, oResult);

I tried to set up the MockServer as describe under Mock Server Configuration

Do I need a localService/metadata.xml file for a MockServer running with a JSONModel? There is no "sap.app.dataSources" definition and no "sap.ui5.models."".dataSource" definition in my manifest.json. Is this required for the MockServer?

I wonder whether this MockServer can run with a JSONModel at all.

OpenUI5 version 1.58.4

born2dev avatar Nov 30 '18 18:11 born2dev

Hello @born2dev , I've created an internal record 1870508332. The status of the issue will be updated here in GitHub. Regards, Lidiya

LidiyaGeorgieva avatar Dec 04 '18 15:12 LidiyaGeorgieva

Hello @born2dev, Mock server mocks an OData service. It is not related to your inner implementation. Mock server should be initialized with the service url itself. Regards, Michal

michawai avatar Dec 05 '18 11:12 michawai