Repository navigation
Description
Schema Inaccuracy
The two "create draft item" operations have mismatched request/response example keys, so the docs site renders no "Code samples" section for them. As a result, the HTTP method and path aren't shown anywhere on the page:
projects/create-draft-item-for-org:POST /orgs/{org}/projectsV2/{project_number}/draftsprojects/create-draft-item-for-authenticated-user:POST /user/{user_id}/projectsV2/{project_number}/drafts
In descriptions/api.github.com/api.github.com.2026-03-10.json (same in all api.github.com, ghec and ghes ≥ 3.20 descriptions):
// requestBody.content["application/json"].examples
"examples": {
"title": { "summary": "Example with Sample Draft Issue Title", ... },
"body": { "summary": "Example with Sample Draft Issue Title and Body", ... }
}
// responses["201"].content["application/json"].examples
"examples": {
"draft_issue": { "$ref": "#/components/examples/projects-v2-item-simple" }
}The docs code-sample generator (mergeExamples in github/docs) pairs request and response examples by key when an operation has more than one request example. Here no key matches (title/body vs draft_issue), so the merged list is empty and the whole section is dropped.
For comparison, projects/add-item-for-org uses the same keys on both sides (issue_with_id, pull_request_with_id, …) and renders correctly.
Expected
Request and response example keys should match so that both request examples get a code sample. For example:
"responses": { "201": { "content": { "application/json": { "examples": {
"title": { "$ref": "#/components/examples/projects-v2-item-simple" },
"body": { "$ref": "#/components/examples/projects-v2-item-simple" }
}}}}}Minor, while here: projects-v2-item-simple is shared by the drafts and add-item operations for both orgs and users, and doesn't fully match a real response:
project_urlis user-scoped (/users/octocat/projectsV2/1) even for the org endpointsitem_urlis/projectsV2/items/17, missing the project number (real:/projectsV2/{project_number}/items/{item_id})content.node_iduses an issue prefix (I_…) whilecontent_typeisDraftIssue(real draft issues returnDI_…)user_view_typeis missing incontent.userandcreator
Reproduction Steps
Neither operation has a "Code samples" section or a method/path line:
Activity
resool commentedon Oct 23, 2026
update: "code samples section not visible" no longer true since github/docs@42404db