@sap-ux/fe-mockserver-core
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -399,2 +399,8 @@ "use strict"; | ||
return mockData[keyName] === keyValues[keyName]; | ||
case 'Edm.Boolean': | ||
let booleanKeyValue = keyValues[keyName]; | ||
if (typeof booleanKeyValue === 'string') { | ||
booleanKeyValue = booleanKeyValue === 'true'; | ||
} | ||
return mockData[keyName] === booleanKeyValue; | ||
case 'Edm.Int32': | ||
@@ -401,0 +407,0 @@ case 'Edm.Int64': |
@@ -313,3 +313,2 @@ "use strict"; | ||
getResponseData() { | ||
this.addResponseHeader('content-type', 'application/json;odata.metadata=minimal;IEEE754Compatible=true'); | ||
if (this.messages.length) { | ||
@@ -320,5 +319,8 @@ this.addResponseHeader('sap-messages', JSON.stringify(this.messages)); | ||
this.addResponseHeader('odata-version', '4.0'); | ||
this.addResponseHeader('content-type', 'application/json;odata.metadata=minimal;IEEE754Compatible=true'); | ||
} | ||
else { | ||
this.addResponseHeader('dataserviceversion', '2.0'); | ||
this.addResponseHeader('cache-control', 'no-store, no-cache'); | ||
this.addResponseHeader('content-type', 'application/json'); | ||
} | ||
@@ -358,3 +360,11 @@ if (typeof this.responseData === 'string') { | ||
// V2 | ||
return JSON.stringify(this.responseData); | ||
const resultObject = { d: {} }; | ||
if (Array.isArray(this.responseData)) { | ||
resultObject.d.__count = this.dataCount; | ||
resultObject.d.results = this.responseData; | ||
} | ||
else { | ||
resultObject.d = this.responseData; | ||
} | ||
return JSON.stringify(resultObject); | ||
} | ||
@@ -361,0 +371,0 @@ } |
{ | ||
"name": "@sap-ux/fe-mockserver-core", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "SAP Fiori OData - Fiori elements mock server core", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
419036
4890