Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

publish: ApiTagDescription PUT fails cross-service — properties.tagId references source APIM service

Đang mở
#312 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Alexey-Zheltov đang làm issue này rồi.

Từ ngày 5/10/2026.

  • #313 của @Alexey-Zheltov — đang mở

Đá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
Lĩnh vực
api, cli

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

  1. apiops extract from service A (API has tags with tag descriptions)
  2. apiops publish the artifacts to service B
  3. Every apitagdescription PUT 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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/apiops-cli

Tất cả issue của Azure/apiops-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.