[Schema Inaccuracy] webhook-workflow-run-* components define pull request numbers and ids as 'number' instead of 'integer'

Open Beginner friendly
#4,408 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
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
openapi
Domain
api

Research direction

Inspect api.github.com.2022-11-28.json at the three webhook-workflow-run component paths identified in the issue, focusing on pull_requests.items.properties.id and number. Change those definitions to integer and review the other number-typed id definitions noted in the issue; done means the affected schema entries match the expected integer types.

Written by the indexing model from the issue text.

Description

feature

Schema Inaccuracy

The workflow_run webhook schemas define pull request numbers and ids as floating point numbers instead of integers.

This applies to:

  • #/components/schemas/webhook-workflow-run-completed
  • #/components/schemas/webhook-workflow-run-in-progress
  • #/components/schemas/webhook-workflow-run-requested

where the path $.properties.workflow_run.properties.pull_requests.items.properties.id and $.properties.workflow_run.properties.pull_requests.items.properties.number are both defined as "type": "number".

Expected

Pull request numbers are always integers, and in practice, the workflow_run event data for workflow_run.pull_requests[].number and workflow_run.pull_requests[].id is always an integer. The schema is wrong here. Please correct their type to "integer".

In all of the type definitions in api.github.com.2022-11-28.json, the above locations are the only 3 definitions for the "number" property to use "type": "number". There are a total of 8 "id" definitions that type these as "type": "number", meaning that there are up to 5 additional locations which are probably wrong too.

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.