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?
Schema Inaccuracy
In the webhooks schema for issues, there are several different definitions for issue objects;
#/components/schemas/webhooks_issueand#/components/schemas/webhooks_issue_2are 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.jsonfile, compare the following types:webhook-issues-milestonedissuedefined inlinewebhook-issues-unlockedissuedefined inlinewebhook-issues-untypedissueof type#/components/schemas/webhooks_issuewebhook-issues-unpinnedissueof type#/components/schemas/webhooks_issue_2Are these types interchangeable? Again, it's very hard to tell, as these are huge json blobs. Are the inline definitions of issues (in the
milestonedandunlockedwebhooks) the same?