-
Notifications
You must be signed in to change notification settings - Fork 269
Closed
Labels
Description
Schema Inaccuracy
In the pull-request-simple
and the pull-request
schemas, the label
property which is an object, has all of it's properties marked as optional.
Expected
The labels
property on the pull-request-simple
and pull-request
schema should have all it's properties set as required.
"pull-request-simple": {
"title": "Pull Request Simple",
"description": "Pull Request Simple",
"type": "object",
"properties": {
...
"labels": {
"type": "array",
"items": {
"type": "object",
+ "required": ["id", "node_id", "url", "name", "description", "color", "default"],
"properties": {
"id": {
"type": "integer"
},
"node_id": {
"type": "string"
},
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"color": {
"type": "string"
},
"default": {
"type": "boolean"
}
}
}
...
"pull-request": {
"type": "object",
"title": "Pull Request",
"description": "Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.",
"properties": {
...
"labels": {
"type": "array",
"items": {
"type": "object",
+ "required": ["id", "node_id", "url", "name", "description", "color", "default"],
"properties": {
"id": {
"type": "integer"
},
"node_id": {
"type": "string"
},
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"color": {
"type": "string"
},
"default": {
"type": "boolean"
}
}
}
Reproduction Steps
This issue isn't reproducible on the API, it only comes up with downstream consumers of the OpenAPI schema, example, when TypeScript types are generated from this schema in @octokit/openapi-types
christophehurpeau, gr2m, devversion and oscard0m