dreamhead / moco

Easy Setup Stub Server
MIT License
4.35k stars 1.08k forks source link

How to define the regex for the json input. When I try it gives me an 400 Bad Request #298

Closed vinodronad closed 2 years ago

vinodronad commented 3 years ago

Json input file. { "request": { "uri": "/api/v1/refresh/account", "method": "POST", "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": { "startsWith": "Bearer " }, "SourceSystemId": "AAA", "SourceServerId": "BBB", "trackingId": { "match": "." }, "timestamp": { "match": "." } }, "json": { "accountNumber": { "startsWith": "[0-9]" } } }, "response": { "text":"{\"message\":\"Refresh request was sent to queue for processing\",\"refreshStatus\":\"OK\"}" } }

When I do not define any regex for the accountNumber and just use it as below it works "json": { "accountNumber": "981239812390123" } Please help me out here!.

tian-pengfei commented 2 years ago

it doesnt support for json of request

vinodronad commented 2 years ago

Thank you for reply