Using a Map policy
The Map policy is perhaps one of the most user-friendly methods provided to transform request and response data. This policy provides a way to define your data structure or invoke the schema from your Definitions
configuration within the API configuration itself. Once the to and from data definitions are defined, this policy provides a convenient drag and drop feature to simply connect the fields to be mapped. The Map policy also provides the ability to add conditional logic, data formatting, calculations, and more. Although this policy can provide all of these features, you should use some restraint when being tempted to get too complex with it as the simplicity may come at a cost. That cost could be the performance or your API.
To explain and demonstrate how to configure the Map policy, let's take a simple order service where we are exposing the API as a RESTful service that expects JSON as the request. The backend, or target service, however, has not...