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

返回response json时,template无法使用 #333

Open
toyood opened this issue Sep 7, 2023 · 0 comments
Open

返回response json时,template无法使用 #333

toyood opened this issue Sep 7, 2023 · 0 comments

Comments

@toyood
Copy link

toyood commented Sep 7, 2023

我做了如下尝试都不行。应该如何使用呢?我的场景是模拟服务接口,返回参数能够定制规则,比如支持表达式等,template也是一种方式,但是他不能使用。配置如下:

[
  {
    "description": "验证测试",
    "request": {
      "uri": "/login",
      "method": "post",
      "headers":{
          "content-type":"application/json;charset=utf-8" 
      },
      "json": {
          "username":"test",
          "password":"123456"
      }
    },
    "response": {
      "json":{
        "msg":"login success",
        "status":"200",
	"testDt":{"template":"${now(\"yyyy-MM-dd\")}}" //error
	"template":{"testDt":"${now(\"yyyy-MM-dd\")}}" //error
	"testDt":"${now(\"yyyy-MM-dd\")}"              //error
      }
    }
  }
]
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