Skip to content

rapidoc mock

npx rapidoc mock openapi.yaml # http://localhost:4010/openapi
npx rapidoc mock ./specs --port 4011 # every OpenAPI file in the folder
npx rapidoc mock openapi.yaml --stateful # keep state: creates, updates and deletes are remembered

rapidoc mock answers every operation of the spec over HTTP, from its examples or with generated data. It validates requests and can check OAuth tokens against your OpenID Connect issuer. With --stateful it also keeps state: it works out the resources from the spec, starts with generated records, and serves a page at /__mock/ui to look inside. It needs @rapidoc/mock. See Mock Server for the options, and the overview for how it compares with the in-browser mock.