zhanhengLu opened a new issue, #8111: URL: https://github.com/apache/apisix/issues/8111
### Description 使用apisix dashborad创建消费者,身份认证选择我们自己开发的插件,插件中有一个属性的格式是数组类型,在这里创建没有问题  是用apisix dashboard查看也是正常的,如下图:  但是当我用这个参数去直接请求apisix的创建消费者的接口时,产生了问题。 参照该文档【https://apisix.apache.org/zh/docs/apisix/admin-api/#consumer】调用 PUT /apisix/admin/consumers这个接口创建资源 入参为:`{"username":"test_consumer2","plugins":{"sha-zj-plugin":{"app_id":"test","app_key":"test","allow_urls":[],"disable":false}}}` 接口返回为:``` { "node": { "value": { "update_time": 1666077788, "create_time": 1666077788, "plugins": { "sha-zj-plugin": { "app_key": "test", "clock_skew": 0, "disable": false, "encode_uri_params": true, "max_req_body": 524288, **"allow_urls": { },** "app_id": "test", "algorithm": "sha256" } }, "username": "test_consumer2" }, "key": "\/apisix\/consumers\/test_consumer2" }, "action": "set" } ``` 可以发现,上面加粗字段,这个allow_urls的属性被更改为对象类型 但是,当我把入参修改为: `{"username":"test_consumer3","plugins":{"sha-zj-plugin":{"app_id":"test","app_key":"test","allow_urls":["/all"],"disable":false}}} `这个时候的返回却是正确的格式,如下: ``` { "node": { "value": { "update_time": 1666078071, "create_time": 1666078071, "plugins": { "sha-zj-plugin": { "app_key": "test", "clock_skew": 0, "disable": false, "encode_uri_params": true, "max_req_body": 524288, "allow_urls": [ "\/all" ], "app_id": "test", "algorithm": "sha256" } }, "username": "test_consumer3" }, "key": "\/apisix\/consumers\/test_consumer3" }, "action": "set" } ``` 有大佬知道这个问题产生的原因吗?是我的参数需要进行处理嘛? ### Environment 使用docker部署的apisix,镜像为:apisix:2.12.1-centos apisix-dashboard镜像为:apisix-dashboard:2.11-centos -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
