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