github/rest-api-description repository. The pipeline reads that OpenAPI source and produces Markdown files, data files, and rendered React pages — without requiring manual content authoring for each endpoint.
How the pipeline works
The entry point is the.github/workflows/sync-openapi.yml workflow, which runs on a daily schedule and can also be triggered manually. A single workflow run drives three pipelines simultaneously:
- REST — generates
content/rest/Markdown files andsrc/rest/data/JSON files - Webhooks — generates
src/webhooks/data/JSON files - GitHub Apps — generates
src/github-apps/data/JSON files
github/docs-internal with the label github-openapi-bot. Reviewers know a PR with that label contains automated content changes and can review the diff without expecting hand-written copy.
The SHA of the
github/rest-api-description commit that produced the data is tracked in src/rest/lib/config.json. This gives you a precise audit trail for every generated file.Directory structure
content/rest/ are also auto-generated but are partially editable — see Content team guidance below.
Configuring the pipeline
src/rest/lib/config.json controls how the pipeline behaves. Key fields:
| Field | Purpose |
|---|---|
api-versions | Calendar-date API versions available per docs version |
versionMapping | Maps OpenAPI version names to docs short names |
frontmatterDefaults | Default frontmatter applied to every generated Markdown file |
targetDirectory | The content/ subdirectory where Markdown files are written |
indexOrder | Controls child ordering in the index.md of targetDirectory |
sha | Auto-updated SHA of the rest-api-description commit used for the last sync |
Running the pipeline locally
Clone the OpenAPI description repo
Clone
github/rest-api-description inside your local docs-internal checkout:Set up authentication
Add a classic GitHub token with
repo scope to your .env file and enable SSO for the github org:Triggering the workflow manually
If you need to pick up OpenAPI changes before the next scheduled run, you can manually trigger the workflow:Confirm the OpenAPI change is merged
The OpenAPI change must be merged into the
main branch of github/rest-api-description before you trigger the workflow.Run the workflow
Go to the sync-openapi workflow and click Run workflow. Leave the source branch set to
main.A new pull request with the github-openapi-bot label will be opened in github/docs-internal.Triggering against an unmerged branch
If the OpenAPI change is still in a pull request ongithub/rest-api-description, run the workflow and supply the branch name from that PR. This lets you validate the docs impact before the OpenAPI change merges.
Content team guidance
Writers can make limited edits to files incontent/rest/ without being overwritten:
-
All frontmatter except
versions— You can change the title, intro, children order, and other frontmatter fields. The pipeline will not overwrite them on subsequent runs. -
versionsfrontmatter — The pipeline overwrites this on every run. Do not edit it manually. -
Introduction paragraphs — Add content above the auto-generation boundary comment:
Anything below that comment will be replaced on the next sync.
Escalation paths
Pipeline failure
Pipeline failure
- Check the workflow logs in
.github/workflows/sync-openapi.yml - Verify your token has access to
github/rest-api-description - Look for OpenAPI schema validation errors in the output
- Review the generated diff in
src/rest/data/for unexpected changes - Check
config.jsonfor version mapping issues - If the problem is in the schema itself, escalate to
#api-platformSlack
OpenAPI schema issues
OpenAPI schema issues
Schema problems originate in
github/rest-api-description, owned by the API Platform team. Reach out in #api-platform Slack or open an issue there.General questions
General questions
Ask in the
#docs-engineering Slack channel or open an issue in github/docs-engineering.Known limitations
- Shared pipeline — REST, Webhooks, and GitHub Apps cannot be synced independently. Running
npm run sync-restsyncs all three. - Version frontmatter overwrite — The
versionsfield in generated Markdown is always overwritten. Do not rely on manually set values. - Introduction placement — Writer-authored introductions must appear above the
<!-- Content after this section is automatically generated -->comment. - Calendar-date API versions — When a new calendar-date version is added to the OpenAPI,
api-versionsinconfig.jsonmust be updated manually before the next sync.