最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - How to return a number instead of a string in Wiremock JSON response template - Stack Overflow

programmeradmin4浏览0评论

Below is shown the JSON response file for a wiremock request. The issue is that the value for num in the request is a number, but this response file is returning num as a string.

{
  "num": "{{jsonPath request.body '$.num'}}",
  "string": "lorem"
}

I have tried removing the double quotes i.e. "num": {{jsonPath request.body '$.num'}}, and this works (a number is now returned), but now I get error "Property expected json(513)" in VS Code IDE which I do not want. What can be done to fix this error?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论