Skip to content

Some Admin APIs' data structure are not unified #6105

Description

@anjia0532

Issue description

apisix admin api 的略微混乱的数据结构

  1. 部分接口(e.g. /apisix/admin/plugin_metadata/和 /apisix/admin/global_rules)中的 "count" 字段是string,其余admin接口是int
  2. 同key数据结构不一致,常见的比如 node.nodes 无值{},有值[],更奇葩的是upstreamnode.nodes[].nodes,通过接口更新的是{},通过dashboard更新的是[{},{}],就很难受
  3. /apisix/admin/plugins /apisix/admin/plugins?all=true/apisix/admin/plugins/list 返回风格与其他接口返回数据风格不一致
  4. stand-alone 模式不支持(也可能没更新文档 ) /apisix/admin/plugin_configs 接口
  5. stand-alone#配置-plugins 文档中描述 stream: true # stream 插件需要设置 stream 属性为 true 啥样的插件算是 stream 插件?没法从admin api 相关接口中获得这个标识

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
  • the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
  • luarocks version, if the issue is about installation (cmd: luarocks --version):

Steps to reproduce

感觉很多是历史遗留问题,但是希望最好能解决下

Actual result

以上

Error log

Expected result

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions