Repository navigation
Schema validation #194
richardruiter
started this conversation in
Ideas
Replies: 1 comment 3 replies
|
It does seem an interesting feature to have. Since you already have the code for this, I would be happy to accept a PR. However, I do have a question. Can we control which request should be validated? Or is the validation carried out against all incoming requests? |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, we are implementing Contract Testing and have a need for validating the mocks we create against OpenApi and XML-RPC schemas from the backend teams. This makes sure we don't make false assumptions when using a mock server.
We already have a homegrown mockserver with this principle baked in, but we need more functionality and camouflage covers it.
First I was thinking to create middleware that can be shared with multiple teams and created a successful PoC with
middleware.jsHowever then the idea arose to make schema validation part of camouflage server.
In the case of OpenApi It would parse the schemas with
@apidevtools/swagger-parser, validate the request withopenapi-request-validatorand response withopenapi-response-validator(I have the code for this already).What do you think about the idea and config proposal?
All reactions