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

ApiOps CLI Publisher fails with empty urlTemplate error.

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

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
api, cli

Rechercherichtung

Start with the supplied operationInformation.json for notification-socket-v1/operations/onHandshake and trace how apiops publish processes its urlTemplate. Reproduce with the command and artifact described in the issue; done means the WebSocket handshake operation can be published with an empty urlTemplate.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

type:bug
Command that triggered the bug

npx apiops publish

Expected behavior

The publisher pipeline can publish the Websocket onHandshake API with a empty urlTemplate.

Actual behavior

Our Publisher pipeline is failing when running the apiops publish command with this error:

The Command from the pipeline:

npx apiops publish `
            --resource-group '${{ parameters.resourceGroupName }}' `
            --service-name '${{ parameters.apiManagementServiceName }}' `
            --source '${{ parameters.artifactSource }}' `
            --overrides '${{ parameters.configurationPath }}' `
            --subscription-id $subscriptionId `
            --commit-id '$(Build.SourceVersion)'

The Error:

ERROR PUT apioperation/notification-socket-v1/onHandshake: HTTP 400: {"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"urlTemplate","message":"'urlTemplate' should not be empty."}]}}

The API is a WebSocket API & the Socket is opening a handshake to the PubSub. We need an empty urlTemplate for it because we cant change it in azure.

This is the artifact file from it (apim-artifacts\apis\notification-socket-v1\operations\onHandshake\operationInformation.json):

{
  "id": "/subscriptions/<>/resourceGroups/<>/providers/Microsoft.ApiManagement/service/<>/apis/notification-socket-v1/operations/onHandshake",
  "type": "Microsoft.ApiManagement/service/apis/operations",
  "name": "onHandshake",
  "properties": {
    "displayName": "onHandshake",
    "method": "GET",
    "urlTemplate": "",
    "templateParameters": [],
    "description": "WebSocket opening handshake",
    "responses": [],
    "policies": null,
    "effectivePath": null
  }
}
apiops CLI version

1.0.4

Environment details
  • Image: ubuntu-latest
  • NodeJs: 22.x
CI/CD environment

Azure DevOps

Is this bug blocking you?

Yes

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.