feat(docs): publish the API description where machines look for it - #12595
Conversation
|
This pull request is part of a Mergify stack:
|
Merge Protections🔴 3 of 7 protections blocking · waiting on 👀 reviews and ⛓️ dependency
🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
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.jsonendpoint that serves the existingpublic/api-schemas.jsonOpenAPI document. - Adds
<link rel="service-desc">(OpenAPI) and an alternate link forllms.txtto the global page head. - Updates
robots.txtto include aSitemap:directive and adds/developersredirects 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.
d8b4503 to
c8af4a6
Compare
Revision history
|
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
c8af4a6 to
eb8bd0c
Compare
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, afilename that exists nowhere outside this repository. Every OpenAPI client,
SDK generator and crawler probes
/openapi.json, so nothing finds it and thedocs read as a site with no API at all.
Serve the same bytes at
/openapi.json. The route does not transform thedocument: 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 "thedescription of this site's API" (RFC 8631), plus one for
llms.txt.robots.txthad noSitemap:line, so crawlers had to guesssitemap-index.xmlrather than be told./developersis the path people and tools guess for a developer portal andwas a 404; it now redirects to the API reference.
Depends-On: #12594