WireMock我正在嘗試使用帶有文件配置的獨立 jar來模擬一些 API JSON。下面是JSON包含我正在使用的多個存根映射的文件-{ "mappings": [{ "request": { "method": "GET", "url": "/users" }, "response": { "status": 200, "body": [{ "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "[email protected]", "address": { "street": "Kulas Light", "suite": "Apt. 556", "city": "Gwenborough", "zipcode": "92998-3874", "geo": { "lat": "-37.3159", "lng": "81.1496" } }, "phone": "1-770-736-8031 x56442", "website": "hildegard.org", "company": { "name": "Romaguera-Crona", "catchPhrase": "Multi-layered client-server neural-net", "bs": "harness real-time e-markets" } }, { "id": 2, "name": "Ervin Howell", "username": "Antonette", "email": "[email protected]", "address": { "street": "Victor Plains", "suite": "Suite 879", "city": "Wisokyburgh", "zipcode": "90566-7771", "geo": { "lat": "-43.9509", "lng": "-34.4618" } }, "phone": "010-692-6593 x09125", "website": "anastasia.net", "company": { "name": "Deckow-Crist", "catchPhrase": "Proactive didactic contingency", "bs": "synergize scalable supply-chains" } } ], "headers": { "Content-Type": "application/json" } } }, { "request": { "method": "GET", "url": "/posts?userId=1" }, "response": { "status": 200, "body": "[]" } }當我嘗試Wiremock使用獨立 jar ( wiremock-standalone-2.24.1.jar) 啟動服務器時,出現以下異常,我驗證了 Json 架構,它看起來沒問題。
添加回答
舉報
0/150
提交
取消