-
Notifications
You must be signed in to change notification settings - Fork 222
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 field definitions are missing "type" #3432
Comments
@ksitze is this limited to just |
It is for all schemas including the REST schemas. I’m only finding problems mostly under the Webhooks section as per the attached file. It also appears that some of these may have been deliberately left unspecified for OpenAPI to allow for any type. Nevertheless, it is clear that many are simply wrong. Date members listed are, for example, specified as nullable but have no type or format values, despite seeing other members with the same or similar name having explicit types and formats. The paths in the attachment are as complete as I could make them. I wrote a program to crawl the entire OpenAPI schema set looking for problems, which is what generated the file I attached here. I’m assuming that every type-less definition is an oversight as the other schema definitions are quite clean; not having seen anything generated for 99% of the REST API schemas. I have ideas about why this might be but as there are still one or two non-webhook issues I can only make guesses as to the disparity. |
Schema Inaccuracy
As part of digging through the Webhooks schemas I'm finding several dozen errors where schema types are missing.
Here are a few examples:
Expected
The attached
jq.paths.log
file contains all entities detected to be missing atype
field. The paths are all relative to the.components.schema
definitions in the 11MB OpenAPI fileapi.github.com.json
as found in the GitHub repository github/rest-api-description.Reproduction Steps
Download the attached file:
jq.paths.log
Download GitHub's JSON formatted OpenAPI definition file.
Extract out the schema section:
The relevant JSON paths in
jq.paths.log
can be explored.Each of the indicated JSON paths reference a schema element missing a
type
declaration. Most are likely"type": "string"
(with a correspondingformat
(e.g.,date-time
)) but it is not obvious in certain cases what the correct values are.The text was updated successfully, but these errors were encountered: