OpenAPI linters: which one is the best in a real test?
说明与用途
对五个 OpenAPI linters 的基准测试表明,Redocly CLI 在速度、稳定性和错误报告一致性方面表现最佳,无论规范是打包还是拆分。
问题
Choosing a reliable OpenAPI linter that performs consistently across different API description layouts and sizes.
结果
Redocly CLI was the fastest and most stable linter, handling both bundled and split specs without crashes, and providing consistent error reporting. Other linters either timed out, crashed, or produced inconsistent results due to reference handling or rule set differences.
工作流
- 1. Clone the public benchmark repo
- 2. Install latest releases of each linter
- 3. Run each linter on each spec five times on a GitHub-hosted runner
- 4. Record median lint times and raw outputs
- 5. Split bundled specs with
redocly splitand bundle split specs withredocly bundle - 6. Compare error, warning, and info counts across layouts
- 7. Analyze rule sets and error meanings
- 8. Publish results and raw data in the repo
证据
The setup is simple: latest release of each tool, default rules, one GitHub-hosted runner, one tool at a time, five runs each, median reported.
Redocly CLI finished first at 1.26 s, Vacuum second at 2 s and Speakeasy third at 3.3 s. Spectral came last, far behind at 12 s. Scalar CLI crashed.
Redocly CLI draws the flattest line and the spec size affects it the least.
Redocly CLI was the only tool that reports a problem written into the OpenAPI specification: almost all of its errors are schemas where nullable: true has no effect.
- 记录日期: 2026-10-08T19:40:56.510Z