refactor(admin): refactor admin consumers/plugin_metadata#8820
Conversation
0cf2b9f to
62b61eb
Compare
WIP refactor admin consumersWIP refactor admin consumers/plugin_metadata
WIP refactor admin consumers/plugin_metadata|
|
||
| local function check_conf(username, conf) | ||
| -- core.log.error(core.json.encode(conf)) | ||
| if not conf then |
There was a problem hiding this comment.
We can do the same with the plugin metadata?
There was a problem hiding this comment.
It seems that the other resources may check additional conditions or parameters before checking the schema.
Like the routes:
https://github.com/apache/apisix/blob/master/apisix/admin/routes.lua#L36
For these reasons, schema check cannot be moved to public code for the time being.
There was a problem hiding this comment.
The same goes for secrets:
Its schema is decided by typ.
There was a problem hiding this comment.
There is a common check in the
apisix/apisix/admin/resource.lua
Line 36 in bc37568
We don't need to repeat it in the custom checker. It's not about schema.
Description
Fixes parts of #8569
Checklist