Repository navigation
fix(cli): data-aisa 的字段声明不再提上游路由,发 0.10.1 - #74
Merged
Merged
Conversation
平台侧已把 path 从 /data/search 与 /data/describe 的响应里剔除(它是上游路由, 取数只认 operationId,对接方拿到也无处可用)。本仓这边让声明跟上实际输出: - dataDescribeSchema 删掉 path 响应字段; - dataSearchSchema 的 results 结构说明、keyword 的匹配范围说明、以及 search 命令 的 description,都去掉 path。keyword 的匹配范围改为「能力索引(标识符、摘要、 类别)」—— 匹配行为本身不变,仍必须用英文、中文零命中。 **本仓不做字段剔除**:search / describe 都是 render(result.data) 原样透传,这是 刻意的薄壳设计。平台不返回该字段之后,CLI 的输出自然就干净了,声明与实际一致。 给 CLI 每个 verb 加字段剔除会破坏这个一致性,而且直连平台接口的调用方仍会看到它 —— 所以剔除放在平台那一层。 顺带给 method 的描述补上口径:GET 与 POST 都是查询,POST 不代表写操作(上游把 大量查询建模成 POST)。删掉 path 之后 method 成了唯一还可能引起误解的字段,这句 与 a2a-docs 的 §4.2 既有表述一致。 版本取 patch(0.10.0 → 0.10.1):只改字段声明与描述文字,不新增命令、不新增 flag、 不改运行时行为。照本仓幅度惯例 —— bef5a87(verify 报价刷新参数 + 错误码)、 3f0bd9c(扣款价格批注 flag)都是 patch,新增命令才取 minor(53baeb5 的 orders pay-batch:0.8.17 → 0.9.0)。 -base 的 Dockerfile 版本钉子**不需要跟着升**:本次只影响 --schema / --help 的帮助 文本,而 base 不读 CLI 的 schema 声明、只读它的 JSON 输出。 验证: - npm run type-check → 0 - npm run check:error-codes → 0 - npm run test → 0(66 个测试文件通过 / 1 跳过) - npm run build → 0;node apps/merchant-cli/dist/index.js --version → 0.10.1; data-aisa describe --schema 的输出里已无 path。
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.
平台侧已把 path 从 /data/search 与 /data/describe 的响应里剔除(它是上游路由,
取数只认 operationId,对接方拿到也无处可用)。本仓这边让声明跟上实际输出:
的 description,都去掉 path。keyword 的匹配范围改为「能力索引(标识符、摘要、
类别)」—— 匹配行为本身不变,仍必须用英文、中文零命中。
本仓不做字段剔除:search / describe 都是 render(result.data) 原样透传,这是
刻意的薄壳设计。平台不返回该字段之后,CLI 的输出自然就干净了,声明与实际一致。
给 CLI 每个 verb 加字段剔除会破坏这个一致性,而且直连平台接口的调用方仍会看到它
—— 所以剔除放在平台那一层。
顺带给 method 的描述补上口径:GET 与 POST 都是查询,POST 不代表写操作(上游把
大量查询建模成 POST)。删掉 path 之后 method 成了唯一还可能引起误解的字段,这句
与 a2a-docs 的 §4.2 既有表述一致。
版本取 patch(0.10.0 → 0.10.1):只改字段声明与描述文字,不新增命令、不新增 flag、
不改运行时行为。照本仓幅度惯例 —— bef5a87(verify 报价刷新参数 + 错误码)、
3f0bd9c(扣款价格批注 flag)都是 patch,新增命令才取 minor(53baeb5 的
orders pay-batch:0.8.17 → 0.9.0)。
-base 的 Dockerfile 版本钉子不需要跟着升:本次只影响 --schema / --help 的帮助
文本,而 base 不读 CLI 的 schema 声明、只读它的 JSON 输出。
验证:
data-aisa describe --schema 的输出里已无 path。