fix(mcp-market): Rename pagination field from has_next to hasnext - #1995
Merged
Conversation
- Rename pagination response field from `has_next` to `hasnext` for consistency - Update MCP servers endpoint to use standardized field naming - Maintains backward compatibility in pagination logic
Contributor
审阅者指南(在小型 PR 上折叠)审阅者指南此 PR 更新了 MCP 市场服务器分页响应,将字段名从 在 get_mcp_servers 中更新分页字段的序列图sequenceDiagram
actor Client
participant McpMarketConfigController
Client->>McpMarketConfigController: get_mcp_servers(page, pagesize)
McpMarketConfigController-->>Client: JSON { pagination.hasnext, pagination.page, pagination.pagesize, pagination.total }
文件级变更
提示与命令与 Sourcery 交互
自定义你的使用体验访问你的 控制面板 来:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the MCP market servers pagination response to rename the field from Sequence diagram for updated pagination field in get_mcp_serverssequenceDiagram
actor Client
participant McpMarketConfigController
Client->>McpMarketConfigController: get_mcp_servers(page, pagesize)
McpMarketConfigController-->>Client: JSON { pagination.hasnext, pagination.page, pagination.pagesize, pagination.total }
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层面的反馈:
- 描述中提到要保持向后兼容,但实际实现只是将
has_next重命名为hasnext。如果现有客户端依赖has_next,建议同时返回这两个字段,或者添加一个兼容层。 - 如果其他端点也使用分页机制,那么值得考虑把分页响应的构造逻辑(包括
hasnext的处理)集中到一个辅助方法中,这样可以在整个 API 中保持命名和行为的一致性。
提供给 AI Agent 的提示
请根据本次代码评审中的评论进行修改:
## 总体评论
- 描述中提到要保持向后兼容,但实际实现只是将 `has_next` 重命名为 `hasnext`。如果现有客户端依赖 `has_next`,建议同时返回这两个字段,或者添加一个兼容层。
- 如果其他端点也使用分页机制,那么值得考虑把分页响应的构造逻辑(包括 `hasnext` 的处理)集中到一个辅助方法中,这样可以在整个 API 中保持命名和行为的一致性。帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The description mentions maintaining backward compatibility, but the implementation only renames
has_nexttohasnext; consider returning both fields or adding a compatibility layer if existing clients rely onhas_next. - If other endpoints use pagination, it may be worth centralizing the pagination response construction (including the
hasnextlogic) in a helper to keep naming and behavior consistent across the API.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The description mentions maintaining backward compatibility, but the implementation only renames `has_next` to `hasnext`; consider returning both fields or adding a compatibility layer if existing clients rely on `has_next`.
- If other endpoints use pagination, it may be worth centralizing the pagination response construction (including the `hasnext` logic) in a helper to keep naming and behavior consistent across the API.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
API Breaking Change ReportComparing against Breaking change approval label:
oasdiffOutputopenapi-diffOutputGate decisionNo breaking changes detected. The check passed without approval override. |
TimeBomb2018
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
has_nexttohasnextfor consistencySummary by Sourcery
Bug Fixes:
hasnext键对齐,以避免 MCP 市场响应中的不一致。Original summary in English
Summary by Sourcery
Bug Fixes:
hasnextkey to avoid inconsistencies in MCP market responses.