[Schema Inaccuracy] inconsistent issue schemas in webhooks

Abierto
#6,448 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
openapi
Área
api

Línea de trabajo

Empieza en descriptions/api.github.com/api.github.com.json y compara los campos de issue en webhook-issues-milestoned, webhook-issues-unlocked, webhook-issues-untyped y webhook-issues-unpinned. Lee el issue relacionado #4622 para obtener contexto y, después, determina si los esquemas referenciados y en línea son intercambiables. Se considera terminado cuando los esquemas de webhook de issue tienen una definición de issue claramente coherente, o diferencias documentadas cuando no sean intercambiables.

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

Descripción

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?

Lenguaje dominante
Sin datos de lenguaje
Estrellas
1.6k
Forks
342
Merge medio
3 h 33 min
PR fusionados (30 d)
51

Guía de contribución

Abrir la guía de contribución

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

Todos los issues de github/rest-api-description

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.