[typescript] `endpoint-security` with an AsyncAPI WebSocket channel: the WebSocket client uses `_metadata` it never declares, and the SDK is not written

Aperta
#17,997 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Start with the TypeScript SDK generator path for endpoint-security and WebSocket channel generation; the payload does not name repository files or tests. Reproduce with the linked charter example using fern/generators.yml and api/contract.go, then inspect the generated WebSocket client for the undeclared _metadata reference. Done when generation with endpoint security and the channel produces a TypeScript SDK that compiles.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Generators: fern-typescript-sdk 3.98.0 (also 3.98.4), fern-api CLI 5.140.0

Summary: an OpenAPI spec whose operations each declare their own security (some public, some bearer, some bearer or Access), plus an AsyncAPI spec with one WebSocket channel. With auth: endpoint-security in generators.yml, the generated WebSocket client references _metadata, which it never declares, so the TypeScript compile fails and no SDK is written. Without the channel, the same config generates.

Expected: endpoint security works for an API that also has a WebSocket channel.

Workaround: auth: any restating the schemes, which sends every credential on every request, public reads included.

Repro and context: https://github.com/joeblew999/charter (examples/notes-go: fern/generators.yml, api/contract.go; docs/upstream.md lists the workarounds).

Lingua principale
TypeScript
Stelle
3.8k
Fork
376
Merge medio
9h 15m
PR unite (30g)
171

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fern-api/fern

Tutte le issue di fern-api/fern

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.