docs: redirect /pricing and close the remaining agentic-readiness gaps - #434
Open
shirgoldbird wants to merge 1 commit into
Open
docs: redirect /pricing and close the remaining agentic-readiness gaps#434shirgoldbird wants to merge 1 commit into
shirgoldbird wants to merge 1 commit into
Conversation
Adds the /pricing redirect to deepl.com/pricing and works through the Is Agentic audit findings, keeping only the ones this repo can actually change. Two of the previous round's fixes turned out to be dead config. `head` is not a property of Mintlify's docs.json (the schema sets additionalProperties: false), so the Organization JSON-LD it carried never reached the rendered HTML: the live page has no contactPoint and no address anywhere in it. The root .css and .js files it referenced are auto-injected by Mintlify from the repo root, so they are unaffected. Removed `head` and enriched seo.organization instead, which is the only structured-data hook Mintlify exposes. It has no field for contactPoint or address, so that gap now needs Mintlify, not this repo. - New /AGENTS.md, served at /AGENTS.md and /AGENTS, with the when-to-use guidance the audit asked for: which job maps to which endpoint, when to reach for something else, base URLs, auth, the spec URLs, the error contract, and throttling. Also linked from the 404 page and from the markdown instructions - markdown.instructions, which Mintlify prepends to every page served as markdown, gains a "do not use it for" line, the RFC 9727 catalog, and the rate-limit conventions - Documented the response headers the API actually sends on errors: X-Trace-ID on all 22 error response components, Retry-After on the rate-limit response that every 429 and 529 uses, plus a table on the error handling page. Verified against api.deepl.com, which returns X-Trace-ID and a JSON body with a resolution link on a 403 - Surfaced docs/getting-started/auth in the navigation. Every DeepL API auth error links to it, but with seo.indexing "navigable" a page outside the navigation is left out of the sitemap and llms.txt, so agents could not discover the page the error told them to read - Short /openapi, /asyncapi and /agents redirects. The existing /openapi.json and /api/openapi.yaml redirects 404 in production because Mintlify routes any path with a file extension as an asset and never applies redirects to it - Flattened the two redirect chains, so no redirect points at another redirect Tests: scripts/agentic-readiness.test.mjs guards docs.json against unrecognized properties, redirect chains and dead destinations, the AGENTS.md sections and links, and the OpenAPI tool-definition and error-header invariants. The test workflow now runs on docs.json, AGENTS.md and the spec, not just scripts/. Verified: 28 tests pass, docs.json validates against mintlify.com/docs.json except two pre-existing deviations, openapi.json regenerates from the YAML byte-identically, /pricing and /openapi redirect correctly under `mint dev`, the custom CSS and JS are still injected, and `mint broken-links --check-anchors` reports the same 44 findings as main, all in pipeline/drafts or pre-existing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Member
Author
Verified on the preview deployAll four checks pass, and Checked against
Also confirmed: Two corrections to the description:
🤖 Generated with Claude Code |
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.
Adds the
/pricingredirect todeepl.com/pricingand works through the Is Agentic audit findings (81/100), keeping only the ones this repo can actually change.What I found first
Two things changed the shape of this work.
headis not a validdocs.jsonproperty. Every branch ofmintlify.com/docs.jsonsetsadditionalProperties: falseand none listshead, so the whole block, including the rich Organization JSON-LD added in #425, was silently dropped. The live page has zero occurrences ofcontactPoint,address, orfaxNumber. The root.css/.jsfiles it referenced are auto-inlined by Mintlify from the repo root, so nothing depended on it.Several findings are already satisfied, or are not about this site.
Varyon the markdown-negotiated response is nowrsc, Accept, User-Agent, so finding 3 is closed upstream.api.deepl.comdoes return JSON errors: an unauthenticatedPOST /v2/translategives a403with{"message":"Missing Authorization header... You can find more info in our docs: .../auth"}plus anX-Trace-IDheader. The spec already had 62 operations with uniqueoperationIds, summaries, and descriptions, and 4xx/5xx responses on every one.Changes
/pricinghttps://www.deepl.com/pricingAGENTS.md, served at/AGENTS.mdand/AGENTS: job-to-endpoint table, when to use something else, base URLs, auth, spec URLs, error contract, throttling, contact. Linked from the 404 page and frommarkdown.instructionsX-Trace-IDon all 22 error response components in the spec, aRetry-Afterheader component on the response every429and529uses, and a response-headers table on the error handling pageRateLimitheaders because the limit is dynamic, honorRetry-After, throttle from responses. In the spec, on the page, and in the markdown instructionsheadblock.seo.organizationnow uses the#organization@idanchor and adds the WikipediasameAs/openapiand/asyncapiredirects. Extension-less sources work; the existing/openapi.jsonentries cannot (see below)operationIds, all typed, now with documented error headersAlso in scope, found on the way:
docs/getting-started/authis now in the navigation. Every DeepL API auth error links to it, but it sat outside the navigation, soseo.indexing: navigablekept it out of the sitemap andllms.txt. An agent could follow the URL an error handed it but could never discover the page.Tests
scripts/agentic-readiness.test.mjs, 28 tests, zero dependencies. It guardsdocs.jsonagainst unrecognized properties (the bug class above), redirect chains and dead destinations, theAGENTS.mdsections and links, and the OpenAPI tool-definition and error-header invariants. The test workflow now runs ondocs.json,AGENTS.md, and the spec files, not justscripts/.Verification
docs.jsonvalidates againstmintlify.com/docs.json: 3 errors before, 2 after, both pre-existingopenapi.jsonregenerated withyqper CLAUDE.md; YAML and JSON parse equalmint dev:/pricingreturns a 307 to the external URL,/openapireturns a 307,/AGENTSrenders with one H1 and sequential headings, the auth page appears in the sidebar, and the custom CSS/JS injection counts are unchangedmint broken-links --check-anchorsreports 44 findings, identical tomain. All inpipeline/drafts/except 4 pre-existing anchor issuesNeeds a decision or access, not code
<blockquote class="sr-only" data-agent-docs-index>"Documentation Index". The 2.4% ratio is the Next.js shell, roughly 480KB of markup for 7.3KB of text. Neither is reachable from this repo, and padding the quickstart to chase a ratio would make the page worse. Needs a Mintlify request./openapi.json: needs an edge rewrite. Mintlify routes any path with a file extension as an asset and never consults the redirect table, which is why the existing/openapi.jsonand/api/openapi.yamlentries 404. This was already reverted once in e9a5eca. Options are a Cloudflare rewrite in front ofdevelopers.deepl.com, or moving the canonical file, which would break the publicraw.githubusercontent.comURLs. The dead entries are left in place rather than expanding scope here.contactPointandaddress: blocked by Mintlify.seo.organizationallows onlyid,name,legalName,url,logo, andsameAs, and a raw<script type="application/ld+json">in MDX is stripped by the MDX pipeline. The address and contact points now live inAGENTS.mdinstead.api.deepl.com. The docs host serves no API of its own, so no in-repo change makes it return JSON errors.footer.links[0].titleshould beheader. As written, the "Resources" column heading is dropped from the footer. One-word fix, but it changes the visible footer, so it needs a design call./pricingbepermanent: true? Left off to match the other 87 redirects.🤖 Generated with Claude Code