Hi :slightly_smiling_face: I have a question regar...
# help
Hi 🙂 I have a question regarding recordState functionality. I’m putting in the state set of fields, for example:
Copy code
  "name": "recordState",
  "parameters": {
    "state": {
      "id": "{{jsonPath response.body '$.id'}}",
      "name": "{{jsonPath request.body '$.name'}}",
      "externalId": "{{jsonPath request.body '$.externalId'}}"
    "context": "resource-{{jsonPath response.body '$.id'}}"
If in the body any param is not passed, recordState will put in the context anyway this field with value empty string
. Afterward, when I want to GET this resource on GET endpoint, I’ll receive in the response empty string for value which is initially not passed (nullable field). Actually it should return null. Desired behaviour is to differentiate null from empty string. How to achieve desired behaviour of the mock?
Also, I tried with
and it’s returning in the response
as string. But since this field should be numeric, I don’t want it to return in the response
"externalId": "null"
, I want it to be
"externalId": null
can you open a bug in https://github.com/wiremock/wiremock-extension-state ? Will take care of it
Sure! I’ll also open one feature request, I found out something that’ll be nice to have as a functionality . 🙂
đź‘Ť 1