apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

bug: config route with non-existent fields should return 400

Open idbeta opened this issue 6 years ago • 2 comments

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.

idbeta avatar Nov 30 '20 09:11 idbeta

cc @nic-chen

LiteSun avatar Dec 01 '20 01:12 LiteSun

if we fix #955, then we should fix this issue too

membphis avatar Dec 04 '20 07:12 membphis