Let me think about this and reply in detail later.

On Thu, Nov 12, 2020 at 8:37 PM vincixu <[email protected]> wrote:

> Recently, when I was reviewing some pr, I had trouble with plugins: which
> parameters should we put in the metadata?
> Some people may say: when you need to modify it through adminapi, put it in
> the metadata.
> Well, I also know this rule, but in fact, when we are developing a plugin,
> we are actually not sure which parameters really only need to be configured
> separately in the plugin instead of being put into the metadata.
> So here I suggest merging the configuration of the plugin with the
> metadata, so that the metadata and the plugin configuration use the same
> schema, and the priority order of values is as follows:
> plugin option's specified value> metadata >default value.
> In this way, we can get the following benefits:
> 1. Reduce complexity and learning costs. Plugin developers still only need
> to care about the option schema, and no longer need to call additional
> functions to get metadata.
> 2. No need to consider which parameters should be placed in metadata and
> which parameters should be placed in option
>
> In fact, usually the content of metadata is also required by plugins. We
> should reduce the burden on plugin development.
> What do you think?
>


-- 

*MembPhis*
My GitHub: https://github.com/membphis
Apache APISIX: https://github.com/apache/apisix

Reply via email to