Skip to content

[Schema Inaccuracy] Invalid example for /orgs/{org}/organization-roles/{role_id} response #5054

@rahulsom

Description

@rahulsom

Schema Inaccuracy

This is the JSON ref

#/paths/~1orgs~1{org}~1organization-roles~1{role_id}/patch/responses/200/content/application~1json/examples/default/value

Unrecognized field "hooks_url"

Path "organization-role" -> "organization" -> "hooks_url"

"organization" is

"organization": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/simple-user"
              }
            ]
          }

simple-user does not have hooks_url

The example has this

    9:     "node_id" : "MDEyOk9yZ2FuaXphdGlvbjE=",
   10:     "url" : "https://api.github.com/orgs/github",
   11:     "repos_url" : "https://api.github.com/orgs/github/repos",
   12:     "events_url" : "https://api.github.com/orgs/github/events",
>  13:     "hooks_url" : "https://api.github.com/orgs/github/hooks",
                         ^
   14:     "issues_url" : "https://api.github.com/orgs/github/issues",
   15:     "members_url" : "https://api.github.com/orgs/github/members{/member}",
   16:     "public_members_url" : "https://api.github.com/orgs/github/public_members{/member}",
   17:     "avatar_url" : "https://github.com/images/error/octocat_happy.gif",

I also see it for

#/paths/~1orgs~1{org}~1organization-roles/post/responses/201/content/application~1json/examples/default/value

Reproduction Steps

I found this in

  • ghes-3.14
  • ghes-3.15
  • ghes-3.16
  • ghes-3.17
  • ghec

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