[codex] publish api catalog and discovery links#135
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an RFC 9727-compatible API catalog and discovery link headers so automated tooling can discover the Quran Foundation’s published API surfaces and related documentation starting from the site homepage and /.well-known/api-catalog.
Changes:
- Added homepage
Linkheaders advertising the API catalog and additional tutorial/guide discovery links. - Introduced
static/.well-known/api-catalogas anapplication/linkset+jsonlinkset describing API anchors, specs, docs, and health endpoints. - Added explicit headers for
/.well-known/api-catalogto ensure correctContent-Type(with profile) on Cloudflare Pages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| static/_headers | Adds homepage discovery Link headers and sets correct Content-Type/caching for /.well-known/api-catalog. |
| static/.well-known/api-catalog | Adds the RFC 9727 JSON linkset covering production and pre-production API anchors plus related docs/tutorial links. |
Comments suppressed due to low confidence (1)
static/_headers:23
- The homepage
Linkheaders advertise the OpenAPI specs withtype="application/json", but the new API catalog declares those sameservice-desctargets asapplication/vnd.oai.openapi+json;version=3.0. For consistency (and for discovery clients that filter bytype), consider updating the homepageservice-desctypeparameters to match the OpenAPI media type used in/.well-known/api-catalog.
Link: </.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json"
Link: </openAPI/content/v4.json>; rel="service-desc"; type="application/json"
Link: </openAPI/oauth2-apis/v1.json>; rel="service-desc"; type="application/json"
Link: </openAPI/search/v1.json>; rel="service-desc"; type="application/json"
Link: </openAPI/user-related-apis/v1.json>; rel="service-desc"; type="application/json"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying qf-api-docs with
|
| Latest commit: |
04bc652
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://93a78ce8.qf-api-docs.pages.dev |
| Branch Preview URL: | https://codex-api-catalog-discovery.qf-api-docs.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae783f772a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What changed
/.well-known/api-catalogas an RFC 9727application/linkset+jsonAPI catalogservice-doclinks for both quick start guides, the request access page, and the published tutorial pagesapi-cataloglink relation to the homepage response headers/.well-known/api-catalogso Cloudflare Pages serves it with the correct media type and profileWhy
The site was missing the well-known API catalog used for automated API discovery. That prevented RFC 9727 discovery checks from finding the published APIs and their related documentation.
Impact
/.well-known/api-catalogLinkheadersValidation
python -m json.tool static/.well-known/api-catalog.docusaurus/globalData.jsonare present in the homepageLinkheaders