-
-
Notifications
You must be signed in to change notification settings - Fork 448
Description
Tool Name
cypress-ajv-schema-validator
Tool Description
Cypress plugin that validates API responses against Plain JSON schemas, and whole Swagger and OpenAPI documents using the Ajv JSON Schema validator.
It provides a user-friendly view of validated data, highlighting each validation error and the exact reason for the mismatch. Seamless integration, fast and lightweight.
Action Type
- Add Tool
- Modify Tool
Tooling Types
- validator
- hyper-schema
- benchmarks
- documentation
- LDO-utility
- code-to-schema
- data-to-schema
- model-to-schema
- schema-to-types
- schema-to-code
- schema-to-web-UI
- schema-to-data
- util-general-processing
- util-schema-to-schema
- util-draft-migration
- util-format-conversion
- util-testing
- editor
- editor-plugins
- schema-repository
- linter
- linter-plugins
Languages
Javascript
Environments
Cypress
Dependencies on Validators
Ajv
Creators
Sebastian Clavijo Suero
https://www.linkedin.com/in/sebastianclavijosuero/
https://sclavijosuero.github.io/
https://github.com/sclavijosuero
Maintainers
Sebastian Clavijo Suero
https://www.linkedin.com/in/sebastianclavijosuero/
https://sclavijosuero.github.io/
https://github.com/sclavijosuero
License
MIT
Source Repository URL
https://github.com/sclavijosuero/cypress-ajv-schema-validator
Homepage URL
https://github.com/sclavijosuero/cypress-ajv-schema-validator/blob/main/README.md
Supported Dialects
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 2019-09
- 2020-12
Additional Dialects
No response
Bowtie Compliance Testing
No response
Tooling Listing Notes
Main Features
- Cypress command
cy.validateSchema()and utility functionvalidateSchema()to report JSON Schema validation errors in the response obtained from any network request withcy.request(). - The command
cy.validateSchema()is chainable and returns the original API response yielded. - Schema is provided as a JSON object, that could come from a Cypress fixture.
- It uses the Ajv JSON Schema Validator as its core engine.
- Support schemas provided as plain JSON schema, OpenAPI 3.0.1 schema document and Swagger 2.0 schema document.
- Provides in the Cypress log a summary of the schema errors as well as a list of the individual errors in the schema validation.
- By clicking on the summary of schema errors in the Cypress log, the console will output:
- Number of schema errors.
- Full list of schema errors as provided by Ajv.
- A nested tree view of the validated data, clearly indicating the errors and where they occurred in an easy-to-understand format.
Compliance
No response
Landscape Information
No response
