Skip to content

rapidoc@15.0.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 08:09
· 1 commit to master since this release
575709c

Major Changes

  • aa3c878: The sidebar has a new look with three levels: upper-case section labels (Overview, tag groups, Components, or the tags themselves when there are no tag groups), rows with icons for the API title, servers and authentication, and compact operation rows under a guide line with the method first. The current item is a filled block. A tag's name opens a closed tag as well as going to its section. nav-item-spacing is removed (set --sidebar-item-padding instead), tag groups no longer collapse, and show-method-in-nav-bar now defaults to as-colored-text. See the v14 to v15 migration guide. RapiDoc Portal's docs sidebar takes the same three levels: a tab's top-level groups are section labels, their items rows with icons, deeper items compact rows under a guide line.

Patch Changes

  • aa3c878: rapidoc/flow (<rapi-flow>) is 41 KB smaller (283 KB to 242 KB minified, 89 KB to 76 KB gzipped): Arazzo documents are now read with js-yaml, half the size of yaml. Values are read the same way (YAML 1.2, merge keys, no dates); a tag the reader does not know keeps its plain value, and stray control characters are dropped. @rapidoc/mcp depends on js-yaml in place of yaml, and @rapidoc/prerender on both. OpenAPI specs are read as before. In rapidoc-min.js, the syntax highlighter no longer carries grammars for Astro, Svelte, Vue, Objective-C, Perl, R and TOML. The first three are drawn as HTML and Objective-C as C; Perl, R and TOML code shows as plain text.

  • aa3c878: MCP servers read their settings from MCP_ variables only, the same in an exported server, rapidoc mcp serve and the /mcp endpoint of rapidoc serve: a security scheme's credential is MCP_AUTH_<SCHEME> (MCP_AUTH_<SCHEME>_USERNAME and MCP_AUTH_<SCHEME>_PASSWORD for HTTP Basic), the base URL is MCP_BASE_URL (MCP_BASE_URL_<SOURCE> each when a server has several APIs) and the host allow-list is MCP_EXTERNAL_HOSTS. The old names (<SCHEME>, API_KEY, API_BASE_URL, EXTERNAL_HOSTS) are no longer read, so a scheme called token or path can no longer send $TOKEN or $PATH to an API, and two schemes that would share a variable stop the export with a message. Tool names are now always valid and stable: at most 64 characters, never empty for a non-Latin operationId, and a name two operations share ends in a short hash of the operation instead of _2, so reordering the spec renames nothing. Every operation is a tool with all its parameters; a GET becomes an MCP resource as well only with x-mcp-resource: true, no longer because of its path. Swagger 2.0 specs get HTTP Basic for type: basic and a form body for formData parameters. A spec with a relative server URL or none is resolved against the address it was loaded from; read from a file, the manifest has no base URL, rapidoc mcp export and rapidoc mcp serve say that one is required, and a tool call without one fails with that message instead of calling http://localhost. The runtime refuses a manifest version it does not know, <rapi-doc>'s mcp attribute shows the export button for true only, and @rapidoc/mcp no longer exports parseMcpEnabled.

  • f0c81ab: The navigation bar's filter area has its frosted-glass background again in Chrome and Edge: the minified bundle had kept only the -webkit- prefixed backdrop-filter. In the navigation bar, colored method badges have 2px corners and operation names are 1px smaller. The amber theme's light scheme has a deeper copper accent, #ab6534, with white text on it (was #ff791a with black text).

  • aa3c878: <rapi-doc> 15 clean-up. Removed: the scrollTo(elementId) method (use scrollToPath; scrollTo is the browser's own method again), mock-server-status-strategy (write the strategy in front of the codes: mock-server-status-code="random:200, 500"), theme="light" and theme="dark" (use color-scheme), default-schema-tab="model" (use schema), mcp="none" (use false), the hidden "Operations" sidebar row with its part section-navbar-operations-top, and loading, focusedElementId, searchVal and advancedSearchMatches as attributes. nav-active-change has one detail from every source, { elementId, type, operationId? }: id is gone, type is operation, tag or section, and operationId is the spec's own operationId. persist-auth saves keys per API (by spec URL, else title), so two APIs on one site no longer share a token; keys saved by v14 are not carried over, and saved keys are applied once per spec load, so a key set with setApiKey on spec-loaded stays. Relative server URLs (api/v1, ../v2, /v1) resolve against the spec's address. Fixed: the mock stays on after the element is moved in the page; OAuth with a scheme name that has a dot or starts with a digit; the Authentication section with a server URL such as //host or {scheme}://host; css-file copied once instead of on every render; the header's local file button reads YAML and reports a file it cannot read. The sidebar follows right-to-left pages, strikes deprecated operations through, and applies nav-item-overflow to description headings. The API reference, types and schema no longer list removed attributes; the docs have a "Removed attributes" page instead. @rapidoc/starlight and @rapidoc/docusaurus read detail.elementId only.

    The sidebar is usable with a keyboard and a screen reader: every item is a real link (so it is announced as one, opens in a new tab with a middle click, and shows its address), a tag's arrow is a separate button that answers Enter and Space, the current item is marked with aria-current, and the menu button of narrow layouts says whether the menu is open and Escape closes it. The look, class names and CSS parts are unchanged.

  • aa3c878: Security fixes. @rapidoc/server: the sign-in cookie, which /_rapidoc/auth/login gives any visitor, was accepted as a session, opening pages for all signed-in readers without signing in (pages limited to groups or emails were not affected); every sealed cookie and token now has one use. The server also refuses a build whose protected/ folder has no rapidoc-server.json, needs a public URL (site.url or RAPIDOC_PUBLIC_URL) to sign readers in anywhere but localhost, limits request bodies, and sends frame-ancestors (RAPIDOC_FRAME_ANCESTORS), referrer and HSTS headers. rapidoc and @rapidoc/prerender: HTML in descriptions is reduced to a fixed list of elements and attributes, in every browser and in pre-rendered pages, where it was not sanitized at all; javascript: addresses from a spec are no longer links; a spec value can no longer pass for a template in the prerenderer. rapidoc build refuses an output folder that is, holds or is inside a source folder (--out-dir public emptied public/). rapidoc mock and rapidoc dev listen on localhost by default (--host 0.0.0.0 for a container or a shared server; dev has --host now), and the mock takes an imported spec only from a program on its machine or its own page, never from another site's page or through a proxy, and does not let it read other local files.