bug: when setting the plugin in codemirror, an error is prompted.
Bug report
Describe the bug
when create route or setting plugin in Plugin List, after setting the plugin in codemirror, submit it, an error is prompted.

@liuxiran @nic-chen Hello, please take a look at this issue. This issue happened due to a different schema for Route and Consumer.
the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.
According to https://github.com/apache/apisix-dashboard/issues/529 .
I think we should not config the auth plugins in route, service or global rule.
the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.
According to #529 .
I think we should not config the auth plugins in route, service or global rule.
but the Plugin List page is not global rule, can’t enable auth plugins in it, will make others strange.
the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.
According to #529 .
I think we should not config the auth plugins in route, service or global rule.
then how to bind Consumer with Route?

Got it, then for Route, Service and Global Rule, we only need to enable/disable Auth plugins without any configurations, right?
we only need to add some tips in the frontend, tells users just enable or disable.
the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.
According to #529 .
I think we should not config the auth plugins in route, service or global rule.
Yep, only enable/disable auth plugins in Route Service module is engough ^_^
but for the global rule, I'm not sure if we only enable a auth plugin, what will happen in Consumer module? @nic-chen
the authentication plugins should be only shown with a switch to enabled/disabled in route or service module.
According to #529 . I think we should not config the auth plugins in route, service or global rule.
Yep, only enable/disable auth plugins in
RouteServicemodule is engough ^_^ but for the global rule, I'm not sure if we only enable a auth plugin, what will happen in Consumer module? @nic-chen
global rule acts like enable plugins for routes. So it's same as enable plugins in routes.
A little strange 🤔 If we need to create a global rule with auth plugins, we should:
- Create a Consumer with Auth plugins;
- Create a global rule and enable at least 1 auth plugin;
cc @membphis @spacewander May I know what's your opinion?
ping
The auth plugin is all for selecting a consumer. It is a noop if we don't have any consumer. Also the route configuration for auth plugin is usually empty.
fine, then for Route, Service, and GlobalRule, we only disable/enable auth plugins, right? 🤔
fine, then for Route, Service, and GlobalRule, we only disable/enable auth plugins, right? 🤔
yes, you are right. @juzhiyuan