[Schema Inaccuracy] head.label and head.user can be null in pull-request schema
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- github, openapi
- Domain
- api, documentation
Research direction
Start at #/components/schemas/pull-request and inspect the definitions of head.label and head.user, using the reported curl response for pull request 51976 as the failing example. Mark both properties nullable and document the nullability conditions, while preserving the existing handling for head.repo; verify the generated schema reflects these changes.
Written by the indexing model from the issue text.
Description
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 https://github.com/github/rest-api-description/issues/161 and https://github.com/github/rest-api-description/issues/424, would be nice to also add a description to that property explaining the conditions under which it can be null.
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kubernetes-sigs/kueue#15937 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·