publish: ApiTagDescription PUT fails cross-service — properties.tagId references source APIM service
Maintainer antworten meist innerhalb von 1 Tag
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
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
apiops extractfrom service A (API has tags with tag descriptions)apiops publishthe artifacts to service B- Every
apitagdescriptionPUT fails with the ValidationError above
- Vorherrschende Sprache
- TypeScript
- Sterne
- 29
- Forks
- 11
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 15
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Azure/apiops-cli
-
type:question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Azure/apiops-cli#277 ·
Maintainer antworten meist innerhalb von 1 Tag
-
stale type:documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 94/100
Azure/apiops-cli#250 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Documentation P2 stale
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Azure/apiops-cli#24 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
type:bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
Azure/apiops-cli#317 ·
Maintainer antworten meist innerhalb von 1 Tag
-
type:feature
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
Azure/apiops-cli#316 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Azure/apiops-cli
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
siyuan-note/siyuan#20313 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
alunduil/projects-v2-sync#14 ·
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
DevTools page styles leak into the host app in developmentEvtl. vergeben @onmax hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
nuxt-modules/better-auth#567 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag