> 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
> >
>

Reply via email to