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] webhook-workflow-run-* components define pull request numbers and ids as 'number' instead of 'integer' #4408

Open
mjpieters opened this issue Jan 6, 2025 · 0 comments
Labels

Comments

@mjpieters
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants