Skip to content

feat(docs): publish the API description where machines look for it - #12595

Open
jd wants to merge 1 commit into
devs/jd/agentic-readiness/stop-docset-grids-skipping-heading-level--e01f4c2bfrom
devs/jd/agentic-readiness/publish-api-desc-machines-look--1b625f96
Open

feat(docs): publish the API description where machines look for it#12595
jd wants to merge 1 commit into
devs/jd/agentic-readiness/stop-docset-grids-skipping-heading-level--e01f4c2bfrom
devs/jd/agentic-readiness/publish-api-desc-machines-look--1b625f96

Conversation

@jd

@jd jd commented Aug 28, 2026

Copy link
Copy Markdown
Member

The Mergify OpenAPI 3.1 document is already deployed — it is what the API
Reference pages are generated from — but only at /api-schemas.json, a
filename that exists nowhere outside this repository. Every OpenAPI client,
SDK generator and crawler probes /openapi.json, so nothing finds it and the
docs read as a site with no API at all.

Serve the same bytes at /openapi.json. The route does not transform the
document: the spec is synced from the engine repository, and two spellings of
it that could disagree would be worse than one obscure path.

Alongside it, three other entry points that were undiscoverable:

  • <link rel="service-desc"> in every page head, the IANA relation for "the
    description of this site's API" (RFC 8631), plus one for llms.txt.
  • robots.txt had no Sitemap: line, so crawlers had to guess
    sitemap-index.xml rather than be told.
  • /developers is the path people and tools guess for a developer portal and
    was a 404; it now redirects to the API reference.

Depends-On: #12594

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 28, 2026 13:26 Failure
@jd

jd commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(seo): restore the homepage OpenGraph image #12593
2 fix(a11y): stop docset grids skipping a heading level #12594
3 feat(docs): publish the API description where machines look for it #12595 👈
4 feat(docs): serve Markdown to clients that ask for it #12596
5 feat(docs): tell agents what Mergify is for in llms.txt #12597
6 feat(seo): describe the site with schema.org JSON-LD #12598
7 feat(docs): point a lost agent somewhere useful from the 404 #12599

@mergify

mergify Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 3 of 7 protections blocking · waiting on 👀 reviews and ⛓️ dependency

Protection Waiting on
🔴 ⛓️ Depends-On Requirements ⛓️ dependency
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 ⛓️ Depends-On Requirements

Waiting for

This rule is failing.

Requirement based on the presence of Depends-On in the body of the pull request

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = renovate[bot]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

Show 4 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team August 28, 2026 13:28
@jd
jd marked this pull request as ready for review August 28, 2026 14:07
Copilot AI lite review requested due to automatic review settings August 28, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves machine discoverability of the Mergify OpenAPI spec and related developer-entry signals by exposing conventional URLs and metadata that tooling and crawlers expect.

Changes:

  • Adds an /openapi.json endpoint that serves the existing public/api-schemas.json OpenAPI document.
  • Adds <link rel="service-desc"> (OpenAPI) and an alternate link for llms.txt to the global page head.
  • Updates robots.txt to include a Sitemap: directive and adds /developers redirects to the API reference.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/pages/openapi.json.ts New endpoint serving the OpenAPI document at the conventional discovery path.
src/components/HeadCommon.astro Adds machine-readable <link> entry points for OpenAPI discovery and llms.txt.
public/robots.txt Adds an explicit sitemap directive for crawlers.
public/_redirects Redirects /developers to the API reference.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/pages/openapi.json.ts Outdated
@jd
jd force-pushed the devs/jd/agentic-readiness/publish-api-desc-machines-look--1b625f96 branch from d8b4503 to c8af4a6 Compare August 28, 2026 14:37
@jd

jd commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial d8b4503 2026-08-28 14:37 UTC
2 content d8b4503 → c8af4a6 Serve the spec as a Buffer per review on #12595, so 'same bytes' is literal 2026-08-28 14:37 UTC
3 rebase c8af4a6 → eb8bd0c (rebase only) 2026-08-28 15:09 UTC

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 28, 2026 14:37 Failure
The Mergify OpenAPI 3.1 document is already deployed — it is what the API
Reference pages are generated from — but only at `/api-schemas.json`, a
filename that exists nowhere outside this repository. Every OpenAPI client,
SDK generator and crawler probes `/openapi.json`, so nothing finds it and the
docs read as a site with no API at all.

Serve the same bytes at `/openapi.json`. The route does not transform the
document: the spec is synced from the engine repository, and two spellings of
it that could disagree would be worse than one obscure path.

Alongside it, three other entry points that were undiscoverable:

- `<link rel="service-desc">` in every page head, the IANA relation for "the
  description of this site's API" (RFC 8631), plus one for `llms.txt`.
- `robots.txt` had no `Sitemap:` line, so crawlers had to guess
  `sitemap-index.xml` rather than be told.
- `/developers` is the path people and tools guess for a developer portal and
  was a 404; it now redirects to the API reference.

Change-Id: I1b625f960363c8427d5282c052fee74111bf07fa
@jd
jd force-pushed the devs/jd/agentic-readiness/publish-api-desc-machines-look--1b625f96 branch from c8af4a6 to eb8bd0c Compare August 28, 2026 15:09
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 28, 2026 15:09 Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants