publish: ApiTagDescription PUT fails cross-service — properties.tagId references source APIM service
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- azure, typescript
Hướng nghiên cứu
Start by reading the publisher path for apitagdescription and the extracted tagDescriptionInformation.json artifact. Check how its PUT body is formed and compare it with the allowed TagDescriptionCreateParameters fields described in the issue. Done means cross-service publishing no longer sends properties.tagId; the issue reports successful PUTs as the expected result.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Publishing extracted artifacts to a different APIM service fails with HTTP 400 on every ApiTagDescription resource:
ERROR PUT apitagdescription/<api-id>/<tag-id>: HTTP 400: {"error":{"code":"ValidationError","message":"Resource id '/subscriptions/.../resourceGroups/.../providers/Microsoft.ApiManagement/service/<SOURCE-SERVICE>/tags/<tag-id>' references APIM service '<SOURCE-SERVICE>', which is different from the service '<TARGET-SERVICE>' targeted by the request. Cross-service resource references are not allowed.","details":null}}
Root cause
The extractor saves the GET response verbatim, so tagDescriptionInformation.json contains properties.tagId with the full ARM path of the source service's tag:
"properties": {
"tagId": "/subscriptions/.../service/<SOURCE-SERVICE>/tags/<tag-id>",
...
}
The publisher sends the body as-is. Newer APIM api-versions validate ARM references inside PUT bodies and reject any that point at another service.
This is the same family of bugs as #285, which stripped the top-level id and rebuilt diagnostic loggerId, but missed properties.tagId on ApiTagDescription.
Expected behavior
Cross-service publish of tag descriptions succeeds. Per the ARM contract (TagDescriptionCreateParameters), the PUT body only accepts description, externalDocsUrl, externalDocsDescription — tagId is response-only, the tag is identified by the request URL (.../apis/{apiId}/tagDescriptions/{tagDescriptionId}). The publisher should strip properties.tagId before PUT.
Steps to reproduce
apiops extractfrom service A (API has tags with tag descriptions)apiops publishthe artifacts to service B- Every
apitagdescriptionPUT fails with the ValidationError above
- Ngôn ngữ chính
- TypeScript
- Star
- 29
- Fork
- 11
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/apiops-cli
-
type:question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Azure/apiops-cli#277 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stale type:documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
Azure/apiops-cli#250 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation P2 stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Azure/apiops-cli#24 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Azure/apiops-cli#317 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Azure/apiops-cli#316 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/apiops-cli
Issue tương tự
-
Add: YRF Music NepalĐang mởstreams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
walletbeat/walletbeat#1558 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hawk-digital-environments/HAWKI#438 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
GiganticMinecraft/seichi-portal-frontend#1165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày