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] incorrect requestBody schema for branch protection endpoints #88

Closed
gr2m opened this issue Nov 10, 2020 · 1 comment
Assignees

Comments

@gr2m
Copy link
Collaborator

gr2m commented Nov 10, 2020

Schema Inaccuracy

These endpoints now accept a namespaced array in the request body, as documented:

but the schema for these endpoints is currently defined as

        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "description": "contexts parameter",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },

Expected

the schema should instead be an object with a single property, e.g.

        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contexts": {
                    "type": "array",
                    "description": "...",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "labels": [
                  "ci-test",
                  "linter"
                ]
              }
            }
          }
        },

Reproduction Steps

See curl examples in the docs linked above

@gr2m gr2m changed the title [Schema Inaccuracy] <Describe Problem> [Schema Inaccuracy] incorret requestBody schema for branch protection endpoints Nov 11, 2020
@xuorig xuorig self-assigned this Nov 20, 2020
@gwestersf gwestersf changed the title [Schema Inaccuracy] incorret requestBody schema for branch protection endpoints [Schema Inaccuracy] incorrect requestBody schema for branch protection endpoints Nov 23, 2020
@imwiss
Copy link
Contributor

imwiss commented Nov 24, 2020

Thanks for reporting this @gr2m.

@xuorig resolved this in #99.

@imwiss imwiss closed this as completed Nov 24, 2020
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

3 participants