view raw
daredadevil daredadevil - 10 months ago 136
jQuery Question

Can I use SAP UI5 mockserver without having a oData model

Backend : Jersey backend
Frontend : SAPUI5 application with a JSON model

I use jQuery.ajax() calls to make requests to the backend. I would like to mock these requests and load mock data to do a quick POC.

The Mockserver provided by SapUI5 seems to work with only oData model. can it be used with json models?

Thanks in advance.


For JSon models you don't need the mockServer actually. In the Component.js try to load your JSon model as below

var oModel = new JSONModel(uritojson);

uritojson is the link to your mock file