[Schema Inaccuracy] webhook-code-scanning-alert-reopened sets alert field as nullable

Open
#4,801 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
openapi, typescript
Domain
api

Research direction

Start by locating the webhook-code-scanning-alert-reopened schema in the referenced ghec.json description and compare its alert field with the other webhook-code-scanning-alert-* schemas. The change is complete when alert is no longer nullable and the resulting schema supports the expected @octokit/openapi-webhooks-types-ghec TypeScript type.

Written by the indexing model from the issue text.

Description

feature

Schema Inaccuracy

The webhook-code-scanning-alert-reopened schema component sets its alert field as "nullable": true. This is likely a schema inaccuracy for the following reasons:

  • The alert is the subject of the webhook - something that doesn't exist cannot be 'reopened'.
  • All other webhook-code-scanning-alert-* webhook event payloads set alert as not-nullable.

Expected

The alert field of the webhook-code-scanning-alert-reopened schema should not be set as "nullable": true

Reproduction Steps

None - observed by reviewing https://raw.githubusercontent.com/github/rest-api-description/refs/heads/main/descriptions/ghec/ghec.json and trying to use @octokit/openapi-webhooks-types-ghec (which depends on the schema data) in TypeScript.

Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
3h 33m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/rest-api-description

All issues in github/rest-api-description

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.