>     local plugin_xsd_file = prefix .. "/conf/plugin.schema.json"

I also think that this is not a good method, it will make Apache APISIX can
not easily complete horizontal expansion.
because it also depends on the local configuration file.

On Mon, Apr 13, 2020 at 12:25 PM 88786...@qq.com <88786...@qq.com> wrote:

> Hi,
> I want to develop a new  APISIX plug-in for my scenario, but it's schema
> is more complex, the recommended way is to split it into multiple plug-ins
> or to keep one?
> I want to get it form the schema file instead of initializing the table in
> it's file if recommend the latter.
> Is there anything wrong or some risk in this way.
>
> ```
> local prefix = ngx.config.prefix()
>     local plugin_xsd_file = prefix .. "/conf/plugin.schema.json"
>     local f = assert(io.open(cfg_file))
>     local xsd_t = json.decode(assert(f:read('*a')))
>     f:close()
>     --local myvalidator = jsonschema.generate_validator(xsd_t)
> ```
>
> thx~
>
>
> 88786...@qq.com
>


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

Reply via email to