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

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

Open
ojab opened this issue Mar 8, 2021 · 3 comments
Labels
Status: Blocked Blocked by GitHub's API or other external factors Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only
Projects

Comments

@ojab
Copy link

ojab commented Mar 8, 2021

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.

@ojab ojab added the Type: Bug Something isn't working as documented, or is being fixed label Mar 8, 2021
@ghost ghost added this to Bugs in JS Mar 8, 2021
@ojab ojab changed the title Endpoints['GET /repos/{owner}/{repo}/git/trees/{tree_sha}'] response mode is too relaxed Endpoints['GET /repos/{owner}/{repo}/git/trees/{tree_sha}'] response mode/type is too relaxed Mar 8, 2021
@ojab ojab changed the title Endpoints['GET /repos/{owner}/{repo}/git/trees/{tree_sha}'] response mode/type is too relaxed Endpoints['GET /repos/{owner}/{repo}/git/trees/{tree_sha}'] response is too relaxed Mar 8, 2021
@gr2m
Copy link
Contributor

gr2m commented Mar 8, 2021

As in #284, may I ask you to do me a favor and report this issue in https://github.com/github/rest-api-description, similar to e.g. github/rest-api-description#228? I can do it myself eventually but I have other priorities right now. If you could report it we would get it fixed faster

@ghost ghost moved this from Bugs to Awaiting response in JS Mar 8, 2021
@ojab
Copy link
Author

ojab commented Mar 9, 2021

github/rest-api-description#229

@ghost ghost moved this from Awaiting response to Bugs in JS Mar 9, 2021
@gr2m gr2m added typescript Relevant to TypeScript users only Status: Blocked Blocked by GitHub's API or other external factors labels Apr 22, 2021
@ghost ghost moved this from Bugs to Blocked (by GitHub APIs) in JS Apr 22, 2021
@gr2m
Copy link
Contributor

gr2m commented Apr 22, 2021

Thanks @ojab. Please let us know once the problem was resolved at github/rest-api-description#229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Blocked Blocked by GitHub's API or other external factors Type: Bug Something isn't working as documented, or is being fixed typescript Relevant to TypeScript users only
Projects
No open projects
JS
  
Blocked
Development

No branches or pull requests

2 participants