queues subscriptions create: schema types 'events' as string but API requires an array of strings
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 960
- Fork
- 62
- Merge medio
- 23h 46m
- PR unite (30g)
- 217
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cf
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cf#344 ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#262 ·
I maintainer di solito rispondono entro 1 giorno
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templateForse già presa @jamesopstad l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#223 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#179 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cloudflare/cf#438 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/cf
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
area:plugins area:security area:skills bug has repro
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
anthropics/claude-code#105911 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
dev-five-git/devup-ui#879 ·
I maintainer di solito rispondono entro 11 giorni
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Fission-AI/OpenSpec#2165 ·
I maintainer di solito rispondono entro 1 giorno
-
🐞 bug 🧐 unconfirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Tencent/tdesign-vue-next#7032 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno