Azure / Azure/openapi-diff

Error: Invalid reference token: /Tables(\'{tableName}\')

未关闭
#445 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
290
派生
50
平均合并
5 天 13 小时
30 天内合并 PR
5

描述

In this PR, converting `tables` to TSP:

- https://github.com/Azure/azure-rest-api-specs/pull/39915

`openapi-diff` prints a lot of messages like this. They are just logged as warnings, so maybe they're harmless, but they might also be a symptom of a larger problem (like missing validation).

```
ENTER definition runOad oldSpec: /home/runner/work/azure-rest-api-specs/same-version-c93b354fd9c14905bb574a8834c4d69b/specification/cosmos-db/data-plane/Tables/stable/2019-02-02/table.json, newSpec: specification/cosmos-db/data-plane/Tables/stable/2019-02-02/table.json, oldTag: undefined, newTag: undefined
oad.CompareTags() when !(oldTag && newTag)
Error: Invalid reference token: /Tables(\'{tableName}\')
at api.get (/home/runner/work/azure-rest-api-specs/azure-rest-api-specs/node_modules/json-pointer/index.js:54:19)
at updateChangeProperties (/home/runner/work/azure-rest-api-specs/azure-rest-api-specs/node_modules/@azure/oad/dist/lib/validators/openApiDiff.js:30:58)
at /home/runner/work/azure-rest-api-specs/azure-rest-api-specs/node_modules/@azure/oad/dist/lib/validators/openApiDiff.js:247:105
at Array.map ()
at OpenApiDiff.processViaOpenApiDiff (/home/runner/work/azure-rest-api-specs/azure-rest-api-specs/node_modules/@azure/oad/dist/lib/validators/openApiDiff.js:247:40)
at async runOad (file:///home/runner/work/azure-rest-api-specs/azure-rest-api-specs/eng/tools/openapi-diff-runner/dist/src/run-oad.js:48:28)
at async doBreakingChangeDetection (file:///home/runner/work/azure-rest-api-specs/azure-rest-api-specs/eng/tools/openapi-diff-runner/dist/src/detect-breaking-change.js:188:29)
at async checkBreakingChangeOnSameVersion (file:///home/runner/work/azure-rest-api-specs/azure-rest-api-specs/eng/tools/openapi-diff-runner/dist/src/detect-breaking-change.js:71:48)
at async validateBreakingChange (file:///home/runner/work/azure-rest-api-specs/azure-rest-api-specs/eng/tools/openapi-diff-runner/dist/src/commands.js:107:17)
at async main (file:///home/runner/work/azure-rest-api-specs/azure-rest-api-specs/eng/tools/openapi-diff-runner/dist/src/index.js:152:18)
```

https://github.com/Azure/azure-rest-api-specs/actions/runs/21380285709/job/61545548491?pr=39915#step:5:92

贡献指南

打开贡献指南

调研方向

Reproduce the warning using the Cosmos DB Tables conversion and the linked GitHub Actions run. Start with @azure/oad/dist/lib/validators/openApiDiff.js, then trace the calls from eng/tools/openapi-diff-runner/dist/src/run-oad.js and detect-breaking-change.js. Determine whether the invalid reference token is harmless or indicates missed validation, and verify the chosen behavior against the same-version breaking-change check.

由索引模型根据 Issue 内容生成。

评估

技术栈
openapi
领域
cli, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。