[Schema Inaccuracy] git-tree
schema has no required properties
#3833
Labels
git-tree
schema has no required properties
#3833
Schema Inaccuracy
The
tree
property in thegit-tree
schema has no required fields. I believe this is inaccurate.Additionally, the
example
field of thetree
property appears to have incorrect data, as it includes aproperties
field and arequired
field. I'm guessing these were mistakenly copy/pasted at some point. My guess is that therequired
field from the example was intended to be in thetree
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
path
,mode
,type
, andsha
fields should be required on thegit-tree
schema. (size
appears to be absent on directories and submodules, andurl
appears to be absent on submodules)properties
andrequired
fields should be removed from thegit-tree
schema's example.Also, if you're feeling generous, you can update the types of
type
andmode
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
andsha
properties.The text was updated successfully, but these errors were encountered: