'Unable to match predicate of path and value for grpc request

I am using the grpc plugin to create stubs for grpc requests. It works very well when matching the path only. However, I am facing issues to match both the path and the value. In particular, I am using the jsonpath to select the fields to match. Here is a sample o the request:

{
  "path": "/service.DataProvider/ReadData",
  "value": {
    "identifiers": [
      {
        "unique_id": "unset",
        "data_id": "point1",
        "system_id": "mock"
      }
    ],
    "start_time": {
      "seconds": "1650431509",
      "nanos": 0
    },
    "end_time": {
      "seconds": "1650431569",
      "nanos": 0
    }
  }
}

and the predicates:

        "predicates": [
        {
            "deepEquals": {
              "path": "/service.DataProvider/ReadData"
            }
          },
          {
            "jsonpath": {
              "selector": "$.identifiers[0].data_id"
            },
            "deepEquals": {
              "value": "point1"
            }
          },
          {
            "jsonpath": {
              "selector": "$.identifiers[0].system_id"
            },
            "deepEquals": {
              "value": "mock"
            }
          }
        ]

Any idea of what is wrong on the predicates above? Any comments will be highly appreciated. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source