Repository navigation
improvement(api): publish an RFC 9727 API catalog and stop padding tables in docs markdown - #9066
Merged
Merged
Conversation
…d tables in docs markdown
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryThe PR adds a public API catalog and moves compact table output into the docs markdown settings.
Reviews (2) · Last reviewed commit: "fix(docs): turn off table padding in the..." · Reviewed by Greptile |
Contributor
There was a problem hiding this comment.
2 issues found across 4 files
Confidence score: 4/5
- Clients sending
HEADto the API root won’t discover the catalog becauseapps/sim/app/.well-known/api-catalog/route.tsadvertises it only after the catalog is requested. Add therel="api-catalog"link to the API response context. - Clients with an empty User-Agent can retrieve the catalog but get a 403 when following its
statuslink. Exempt/api/healthfrom the empty-User-Agent block inapps/sim/proxy.ts.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/proxy.ts">
<violation number="1" location="apps/sim/proxy.ts:302">
P3: A client that retrieves this catalog with an empty User-Agent cannot follow its `status` link: `/api/health` still matches the empty-UA block and returns 403. Exempt the linked health endpoint as well so the advertised status relation works for these clients.</violation>
</file>
<file name="apps/sim/app/.well-known/api-catalog/route.ts">
<violation number="1" location="apps/sim/app/.well-known/api-catalog/route.ts:38">
P2: This advertises the catalog only after a client already requests `/.well-known/api-catalog`, so a `HEAD` to the API root cannot discover it through `rel="api-catalog"`. Add this link to the API response context (for example, `/api/v2`) so relation-based discovery works.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…rt exact catalog URLs
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/.well-known/api-catalog(RFC 9727): a Linkset (application/linkset+jsonwith the RFC's profile) whose entry anchors the v2 REST API at the deployment's own origin and links its OpenAPI document (service-desc), reference docs (service-doc), and health endpoint (status) with the RFC 8631 relations.Link: rel="api-catalog"makes a HEAD request discoverable too (§2). The dedicated MCP host still serves only MCP paths/api/*, including thestatuslink, never reaches that filter)tablePipeAlign: falsedrops that padding for every processed-markdown consumer (.mdpages,llms-full.txt, Copy page) and replaces the post-processingcompactTablesstring pass. Only serialization changes; rendered pages do not. The config throws if a fumadocs upgrade stops registering remark-gfm, so the setting cannot silently fall offType of Change
Testing
test-mcp-host-e2e.tsagainst a localnext devconfigured like the CIcligroup: 13/13 pass. New checks cover the catalog's GET (empty and tool User-Agents) and HEAD, content type, exactLink/anchor/status/service-descURLs against the configured origin, the status link resolving, and the MCP host rejecting the path. Reverting the proxy exemption, or pointing the anchor at another origin, turns them rednext devvs production:.mdoutput for/integrations/plane,/integrations/file,/integrations/checkr,/cli/tables,/introductionis identical after normalizing table cells (same rows, cells, and alignment; all other lines byte-identical)./cli/reference(content differs from production) compared before/after the config change on the same build: equivalent, 524 KB → 294 KB. HTML pages render the same tables as productionbun run lint,check:source-conventions,check:api-validation:strict,check:comment-hygiene,check:unused-exportsChecklist
test-auditauthoring gate)