[Schema Inaccuracy] `git-tree` schema has no required properties
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- github, openapi
- Ambito
- api
Direzione di ricerca
Inizia individuando lo schema git-tree nella descrizione dell'API REST e ispeziona la sua proprietà tree e il relativo esempio. Confrontali con i campi obbligatori e i contenuti dell'esempio previsti dall'issue, quindi verifica che lo schema risultante produca i tipi downstream previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 1.6k
- Fork
- 342
- Merge medio
- 2h 23m
- PR unite (30g)
- 57
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/rest-api-description
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
github/rest-api-description#7220 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
github/rest-api-description#7201 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Apertafeature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/rest-api-description#7162 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/rest-api-description#7135 ·
Tutte le issue di github/rest-api-description
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
googleapis/google-cloud-swift#1151 ·
-
SqliteSaver.list(filter=...) silently misses nested metadata values containing non-ASCII text Apertaexternal
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
langchain-ai/langgraph#9074 · 1 commento ·
-
documentation specification
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
openai/openai-openapi#584 ·