Chai OpenAPI Response Validator
JSON →Chai OpenAPI Response Validator is a testing utility that extends the Chai assertion library, enabling developers to validate HTTP responses and arbitrary JavaScript objects against an OpenAPI (Swagger) specification. The current stable version is 0.14.2, released in January 2022. While it doesn't adhere to a strict release cadence, the project shows active maintenance with several releases in late 2021 and early 2022. Key differentiators include its seamless integration with Chai's assertion syntax (e.g., `expect(response).to.satisfyApiSpec`), support for both OpenAPI 2 and 3 specifications in YAML or JSON formats, and robust handling of `$ref` definitions. It is compatible with various HTTP clients like Axios, `request-promise`, Supertest, Superagent, and `chai-http`, making it versatile for different testing setups, including Mocha. It also provides immediate feedback if the loaded OpenAPI specification itself is invalid.
Traffic · last 30 days ↓55% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇬🇧 United Kingdom