Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Schema Inaccuracy] git-tree request has enums for mode & type while response has plain strings #229

Open
ojab opened this issue Mar 9, 2021 · 0 comments

Comments

@ojab
Copy link

ojab commented Mar 9, 2021

Schema Inaccuracy

#/components/schemas/git-tree, which is git-tree response, says

        tree:
          description: Objects specifying a tree structure
          type: array
            type: object
            properties:
              mode:
                type: string
                example: '040000'
              type:
                type: string
                example: tree 

while "POST /repos/{owner}/{repo}/git/trees" has enums defined for request:

                  items:
                    type: object
                    properties:
                      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.
                        enum:
                        - '100644'
                        - '100755'
                        - '040000'
                        - '160000'
                        - '120000'
                      type:
                        type: string
                        description: Either `blob`, `tree`, or `commit`.
                        enum:
                        - blob
                        - tree
                        - commit

Expected

Request and response schemas are consistent, so response should also have enums defined.

@ojab ojab added the inaccuracy label Mar 9, 2021
@ojab ojab changed the title [Schema Inaccuracy] <Describe Problem> [Schema Inaccuracy] git-tree request has enums for mode & type while response has plain strings Mar 9, 2021
@nickfloyd nickfloyd added the P4 label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants