Skip to content

[Schema Inaccuracy] inconsistent issue schemas in webhooks #6448

@lehmanmj

Description

@lehmanmj

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions