OpenAPI guides
Tasks from start to finish: checks in CI, migrations, publishing. Each page comes with the output of the tools that read the example, and says when it was last checked.
- A GraphQL mock server from a schema file, in one command
apigit mock serve schema.graphql answers every query and mutation of an SDL schema at /graphql with generated values, and refuses queries the schema does not allow. What it returns, what it validates, and what it does not mock.
- A stateful mock server in JavaScript: answers that remember earlier requests
A mock generated from an API description answers each request on its own. When a test needs a cart that fills up or a user that exists after being created, write the routes as Express handlers and keep the data in a state object. A working example with its requests.
- Bundle a multi-file OpenAPI description into one file
Splitting an OpenAPI description over files keeps it maintainable; many tools still want one file. apigit bundle resolves the external $refs into components and leaves internal ones as references. A four-file example, the output, and why to lint the bundle.
- Lint an OpenAPI file in GitHub Actions, with each finding on its line
A short workflow that lints an OpenAPI description on every push and pull request, fails on errors and attaches each finding to its line as an annotation. The workflow, a failing pull request and a passing run from a real repository.
- Moving a Stoplight project to APIGit: what carries over, what to convert
A Stoplight project is OpenAPI files, JSON Schema models and Markdown in a known folder layout. The API files work unchanged; the sidebar file and Stoplight Flavored Markdown need converting. Each step, run on a sample project.
- Moving off Apiary: API Blueprint to OpenAPI, with docs and a mock server on the other side
Oracle announced the end of life of Apiary Cloud Service for 31 October 2026, and Apiary's hosted docs and mock servers no longer answer. The steps to move an API Blueprint description to OpenAPI, run on a sample: find the file, convert it, read what a linter says, mock it, publish it.
- Run a mock server from an OpenAPI file on your machine
One command starts a mock that answers every operation of an OpenAPI file with generated examples and refuses requests that do not match the description. What it returns, how it validates, and when to move it to a hosted mock.
Try it with your own API
Create a free workspace, add your API files, and publish their documentation and a mock server from the same repository.
Free for individuals. No credit card.
$ npm install -g @apigit/cli$ apigit auth login$ apigit doc publish