Skip to content

Issue with Jsonpath matcher and in getting data from request body having json field name with dot(.) eg "first.name" #1105

@vishal-IAG

Description

@vishal-IAG

Description of the bug

Issue with Jsonpath matcher and in getting data from request body having json field name with dot(.) eg "first.name"

Steps to reproduce the issue

  1. Request json body:
    { "first.name" : "NAME1"}

  2. Try to get data using tempating as mentioned in hoverfly doc https://docs.hoverfly.io/en/latest/pages/keyconcepts/templating/templating.html
    {
    "name" : " {{Request.Body 'jsonpath' '$["first.name"]' }}"
    }

or

{
"name" : " {{Request.Body 'jsonpath' '$[first.name]' }}"
}

Observed result

Hoverfly error messages seen (If none, say none)
none

Hoverfly response
{
"name" : ""
}

If possible, add screenshots to help explain your problem

Expected result

Hoverfly response
{
"name" : "NAME1"
}

Additional relevant information

  1. Hoverfly version: 0.14.4
  2. Anything that might help us to diagnose the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions