when created route by adminAPI, method can be null value which mean all method good to use, bug dashboard can not identify.
adminAPI,no method, means all method can be used:
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"name":"test_route_%s",
"uri": "/name/1/*",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:9797": 1
}
}
}
dashboard, can not identify

cc @membphis to determine this issue.
adminAPI,no
method, means all method can be used
confirm, that is the default way for admin API. we'd better keep same for this process
This will make confusion in the frontend, two solutions here,
for method, I think the Admin API's logic is fine.
method: means any method.method: limit with listed method.It is the same as other fields, eg: host, remote_addr etc.

It may be reasonable in the APIs, but it's not in GUI (UX). Let's hear others' opinions.
cc @liuxiran @LiteSun @moonming @ShiningRush
I think there is good with the dashboard interaction now
The dashboard does not need to be completely consistent with the admin API
- no
method: means any method.
I don't think the user should remember these default rules, otherwise it will be very difficult to use Dashboard later as the number of default rules increases.
I don't think the user should remember these default rules, otherwise it will be very difficult to use Dashboard later as the number of default rules increases.
agree +1
What you see is what you get is easier for users to accept馃槉, at the same time, the page supports multiple choices, which can cover all scenarios of method field, that is enough
I think we can use multiple-select instead of check box,
then we can select/unselect all methods through a shortcut button(such as select all) instead of clicking them one by one.
BTW: when I first saw the UI interaction of the method, I found it very inconvenient to use. The checkbox occupies too much page space and must be clicked one by one : (
it is a chance to optimize interaction.
Nice catch for me! And the antd should support this.
for
method, I think the Admin API's logic is fine.
- no
method: means any method.
That is not for Admin API, that is the default action for Route.

Please read the doc of Route: https://github.com/apache/apisix/blob/master/doc/admin-api.md#route
Same issue: hosts, methods and remote_addrs.
And I believe that many users' route data does not have the methods field.
current solution: use multiple select[1] to resolve this issue