Wiremock JSON is proxying all the request also the saved ones

26 Views Asked by At

In my below code, the thing is if i am trying to get responses for any of the request its getting proxied

{
    "mappings": [
        {
            "priority": 1,
            "request": {
                "method": "GET",
                "urlPathPattern": "/container/epsSelfService/customers/([a-zA-Z1-9]*)/cashDepositTotals/([a-zA-Z1-9]*)"
            },
            "response": {
                "status": 200,
                "headers": {
                    "Content-Type": "application/json"
                },
                "bodyFileName": "depositlimitpersonalresponse.json"
            }
        },
        {
            "priority": 2,
            "request": {
                "method": "GET",
                "urlPathPattern": "/container/epsSelfService/chubStartV1"
            },
            "response": {
                "status": 200,
                "headers": {
                    "Content-Type": "application/json"
                },
                "bodyFileName": "startclearinghub.json"
            }
        },
        {
            "priority": 3,
            "request": {
                "method": "GET",
                "urlPathPattern": "/container/epsSelfService/chubSubmitV1"
            },
            "response": {
                "status": 200,
                "headers": {
                    "Content-Type": "application/json"
                },
                "bodyFileName": "submitclearinghub.json"
            }
        },
        {
            "priority": 4,
            "request": {
                "method": "GET",
                "urlPathPattern": "/container/epsSelfService/chubValidateV1"
            },
            "response": {
                "status": 200,
                "headers": {
                    "Content-Type": "application/json"
                },
                "bodyFileName": "validateclearinghub.json"
            }
        },
        {
            "priority": 5,
            "request": {
                "method": "GET",
                "urlPathPattern": "/container/epsSelfService/chubCompleteV1"
            },
            "response": {
                "status": 200,
                "headers": {
                    "Content-Type": "application/json"
                },
                "bodyFileName": "completeclearinghub.json"
            }
        },
        {
            "priority": 100,
            "request": {
                "urlPathPattern": ".*"
            },
            "response": {
                "proxyBaseUrl": "http://localhost:922"
            }
        }
    ]
}

tried to play around with the priority but no luck

0

There are 0 best solutions below