Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

ApiOps CLI Publisher fails with empty urlTemplate error.

Abierto
#317 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
api, cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
29
Forks
11
Merge medio
1 d 15 h
PR fusionados (30 d)
15

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/apiops-cli

Todos los issues de Azure/apiops-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.