SAP / open-ux-odata

Enable community collaboration to jointly promote and facilitate best in class framework and tooling capabilities when working with OData services.
Apache License 2.0
51 stars 10 forks source link

BUG - fe-mockserver-core's DataAccess class delivers wrong v2 metadata #671

Closed nhahn1312 closed 1 year ago

nhahn1312 commented 1 year ago

Description

The addV2Metadata method of the DataAccess class returns a wrong metadata uri, if a boolean key is involved. The method should format the keys according to the Abstract Type System Document (6. Primitive Data Types). Instead it formats a boolean value as 'true' or 'false'.

Expected results

"__metadata": { "id": "/myEntity(myID=guid'e7a5fb1d-9ba6-474d-a7ba-8953cd83f355',IsActiveEntity=true)", "uri": "/myEntity(myID=guid'e7a5fb1d-9ba6-474d-a7ba-8953cd83f355',IsActiveEntity=true)", "type": "myType", },

Actual results

"__metadata": { "id": "/myEntity(myID=guid'e7a5fb1d-9ba6-474d-a7ba-8953cd83f355',IsActiveEntity='true')", "uri": "/myEntity(myID=guid'e7a5fb1d-9ba6-474d-a7ba-8953cd83f355',IsActiveEntity='true')", "type": "myType", },

Root Cause Analysis

Problem

{describe the problem}

Fix

{describe the fix}

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we don’t want to see this type of issues anymore what we should do to prevent}

nlunets commented 1 year ago

This is fixed in version @sap-ux/ui5-middleware-fe-mockserver@2.1.114