Skip to content

import { Steps } from “@rapidoc/portal/components”;

rapidoc migrate reads your existing portal’s config and writes a rapidoc.config.yaml next to it.

npx rapidoc migrate # finds redocly.yaml or zudoku.config.* and asks to confirm
npx rapidoc migrate --from zudoku
npx rapidoc migrate --from redocly

Run it in the project folder. Without --from it looks for a Redocly (redocly.yaml) or Zudoku (zudoku.config.*) config and asks before migrating it; in CI or a script, pass --from (or --yes to take the one found). An existing rapidoc.config.yaml is replaced, after asking in a terminal. It lists anything it could not convert; fix those before you build.

It overwrites an existing rapidoc.config.yaml. Commit or copy yours first.

Reads zudoku.config.ts, .mjs or .js.

  • Zudoku’s top-level navigation items become the header tabs.
  • The APIs become entries in apis:. APIs that had a custom path get a redirect, because every reference page is /apis/<id>.
  • An input list (one spec per version) becomes versions:, and each version’s old URL gets a redirect. An input with ?prefix=, which shows part of one file as a version, isn’t supported: the query is dropped, so that version shows the whole file, and the migration warns about it.
  • Imports from zudoku/ui/... and <Steps> in MDX pages are rewritten at build time, so the pages work as they are.
  • Zudoku’s callout types (info, warning, sparkles, rocket, …) render as before.
  • basePath with canonicalUrlOrigin becomes the path of site.url; a basePath without the origin gets a warning to set site.url. A metadata.title with %s becomes site.titleTemplate.

Reads redocly.yaml, plus sidebars.yaml if it is there.

  • The sidebars become a Documentation tab.
  • The APIs become an API Catalog tab.
  • theme.openapi becomes the theme and rapidoc: attributes.
  • seo.siteUrl, seo.image and seo.projectTitle become site.url, site.image and site.titleTemplate; scripts.head and links become head entries.
npx rapidoc validate
npx rapidoc dev

Then check the header tabs and sidebars, and move remaining settings by hand with the configuration reference.