github / rest-api-description

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

[Schema Inaccuracy] issue/pr response fields marked as required nullable unnecessarily (?) #3501

Open xmo-odoo opened 5 months ago

xmo-odoo commented 5 months ago

Schema Inaccuracy

The assignees (issue and PR) and requested_reviewers and requested_teams (PRs) are required nullable arrays.

Experimentally it doesn't look like these are ever null in responses, nor is there any reason for them to be as an empty array should play that role just fine.

hasan-dot commented 5 months ago

👋 @xmo-odoo from github/issues:

I couldn't find anywhere in the docs that those fields are nullable. According to the GitHub API documentation, these fields are indeed arrays, but they are not documented as nullable. Can you please point to the problematic doc where it mentions its a nullable field?

xmo-odoo commented 5 months ago

@hasan-dot here is the schema for assignees in Issues:

"assignees": {
  "type": [
    "array",
    "null"
  ],

The Pull Requests are identical, and the requested_* fields are similar:

"requested_reviewers": {
  "type": [
    "array",
    "null"
  ],
[...]
"requested_teams": {
  "type": [
    "array",
    "null"
  ],