Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#312 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Alexey-Zheltov arbeitet bereits daran.

Seit 05.10.2026.

  • #313 von @Alexey-Zheltov — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
azure, typescript
Bereich
api, cli

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
TypeScript
Sterne
29
Forks
11
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
15

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Azure/apiops-cli

Alle Issues in Azure/apiops-cli

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.