Async API validation
Issue #90
new
Hi there, My team is currently using Pact async and synchronous contract specifications (AsyncAPI and OpenAPI). We are using swagger-mock-validator for the OpenAPI validation against the Pact contract.
I tried extending this repository by adding an asyncapi parser/validator, but i'm getting slightly stuck with this error while running the tests:
9) swagger-mock-validator/api should succeed when a pact message file and an AsyncApi file are compatible
9.1) VError: Unable to parse "test/e2e/fixtures/asyncapi-spec.json": Swagger schema validation failed.
Keyword 'info' is expected to be of type 'object' at #/
Keyword 'servers' is not expected to appear in the schema at #/
Keyword 'channels' is not expected to appear in the schema at #/
Keyword 'components' is not expected to appear in the schema at #/
SCHEMA_VALIDATION_FAILED
error properties: Object({ jse_shortmsg: 'Unable to parse "test/e2e/fixtures/asyncapi-spec.json"', jse_cause: SyntaxError: Swagger schema validation failed.
Keyword 'info' is expected to be of type 'object' at #/
Keyword 'servers' is not expected to appear in the schema at #/
Keyword 'channels' is not expected to appear in the schema at #/
Comments (2)
-
-
Jordan - would you be up for a chat about this in our Pact Slack (slack.pact.io)? I’m one of the Pact maintainers and would love to see how we can support this use case.
- Log in to comment
(Forgot to login when I posted this issue)
I was hoping anyone could give me some pointers on the easiest way I can get Async API contract validation working?