API example coverage checker
Find API endpoints that have no request example in your Markdown documentation, and examples that call endpoints the contract does not list.
Up to 2,000,000 characters in total, 2,000 files, 2,000 endpoints and 5,000 examples. Everything runs in your browser and nothing is uploaded. Downloads: JSON report and CSV coverage table. Start each file with a header line such as ==> docs/api.md <==. Examples are read from fenced code blocks. Up to 1,000,000 characters. Review the settings before running.
Your result
How to use API example coverage checker
- Paste your Markdown pages, starting each one with a header line such as ==> docs/projects.md <==.
- Add your OpenAPI file after a line such as ==> openapi.json <==, or rely on METHOD /path headings in the pages.
- Set a base path such as /v1 if example URLs include one that the contract paths leave out.
- Run the check and download the JSON report or the CSV coverage table.
Useful next steps
What it does
The checker reads every fenced code block in the pages and collects request examples: curl commands, raw HTTP request lines such as GET /v1/orders HTTP/1.1, fetch calls and client calls such as axios.get, requests.get or client.post. Each example is matched to an endpoint by method and path, and each endpoint gets its example count.
How matching works
Hosts, query strings and leading variables such as ${BASE_URL}, $BASE_URL or {{baseUrl}} are removed from example URLs. The base path from the setting, or else from the OpenAPI servers or Swagger basePath value, is removed before matching. A base path typed without a leading slash, such as v1, is read as /v1, a full URL is read as its path, and / removes nothing. Path parameters such as {projectId}, :projectId or <projectId> match any one path segment, and so do example placeholders such as ${projectId} or $PROJECT_ID. When several endpoints match, the most specific one gets the example, so /projects/archived counts for GET /projects/archived and not for GET /projects/{projectId}. curl options are read like a shell reads them, so an option value such as -o /dev/null is never taken for the URL. A curl command uses the method given with -X or --request, otherwise HEAD with -I or --head, GET with -G or --get, PUT with -T or --upload-file, POST when it sends data with -d, --data, --json or -F, and GET in every other case. A fetch call is a GET unless its options set a method within 300 characters after the URL and before the next fetch call.
Limits
Without an OpenAPI file, endpoints come from headings that contain METHOD /path. Examples outside fenced code blocks, in other languages or built from string concatenation are not recognised. The check does not run the examples or validate their bodies. Files under node_modules, .git, dist, build and other build folders are skipped unless you turn that off, and you can add your own exclude patterns in gitignore syntax.