Skip to content

Comments

refactor(website-ssl): improve API flexibility for WebsiteSSLSearch validation#11926

Open
kgbow wants to merge 1 commit into1Panel-dev:dev-v2from
kgbow:dev-v2
Open

refactor(website-ssl): improve API flexibility for WebsiteSSLSearch validation#11926
kgbow wants to merge 1 commit into1Panel-dev:dev-v2from
kgbow:dev-v2

Conversation

@kgbow
Copy link

@kgbow kgbow commented Feb 23, 2026

What this PR does / why we need it?

  • 第三方系统调用 /websites/ssl/search 接口时,如果未传 orderBy 和 order 参数,请求会因 required 校验失败而报错。但 Service 层的Page方法已经对空值做了兜底处理(默认按 created_at desc 排序),required 约束过于严格,对外部 API 调用者不够友好。
  • OrderBy 的 oneof 校验仅允许 expire_date,而 Service 层默认排序字段为 created_at,验证规则与实际行为不一致。

Summary of your change

  • 将OrderBy和Order的验证规则从 required 改为 omitempty,使排序参数变为可选,未传时由 Service 层默认按 created_at desc 排序。
  • 在 OrderBy 的 oneof 白名单中增加 created_at,使验证规则与实际默认排序字段保持一致。

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 23, 2026

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zhengkunwang223 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant