Skip to content

disabling jsonpath #96

@molandim

Description

@molandim

I couldn't find in the documentation a way to disable jsonpath.

At the moment I have two endpoints : balance and account

that is the mock for the account endpoint:

"accounts/3231422": {
      "verbs": ["get"],
      "switch": ["SCENARIO_"],
      "mockFile": "account.json",
      "type": "default",
      "switchResponses": {
        "account.auto-top-up-empty": { "mockFile": "account.auto-top-up-empty.json" },
        "account.negative-balance": { "mockFile": "account.negative-balance.json" },
    }

Where SCENARIO_ is a http header with the value like "account.auto-top-up-empty"

for the balance the settings is like this:

"accounts/3231422/balance": {
      "verbs": ["get"],
      "switch": ["SCENARIO_"],
      "mockFile": "balance.json",
      "switchResponses": {
        "balance.not-connected": { "mockFile": "balance.not-connected.json" },
        "balance.error": { "httpStatus": 500, "mockFile": "error.json" }
      }
    },

However, there is a mock called balance.negative.json and it is being used as a mock for the balance when account.negative-balance scenario is in place.

That is not the desired effect on my case. I believe this is happening because of the jsonPath.

Is there any way to prevent this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions