apisix-dashboard
apisix-dashboard copied to clipboard
bug: create route with plugin, will be error
Bug report
Describe the bug
create route with plugin, will be error
How to Reproduce
- create route with route, only enable the plugin but not do any config, so when finish commit the route, it will prompt an error, which is correct

{"name":"test","desc":"","uris":["/name"],"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"priority":0,"plugins":{"limit-count":{"disable":false,"policy":"local","rejected_code":503}},"vars":[],"upstream":{"type":"roundrobin","timeout":{"connect":6000,"send":6000,"read":6000},"nodes":[{"host":"127.0.0.1","port":80,"weight":1}]}}
- but when I go back to route config, and disable the plugin, when finish commit the route again, it also will prompt an error, which is wrong
{"name":"test","desc":"","uris":["/name"],"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"priority":0,"plugins":{"limit-count":{"disable":true,"policy":"local","rejected_code":503}},"vars":[],"upstream":{"type":"roundrobin","timeout":{"connect":6000,"send":6000,"read":6000},"nodes":[{"host":"127.0.0.1","port":80,"weight":1}]}}
Need a discussion on if we MUST have valid data no matter enable or disable that plugin.
cc @nic-chen @idbeta @membphis