wso2 / docs-mi

This repository contains the source code for WSO2 Micro Integrator documentation.
Apache License 2.0
3 stars 23 forks source link

Add sample expressions for json-eval expressions for property mediator #431

Open TTDKumarage opened 2 weeks ago

TTDKumarage commented 2 weeks ago

Description

Referring to the related document: When trying to add json-eval expression-based property mediators by following the instructions and samples given, it resulted in unexpected responses, such as properties getting extracted within arrays, or booleans always returning false etc.

The problem

Specifically, the following & the example it follows:

When specifying a JSONPath, use the format json-eval()

It doesn't reflect the need to use the $ and the significance of it.

Potential solution

It would be best if more samples against payloads could be included to make it easier for the reader to understand the expected expression format, and to better communicate the significance of $ to indicate the root of JSON object etc.

Generally, I believe that It may be helpful for the reader if more samples could be given for all expressions etc.