[Schema Inaccuracy] `git-tree` schema has no required properties
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- github, openapi
- Domain
- api
Research direction
Start by locating the git-tree schema in the REST API description and inspect its tree property and example. Compare them with the issue's expected required fields and example contents, then verify that the resulting schema produces the intended downstream types.
Written by the indexing model from the issue text.
Description
Schema Inaccuracy
The tree property in the git-tree schema has no required fields. I believe this is inaccurate.
Additionally, the example field of the tree property appears to have incorrect data, as it includes a properties field and a required field. I'm guessing these were mistakenly copy/pasted at some point. My guess is that the required field from the example was intended to be in the tree property, making those fields required.
This matters to me because the downstream @octokit/openapi-types package that is generated from this definition lists every property as optional, forcing me to check for the existence of every single property on every single node.
Expected
- The
path,mode,type, andshafields should be required on thegit-treeschema. (sizeappears to be absent on directories and submodules, andurlappears to be absent on submodules) - The
propertiesandrequiredfields should be removed from thegit-treeschema's example.
Also, if you're feeling generous, you can update the types of type and mode to be enums, as laid out in #229 - it's the same exact schema!
Reproduction Steps
It's tough to prove that these properties will always be present, but I created this repo with every possible node type/mode combination, at least according to these docs. If you curl the tree for this repo, you'll see that every tree node has the path, mode, type and sha properties.
curl https://api.github.com/repos/rpmccarter/every-node-type/git/trees/main
- 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 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#165 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100