Swagger 模拟模式生成一些随机数据,不返回我在模拟控制器中定义的数据
Swagger mock mode generating some random data, not returning the one which I have defined in my mock controller
最近招摇是开始表现得很奇怪。它不是 return 我在模拟控制器中定义的实际模拟数据。基本上它根本不调用模拟控制器。
对于所有 api,它会重新运行一些系统生成的代码,例如
[
{
"id": "tempor aliquip",
"name": "cillum ea labore ut"
},
{
"id": "esse irure",
"name": "aliqua reprehenderit ut"
},
{
"id": "sunt ex",
"name": "dolor velit"
}
]
终于找到答案了,答案是"if there is extra mapping of end point in the mock controller then swagger automatically start creating end point for you and return any thing random value or system generated value."
最近招摇是开始表现得很奇怪。它不是 return 我在模拟控制器中定义的实际模拟数据。基本上它根本不调用模拟控制器。
对于所有 api,它会重新运行一些系统生成的代码,例如
[
{
"id": "tempor aliquip",
"name": "cillum ea labore ut"
},
{
"id": "esse irure",
"name": "aliqua reprehenderit ut"
},
{
"id": "sunt ex",
"name": "dolor velit"
}
]
终于找到答案了,答案是"if there is extra mapping of end point in the mock controller then swagger automatically start creating end point for you and return any thing random value or system generated value."