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

bug: create route with plugin, will be error

Open idbeta opened this issue 5 years ago • 1 comments

Bug report

Describe the bug

create route with plugin, will be error

How to Reproduce

  1. 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 image
{"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}]}}
  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}]}}

idbeta avatar Dec 12 '20 05:12 idbeta

Need a discussion on if we MUST have valid data no matter enable or disable that plugin.

cc @nic-chen @idbeta @membphis

juzhiyuan avatar Dec 12 '20 07:12 juzhiyuan