Error: Invalid reference token: /Tables(\'{tableName}\')
- 主要語言
- 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
貢獻指南
研究方向
使用 Cosmos DB Tables 轉換和連結的 GitHub Actions 執行來重現此警告。先從 @azure/oad/dist/lib/validators/openApiDiff.js 開始,接著追蹤來自 eng/tools/openapi-diff-runner/dist/src/run-oad.js 和 detect-breaking-change.js 的呼叫。判斷無效的參照權杖是無害的,還是表示遺漏了驗證,並根據相同版本的 breaking-change 檢查驗證所選擇的行為。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- openapi
- 領域
- cli, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100