Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能支持响应json直接使用模板语法 #342

Open
BBYL-github opened this issue Nov 17, 2023 · 0 comments
Open

希望能支持响应json直接使用模板语法 #342

BBYL-github opened this issue Nov 17, 2023 · 0 comments

Comments

@BBYL-github
Copy link

BBYL-github commented Nov 17, 2023

[
  {
    "description": "Identity verification",
    "request": {
      "method": "POST",
      "uri": "/1001"
    },
    "response": {
      "text": {
        "template": "{\"transNo\":\"${req.json.transNo}\",\"transDate\":\"${req.json.transDate}\",\"resultCode\":\"00000\",\"bizContent\":{\"insFlag\":\"Y\"}}"
      }
    }
  }
]

这个配置是起作用的,但能否也支持以下配置方式:

[
  {
    "description": "Identity verification",
    "request": {
      "method": "POST",
      "uri": "/1001"
    },
    "response": {
      "json": {
        "transNo": "${req.json.transNo}",
        "transDate": "${req.json.transDate}",
        "resultCode": "00000",
        "bizContent": {
          "insFlag": "Y"
        }
      },
    }
  }
]

这种用法较为常见,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant