queues subscriptions create: schema types 'events' as string but API requires an array of strings
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
- 64/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Start at the queues subscriptions create command and inspect how the events request-body field is represented by cf schema and --help. Verify the API accepts an array of strings, then trace the validation or discovery path for event values. Done means the schema reports array items as strings and the CLI gives accurate guidance for the accepted bare event suffix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
cf schema queues subscriptions create types the events request-body field as string, but the API requires an array of strings. The description says "List of event types", so the schema contradicts itself, and the resulting failure surfaces as a generic validation error.
Version: cf v1.0.0-beta.10
Actual
$ cf schema queues subscriptions create | jq '.requestBodyFields[] | select(.name=="events")'
{
"name": "events",
"type": "string",
"required": false,
"description": "List of event types this subscription handles"
}
type is string while description says list. Passing an array of objects fails:
$ ... --body '{"source":{"type":"artifacts.repo",...},"events":[{"type":"cf.artifacts.repo.pushed"}],...}'
┌ APIError
│ [error] Validation error: Expected string, received object at "events[0]"
│ 400 Bad Request
Passing an array of strings is accepted:
$ ... --body '{...,"events":["pushed"],...}'
{ "id": "ecc4290d1c9b49909c24f49f58bb4373", ... }
Note the --events option help already renders as [array], so the flag and the schema disagree with each other as well as with the API.
Expected
"type": "array" with an items type of string, so cf schema — documented as the way to inspect the request a command sends — describes the request accurately.
Second, separate discovery problem in the same field
The Artifacts docs specify fully-qualified event types such as cf.artifacts.repo.pushed. The API rejects those and accepts only the bare suffix:
$ ... --body '{...,"events":["cf.artifacts.repo.pushed"],...}'
┌ APIError
│ [error] Validation error: Unrecognized event types for source type at "events"
$ ... --body '{...,"events":["pushed"],...}'
{ "id": "ecc4290d1c9b49909c24f49f58bb4373", ... }
There is no hint in the error listing the event types valid for the chosen source, so the valid value is only discoverable by bisection against the API. It would help if the error enumerated the accepted values, or if cf schema/--help documented the bare form for Artifacts.
Related: --source-type has no artifacts entry, reported separately.
- Lenguaje dominante
- TypeScript
- Estrellas
- 960
- Forks
- 62
- Merge medio
- 23 h 46 min
- PR fusionados (30 d)
- 217
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cloudflare/cf
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudflare/cf#344 ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/cf#262 ·
Los mantenedores suelen responder en 1 día
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePosiblemente ocupada @jamesopstad la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/cf#223 · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cloudflare/cf#179 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
cloudflare/cf#438 ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudflare/cf
Issues similares
-
area:plugins area:security area:skills bug has repro
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anthropics/claude-code#105911 ·
Los mantenedores suelen responder en 1 día
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Fission-AI/OpenSpec#2165 ·
Los mantenedores suelen responder en 1 día
-
🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Tencent/tdesign-vue-next#7032 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
gnosis/gnosis_vpn#661 ·
Los mantenedores suelen responder en 1 día
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Abiertotriage:bug-verified
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día