Skip to content

Endpoints['GET /repos/{owner}/{repo}/git/trees/{tree_sha}'] response is too relaxed #285

Open
@ojab

Description

@ojab

What happened?

It returns components["schemas"]["git-tree"] which has tree field defined as

tree: {
  path?: string;
  mode?: string;
  type?: string;
  sha?: string;
  size?: number;
  url?: string;
}[];

while operations["git/create-tree"] has request params defined as

tree: {
  path?: string;
  mode?: "100644" | "100755" | "040000" | "160000" | "120000";
  type?: "blob" | "tree" | "commit";
  sha?: string | null;
  content?: string;
}[];

so response type is not compatible with request one.

What did you expect to happen?

mode & type should be compatible.

What the problem might be

mode & type on components["schemas"]["git-tree"] should be more strict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: BlockedBlocked by GitHub's API or other external factorsType: BugSomething isn't working as documented, or is being fixedtypescriptRelevant to TypeScript users only

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions