I'm currently working on a NestJS application that communicates with SAP (and some other external applications), and unfortunately, SAP requires some very specificly-named fields. To be precise, for some cases, I need to send over 70 fields to it and it in other cases, a request might return over than 280 fields.
Since I am not able to modify SAP, I'm forced to work with fields that goes against my application's naming patterns (camelCase and readable), as SAP uses SCREAMING_SNAKE_CASE with abbreviations, numbers and even some words that mix up english and german words.
Now, I know there are some not so practicals approaches to this (like parsing each field individually), but is there any that would save me time or at least make everything cleaner without having to parse fields manually?
Edit: Here's an example of what SAP returns to my application
PLNT_FABRIZIEREN_C: '253D',
MRKD_PRODUCTS: ['PRODUCT1', 'PRODUCT2'],
NEUES_PRDKT: TRUE
And the equivalent in my application:
factoryPlantCode: '253D',
markedProducts: ['PRODUCT1', 'PRODUCT2'],
isNewProduct: true
I need to completely change a fields name when saving it on my application so I'm still using camelCase but still send it back with the name SAP knows.