Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Create a Tree: parameter type "array of objects " should be "object[]" #60

Closed
gr2m opened this issue Mar 27, 2018 · 0 comments · Fixed by #86
Closed

Create a Tree: parameter type "array of objects " should be "object[]" #60

gr2m opened this issue Mar 27, 2018 · 0 comments · Fixed by #86
Labels
bug Something isn't working as documented, or is being fixed help wanted Contributions appreciated

Comments

@gr2m
Copy link
Contributor

gr2m commented Mar 27, 2018

Current specification

{
"name": "Create a Tree",
"enabledForApps": true,
"method": "POST",
"path": "/repos/:owner/:repo/git/trees",
"params": [
{
"name": "owner",
"type": "string",
"required": true,
"description": ""
},
{
"name": "repo",
"type": "string",
"required": true,
"description": ""
},
{
"name": "tree",
"type": "array of objects",
"description": "Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure",
"required": true
},
{
"name": "tree.path",
"type": "string",
"description": "The file referenced in the tree",
"required": false
},
{
"name": "tree.mode",
"type": "string",
"description": "The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink",
"required": false
},
{
"name": "tree.type",
"type": "enum",
"options": [
"blob",
"tree",
"commit"
],
"description": "Either `blob`, `tree`, or `commit`",
"required": false
},
{
"name": "tree.sha",
"type": "string",
"description": "The SHA1 checksum ID of the object in the tree",
"required": false
},
{
"name": "tree.content",
"type": "string",
"description": "The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`.",
"required": false
},
{
"name": "base_tree",
"type": "string",
"description": "The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted.",
"required": false
}
],
"description": "The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out.",
"documentationUrl": "https://developer.github.com/v3/git/trees/#create-a-tree"
}

I expected

"array of objects " should be "object[]"
{
  "name": "Create a Tree",
  "enabledForApps": true,
  "method": "POST",
  "path": "/repos/:owner/:repo/git/trees",
  "params": [
    {
      "name": "owner",
      "type": "string",
      "required": true,
      "description": ""
    },
    {
      "name": "repo",
      "type": "string",
      "required": true,
      "description": ""
    },
    {
      "name": "tree",
      "type": "object[]",
      "description": "Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure",
      "required": true
    },
    {
      "name": "tree.path",
      "type": "string",
      "description": "The file referenced in the tree",
      "required": false
    },
    {
      "name": "tree.mode",
      "type": "string",
      "description": "The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink",
      "required": false
    },
    {
      "name": "tree.type",
      "type": "enum",
      "options": [
        "blob",
        "tree",
        "commit"
      ],
      "description": "Either `blob`, `tree`, or `commit`",
      "required": false
    },
    {
      "name": "tree.sha",
      "type": "string",
      "description": "The SHA1 checksum ID of the object in the tree",
      "required": false
    },
    {
      "name": "tree.content",
      "type": "string",
      "description": "The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`.",
      "required": false
    },
    {
      "name": "base_tree",
      "type": "string",
      "description": "The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted.",
      "required": false
    }
  ],
  "description": "The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out.",
  "documentationUrl": "https://developer.github.com/v3/git/trees/#create-a-tree"
}

Has failing test at #69

@gr2m gr2m added the bug Something isn't working as documented, or is being fixed label Mar 27, 2018
@gr2m gr2m mentioned this issue Mar 27, 2018
@gr2m gr2m self-assigned this Mar 27, 2018
@gr2m gr2m removed their assignment Mar 27, 2018
@gr2m gr2m added has-failing-test good first issue Good for contributors new to Octokit help wanted Contributions appreciated and removed good first issue Good for contributors new to Octokit labels Mar 27, 2018
@gr2m gr2m changed the title Create a Tree: parameter type "array of objects " should be "objects[]" Create a Tree: parameter type "array of objects " should be "object[]" Mar 30, 2018
@gr2m gr2m closed this as completed in #86 Apr 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working as documented, or is being fixed help wanted Contributions appreciated
Projects
None yet
1 participant