Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmo-odoo opened this issue Apr 4, 2024 · 2 comments

Comments

@xmo-odoo
Copy link

xmo-odoo commented Apr 4, 2024

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
Copy link
Member

hasan-dot commented Apr 19, 2024

👋 @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
Copy link
Author

xmo-odoo commented Apr 22, 2024

@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"
  ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants