1) Service is exposed from Pega (Service-REST), and receives large JSON requests. Some of the property values are not present in the inbound request and while mapping if there is no property present in the request and if I map that Pega decimal/integer datatype properties then initializing default value with 0.
It would be difficult to have a check for each property (PropertyHasValue).
2) In the same scenario, When the external system sends Null values in decimal & integer properties, Decimal properties are ignored on MyservicePage which is expected but the Integer properties are getting initialized with 0.
Anybody come across these two scenarios with Pega APIs and share your inputs here..
1) Making all integer properties to a string type is not a good idea for API consumers/clients who are using Pega APIs because they have to send all integer properties in the string ( as per Pega API definition/Swagger)
2) Even if we try to keep decimals at the API layer instead of integers as all decimal elements which are holding the null values in the JSON request get removed by Pega before populating MyServicePage but when it comes to mapping part still decimal property at data layer gets initialized with 0 even though source decimal property doesn't exist on MyServicePage.
Having a when check for each property is really a challenge from a maintenance perspective..