improve the error messages for OPEN API SCHEMA tests
See original GitHub issueWe use the OPEN API SCHEMA tests on microcks own endpoints to validate the mocks itself. Often we get schema validation errors which are very hard to identify the exact issue.
The mocks/examples are provided via postman collection - for example for for a POST request some JSON input and some JSON in the response. I now just got this error back:
instance failed to match all required schemas (matched only 1 out of 2)/n
OK, I guess either the request payload or the response do not match the schema - but which one? and where is the error exactly?
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
19 Improving input validation with advanced JSON Schema
JSON schema keywords for validation; Enhancing PetSitter schemas with those; ... an OpenAPI-powered mocking and testing tool, to detect whether the API ...
Read more >[BUG] schemathesis fails with validation error despite schema ...
Describe the bug schemathesis fails with validation error despite schema is openapi 3.0.0 valid. To Reproduce $ docker run --network="host" ...
Read more >REST API Testing Strategy: What Exactly Should You Test?
1. Verify correct HTTP status code. For example, creating a resource should return 201 CREATED and unpermitted requests should return 403 FORBIDDEN, etc....
Read more >Validating requests and responses using OpenAPI ...
In this part, we will enable Committee to validate the API responses, catch invalid responses with our automated tests, and explore the library ......
Read more >How to use the Open API and Swagger Validator plugin for ...
In this post, I've demonstrated the chai-openapi-response-validator and jest-openapi test packages which will improve your tests by checking ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I mean
response
and not request, sorry… I edited my above comment.I was thinking of a JSON schema composition if you have some kind of polymorphism/abstraction in your data. They can be defined inline in the OpenAPI file without no external ref. Would you want to share a simple reproducer so that I can check?