github / rest-api-description

An OpenAPI description for GitHub's REST API
MIT License
1.4k stars 230 forks source link

[Schema Inaccuracy] `head.label` and `head.user` can be null in `pull-request` schema #916

Open xmo-odoo opened 2 years ago

xmo-odoo commented 2 years ago

Schema Inaccuracy

The current schema for #/components/schemas/pull-request defines head.label and head.user as required.

Expected

head.label and head.user should have nullable: true with the nullability conditions documented (from what I understand, if the user's account was deleted for some reason: all the cases I can see are for "ghost" users)

Reproduction Steps

❯ curl -s https://api.github.com/repos/odoo/odoo/pulls/51976 | jq .head
{
  "label": null,
  "ref": "12.0",
  "sha": "3cf7aba2e293417c6e8a6a4785624c8315ccbb7a",
  "user": null,
  "repo": null
}

Side-note

The same issue was fixed for head.repo as reported in #161 and #424, would be nice to also add a description to that property explaining the conditions under which it can be null.

cartalaba commented 2 years ago

NEVER SHARE YOUR OTP especially on social media and SMS or email links. GCash will only need your MPIN or OTP when using the GCash App. Your OTP to link your device is 529883. If this was not you, please ignore. yyAfcYn/qSW.