Migrating
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 confirmnpx rapidoc migrate --from zudokunpx rapidoc migrate --from redoclyRun 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.
From Zudoku
Section titled “From Zudoku”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
inputlist (one spec per version) becomesversions:, 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. basePathwithcanonicalUrlOriginbecomes the path ofsite.url; abasePathwithout the origin gets a warning to setsite.url. Ametadata.titlewith%sbecomessite.titleTemplate.
From Redocly
Section titled “From Redocly”Reads redocly.yaml, plus sidebars.yaml if it is there.
- The sidebars become a Documentation tab.
- The APIs become an API Catalog tab.
theme.openapibecomes the theme andrapidoc:attributes.seo.siteUrl,seo.imageandseo.projectTitlebecomesite.url,site.imageandsite.titleTemplate;scripts.headandlinksbecomeheadentries.
After migrating
Section titled “After migrating”npx rapidoc validatenpx rapidoc devThen check the header tabs and sidebars, and move remaining settings by hand with the configuration reference.