Skip to content

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

Open
@ojab

Description

@ojab

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions