Closed adaamz closed 1 year ago
HI, Body matcher (body in request) is a plain object. You can see an example here: https://smocker.dev/technical-documentation/mock-definition.html#body-matcher
So you should try:
- request:
path:
matcher: ShouldEqual
value: /data
method:
matcher: ShouldEqual
value: POST
body:
obj:
matcher: ShouldEqual
value: aaa
response:
body: |-
{"columns": ["asdf"], "rows": [["def"]]}
status: 200
context: {}
state:
id: dfsfsdfds
times_count: 0
locked: false
creation_date: 2023-05-26T09:40:08.828683581Z
Yeah, looks like the GUI generated wrong yaml, I fixed it in my yaml and it probably works 🙂 thx
Hey, I would like to have mock matching on one specific field (other fields are present but I don't care about their values yet). When I create the mock, it looks like this
after I open UI, the body is then changed to
which is match on whole request body, not only on one specific field - and this causes that my requests are not matched and smocker returns mock not found error.
Is this bug? Thanks for help.