Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#312 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #313 di @Alexey-Zheltov — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
azure, typescript
Ambito
api, cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
32
Fork
12
Merge medio
2g 14h
PR unite (30g)
21

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/apiops-cli

Tutte le issue di Azure/apiops-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.