Skip to Content
0
Feb 11, 2020 at 07:03 AM

First letter of entity attributes converted to lowercase by @sap/cloud-sdk-generator

38531 Views

Hello SAP Cloud SDK Experts,

I'm working through the Tutorial Mission Use CAP and SAP Cloud SDK to Extend S/4HANA. But instead of using the S/4HANA based Business Partner I've created a simple OData Service based on the EPM Business Partner in my AS ABAP. To make it easer to replicate my issue I've created a mock service for this OData service. As the next step I've followed Generate Custom OData Client Library with SAP Cloud SDK's Generator. To get a typed interface for my consumer app.

So far so good. The result of the generation is i.e. the EpmBusinessPartnerSet.ts file with all the attributes of the entity-set. But not like in the EDMX tile ZEPM_BP_SRV.edmx that was used as the source the attributes i.e. BpId do start always with a lowercase letter i.e. bpId. So as a result I needed to adjust the case of the fields in my service definition so that the service implementation works with the generic select.

Is there a way to change this behaviour of the generator? Or is there even an easier way to consume the OData service?

Best regards
Gregor