Skip to content

refactor(admin): refactor admin consumers/plugin_metadata#8820

Merged
spacewander merged 6 commits into
apache:masterfrom
An-DJ:refactor-admin
Feb 28, 2023
Merged

refactor(admin): refactor admin consumers/plugin_metadata#8820
spacewander merged 6 commits into
apache:masterfrom
An-DJ:refactor-admin

Conversation

@An-DJ

@An-DJ An-DJ commented Feb 9, 2023

Copy link
Copy Markdown
Contributor

Description

Fixes parts of #8569

  • consumers
  • plugin_metadata

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@An-DJ An-DJ changed the title refactor(admin): WIP refactor admin consumers refactor(admin): WIP refactor admin consumers/plugin_metadata Feb 14, 2023
@An-DJ An-DJ changed the title refactor(admin): WIP refactor admin consumers/plugin_metadata refactor(admin): refactor admin consumers/plugin_metadata Feb 16, 2023
Comment thread apisix/admin/resource.lua Outdated
Comment thread apisix/admin/resource.lua
Comment thread apisix/admin/resource.lua Outdated

local function check_conf(username, conf)
-- core.log.error(core.json.encode(conf))
if not conf then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do the same with the plugin metadata?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a common check in the

if not conf then

We don't need to repeat it in the custom checker. It's not about schema.

Comment thread apisix/admin/ssl.lua
@An-DJ An-DJ mentioned this pull request Feb 22, 2023
5 tasks
@spacewander
spacewander merged commit 7a6dde7 into apache:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants