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] GET /repos/{owner}/{repo}/teams response includes "permissions" key #289

Closed
gr2m opened this issue Apr 28, 2021 · 1 comment

Comments

@gr2m
Copy link
Collaborator

gr2m commented Apr 28, 2021

Schema Inaccuracy

The current schema is referencing "#/components/schemas/team", I'm not sure if the same problem is true in all cases where the schema is referenced. But I just checked and I definitely see a "permissions" key in the response array to GET /repos/{owner}/{repo}/teams

  "/repos/{owner}/{repo}/teams":
    get:
      summary: List repository teams
      description: ''
      tags:
      - repos
      operationId: repos/list-teams
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/rest/reference/repos/#list-repository-teams
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/team"
              examples:
                default:
                  "$ref": "#/components/examples/team-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"

Expected

"#/components/schemas/team" should include permissions key with the following boolean properties: admin, maintain, write, triage, read

Reproduction Steps

$ curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/github/github/teams
@xuorig
Copy link

xuorig commented Aug 5, 2021

Yeah it looks like this endpoint actually returns a hash and not an array? We'll fix this!

@dinonuggies1 dinonuggies1 added the P2 label Aug 9, 2021
@bruce bruce removed the triaged label Aug 12, 2021
@becco becco closed this as completed Oct 28, 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

5 participants