[Schema Inaccuracy] inconsistent issue schemas in webhooks

Aperta
#6,448 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
openapi
Ambito
api

Direzione di ricerca

Inizia in descriptions/api.github.com/api.github.com.json e confronta i campi delle issue in webhook-issues-milestoned, webhook-issues-unlocked, webhook-issues-untyped e webhook-issues-unpinned. Leggi la issue correlata #4622 per il contesto, quindi determina se gli schemi referenziati e inline sono intercambiabili. Il lavoro è completato quando gli schemi dei webhook delle issue hanno una definizione dell’issue chiaramente coerente, oppure presentano differenze documentate quando non sono intercambiabili.

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

Descrizione

feature

Schema Inaccuracy

In the webhooks schema for issues, there are several different definitions for issue objects; #/components/schemas/webhooks_issue and #/components/schemas/webhooks_issue_2 are used on several webhook types related to issues. Furthermore, most of the issue webhooks define the issue object inline.

(I think that issue #4622 describes a similar problem.)

Expected

Why are there different types for an issue object? It's hard to tell from exploring the raw json of the types whether the issue object attached to each type of issue webhook is the same, or if there are important differences in the fields included. I'm writing code that processes webhooks, and if all issue webhooks had one consistent type for issues, the processing logic would be much simpler.

(Also, this problem is not limited to issues. Pull requests seem to also be inconsistently defined.)

Reproduction Steps

In the descriptions/api.github.com/api.github.com.json file, compare the following types:

  • webhook-issues-milestoned
    • contains an issue defined inline
  • webhook-issues-unlocked
    • contains an issue defined inline
  • webhook-issues-untyped
    • contains an issue of type #/components/schemas/webhooks_issue
  • webhook-issues-unpinned
    • contains an issue of type #/components/schemas/webhooks_issue_2

Are these types interchangeable? Again, it's very hard to tell, as these are huge json blobs. Are the inline definitions of issues (in the milestoned and unlocked webhooks) the same?

Lingua principale
Nessun dato sulla lingua
Stelle
1.6k
Fork
342
Merge medio
3h 33m
PR unite (30g)
51

Guida per i contributori

Apri la guida per i contributori

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 github/rest-api-description

Tutte le issue di github/rest-api-description

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.