apisix-dashboard
apisix-dashboard copied to clipboard
bug: config route with non-existent fields should return 400
Bug report
Describe the bug
config route with non-existent fields should return 400
How to Reproduce
{
caseDesc: "config route with non-existent fields (r1)",
Object: MangerApiExpect(t),
Path: "/apisix/admin/routes/r1",
Method: http.MethodPut,
Body: `{
"uri": "/hello",
"nonexistent": "test non-existent",
"upstream": {
"type": "roundrobin",
"nodes": [{
"host": "172.16.238.20",
"port": 1980,
"weight": 1
}]
}
}`,
Headers: map[string]string{"Authorization": token},
ExpectStatus: http.StatusBadRequest,
},
it return 200 and insert it to etcd now.
cc @nic-chen
if we fix #955, then we should fix this issue too