I think so, too ^-^, for currently `GET /apisix/admin/plugins` only return plugin names list, and as we want to keep the original api the same
在 2020-12-07 19:24:46,"Zhiyuan Ju" <[email protected]> 写道: >OK for me, and it's default value should be false IMO? > >刘曦冉 <[email protected]> 于 2020年12月7日周一 下午1:23写道: > >> Hi Community:For the name of the API, zexuan recommended ` >> /apisix/admin/plugins?all=true`, because >> > The definition of `plugin attributes` is taken too. >> >> >> it is fine for me and what do you think? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> At 2020-12-01 11:18:37, "Zexuan Luo" <[email protected]> wrote: >> >The definition of `plugin attributes` is taken too, see >> > >> https://github.com/apache/apisix/blob/9dfe697b644691509b55cd7ec58188b33dd3e792/conf/config-default.yaml#L245 >> > >> >What about using ` /apisix/admin/plugins?all=true`? >> > >> >BTW, it would be better if we can avoid the verb in the REST API, to make >> >it less like RPC. >> >If the verb is inevitable, put it in the last part, like this: >> >/apisix/admin/plugins:list?all=true. >> >Therefore we can avoid conflict when we need to introduce >> >/apisix/admin/plugin/<plugin_name> API. >> > >> >YuanSheng Wang <[email protected]> 于2020年12月1日周二 上午10:38写道: >> > >> >> I think this is fine for us. >> >> >> >> API: */apisix/admin/plugins/list_with_attributes* >> >> Desc: return all the attributes of the plugin. >> >> >> >> Return value: >> >> >> >> ```json >> >> [ >> >> { >> >> "name": "key-auth", >> >> "type": "auth", >> >> "schema": { >> >> .... >> >> } >> >> ...other plugin meta_data >> >> }, >> >> { >> >> ... >> >> } >> >> ] >> >> ``` >> >> >> >> >> >> On Tue, Dec 1, 2020 at 10:36 AM 刘曦冉 <[email protected]> wrote: >> >> >> >> > >> >> > >> >> > >> >> > Thanks for zexuan‘s explanation which answered my question. >> >> > as for the name of the new api, >> >> > > How about this name? >> >> > /apisix/admin/plugins/list_all >> >> > >> >> > >> >> > agree, for 2.x is a good compromise. >> >> > we can add a TODO here, when we do a big version upgrade, we could >> >> > consider to uses `/plugins` and query params to get all plugin >> >> information >> >> > and specific plugin information. >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > 在 2020-12-01 09:18:19,"Zexuan Luo" <[email protected]> 写道: >> >> > >> plugin metadata includes >> >> > >name, version, type, priority, which is common to all plugins, and is >> >> used >> >> > >to describe the nature of the plugin >> >> > > >> >> > >The terminology of 'plugin metadata' is already taken by plugin >> level >> >> > >configuration. We should avoid redefinition of 'plugin metadata' and >> >> > define >> >> > >a new name for plugin info >> >> > > >> >> > >王三 <[email protected]> 于2020年11月30日周一 下午10:20写道: >> >> > > >> >> > >> I think metadata and schema are parallel things, plugin metadata >> >> > includes >> >> > >> name, version, type, priority, which is common to all plugins, and >> is >> >> > used >> >> > >> to describe the nature of the plugin. >> >> > >> The schema and consumer_schema are the plugin's schema, which >> defines >> >> > the >> >> > >> configuration parameters for generating a plugin instance. >> >> > >> >> >> > >> Perhaps the above perception is slightly radical. >> >> > >> I prefer to think of the schema and consumer_schema as part of the >> >> > plugin‘s >> >> > >> metadata, except that some plugins have a null consumer_schema. >> >> > >> >> >> > >> 刘曦冉 <[email protected]> 于2020年11月30日周一 下午10:00写道: >> >> > >> >> >> > >> > >> >> > >> > >> >> > >> > >> >> > >> > There are a few questions I'd like to confirm: >> >> > >> > 1、Is meta data only a part of plugin's information? >> >> > >> > 2、In v2.0, Manager-api and Admin-api are independent of each >> other, >> >> > >> > right? After checking, the exist API listed by membphis are >> >> > admin-apis, >> >> > >> > and currently there are two exist APIs in manger-api >> >> > >> > `GET /apisix/admin/plugins` to get plugin names list >> >> > >> > `GET /apisix/admin/schema/plugins/{plugin_name}` to get specific >> >> > plugin's >> >> > >> > schema >> >> > >> > >> >> > >> > 在 2020-11-30 20:30:27,"YuanSheng Wang" <[email protected]> 写道: >> >> > >> > >exist API list: >> >> > >> > > /apisix/admin/plugins/list >> >> > >> > > /apisix/admin/plugins/reload >> >> > >> > > /apisix/admin/plugins/{plugin_name} >> >> > >> > > /apisix/admin/plugin_metadata/{plugin_name} >> >> > >> > > >> >> > >> > >How about this name? >> >> > >> > > /apisix/admin/plugins/list_all >> >> > >> > > >> >> > >> > > >> >> > >> > >On Mon, Nov 30, 2020 at 7:43 PM Zexuan Luo < >> [email protected] >> >> > >> >> > >> > wrote: >> >> > >> > > >> >> > >> > >> We already have API for plugin_metadata and it is not related >> to >> >> > the >> >> > >> > plugin >> >> > >> > >> information. I am afraid there will be some confusion. >> >> > >> > >> >> >> > >> > >> YuanSheng Wang <[email protected]> 于2020年11月30日周一 下午6:26写道: >> >> > >> > >> >> >> > >> > >> > The idea is very good. >> >> > >> > >> > The response data format is fine to me too. >> >> > >> > >> > >> >> > >> > >> > Just small changing(not important): >> >> > >> > >> > `GET /apisix/admin/plugins/meta_data` >> >> > >> > >> > change to >> >> > >> > >> > `GET /apisix/admin/plugins/metadata` >> >> > >> > >> > >> >> > >> > >> > >> >> > >> > >> > On Mon, Nov 30, 2020 at 5:54 PM 刘曦冉 <[email protected]> >> >> wrote: >> >> > >> > >> > >> >> > >> > >> > > Hi Community: >> >> > >> > >> > > >> >> > >> > >> > > >> >> > >> > >> > > >> >> > >> > >> > > This discussion originates from issue: >> >> > >> > >> > > https://github.com/apache/apisix-dashboard/issues/529 >> >> > >> > >> > > >> >> > >> > >> > > >> >> > >> > >> > > Background >> >> > >> > >> > > Dashboard wants to optimize the UE of config the plugins. >> For >> >> > the >> >> > >> > >> plugins >> >> > >> > >> > > such as `key-auth` `prometheus` etc. user only need to >> >> > >> > enable/disable >> >> > >> > >> > them >> >> > >> > >> > > in route or service without any configurations. so it >> would >> >> be >> >> > >> > better >> >> > >> > >> > that >> >> > >> > >> > > only show switch for these plugins. >> >> > >> > >> > > When rendering the plugin page, the FE needs to know not >> only >> >> > the >> >> > >> > name >> >> > >> > >> of >> >> > >> > >> > > the plugins(which have already been returned by `GET >> >> > >> > >> > > /apisix/admin/plugins`), but also need to know the >> plugins' >> >> > schema >> >> > >> > >> which >> >> > >> > >> > is >> >> > >> > >> > > used to judge whether the plugin needs to be config >> >> > >> > >> > > Solution >> >> > >> > >> > > Refer to >> >> > >> > >> > > >> >> > >> > >> > >> >> > >> > >> >> >> > >> > >> >> > >> >> >> > >> >> >> https://github.com/apache/apisix-dashboard/issues/529#issuecomment-735641857 >> >> > >> > >> > > It would be better to create a new API in manger-api, >> which >> >> is >> >> > >> used >> >> > >> > to >> >> > >> > >> > > return all the information of the plugins, the ideal data >> >> > >> structure >> >> > >> > is >> >> > >> > >> as >> >> > >> > >> > > follows: >> >> > >> > >> > > ```json >> >> > >> > >> > > [ >> >> > >> > >> > > { >> >> > >> > >> > > "name": "key-auth", >> >> > >> > >> > > "type": "auth", >> >> > >> > >> > > "schema": { >> >> > >> > >> > > .... >> >> > >> > >> > > } >> >> > >> > >> > > ...other plugin meta_data >> >> > >> > >> > > }, >> >> > >> > >> > > { >> >> > >> > >> > > ... >> >> > >> > >> > > } >> >> > >> > >> > > ] >> >> > >> > >> > > ``` >> >> > >> > >> > > And for the API name >> >> > >> > >> > > Just follow the current convention:as `GET >> >> > /apisix/admin/plugins` >> >> > >> > has >> >> > >> > >> > > already in use for get all plugins names list, so the new >> >> name >> >> > >> > would be >> >> > >> > >> > > `GET /apisix/admin/plugins/meta_data` to get all plugins >> >> > >> > informations >> >> > >> > >> > list. >> >> > >> > >> > > When we have a large version change: for a better Reatful >> >> way, >> >> > I >> >> > >> > perfer >> >> > >> > >> > > this way: >> >> > >> > >> > > >> >> > >> > >> > >> >> > >> > >> >> >> > >> > >> >> > >> >> >> > >> >> >> https://github.com/apache/apisix-dashboard/issues/849#issuecomment-735338561 >> >> > >> > >> > > the name would be `GET /api/version/plugins` >> >> > >> > >> > > >> >> > >> > >> > > >> >> > >> > >> > > What do you think? Looking forward to your comments and >> >> > >> suggestions. >> >> > >> > >> > > Thanks~! >> >> > >> > >> > > >> >> > >> > >> > > >> >> > >> > >> > > Best wishes >> >> > >> > >> > > Liuxiran >> >> > >> > >> > >> >> > >> > >> > >> >> > >> > >> > >> >> > >> > >> > -- >> >> > >> > >> > >> >> > >> > >> > *MembPhis* >> >> > >> > >> > My GitHub: https://github.com/membphis >> >> > >> > >> > Apache APISIX: https://github.com/apache/apisix >> >> > >> > >> > >> >> > >> > >> >> >> > >> > > >> >> > >> > > >> >> > >> > >-- >> >> > >> > > >> >> > >> > >*MembPhis* >> >> > >> > >My GitHub: https://github.com/membphis >> >> > >> > >Apache APISIX: https://github.com/apache/apisix >> >> > >> > >> >> > >> >> >> > >> >> >> >> >> >> -- >> >> >> >> *MembPhis* >> >> My GitHub: https://github.com/membphis >> >> Apache APISIX: https://github.com/apache/apisix >> >> >>
