Download the PHP package pccomponentes/open-api-messaging-context without Composer
On this page you can find all versions of the php package pccomponentes/open-api-messaging-context. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pccomponentes/open-api-messaging-context
More information about pccomponentes/open-api-messaging-context
Files in pccomponentes/open-api-messaging-context
Package open-api-messaging-context
Short Description Behat context for validating messages with OpenApi schema
License MIT
Informations about the package open-api-messaging-context
Little context in behat for validate published messages and http responses according to an AsyncApi and OpenApi specification.
Installation
Configuration
This package uses Friends Of Behat Symfony Extension, you must see how to configure your behat with this extension.
How to use
Define SpyMiddleware as a service in your test environment:
Add SpyMiddleware as a middleware in messenger.yaml
configuration in test
environment.
Configure the context in your behat.yml
And use the Then
statement for validate messages:
Your schema must be writen according to https://www.asyncapi.com/ specification.
Available for version schemas 1.2.0
and 2.0.0
.
Available contexts
MessageValidatorOpenApiContext
Check the content of the dispatched message that matches with your asyncapi file:
Check if message has dispatched:
Check if message has not been dispatched:
Configuration:
ResponseValidatorOpenApiContext
Check if http requests are documented in your openapi file:
Check if http responses are documented in your openapi file:
Additionally, you can check both the request and response with:
Configuration:
SimpleMessageContext
When
step for SimpleMessage input:
This is useful to combine it with Then
step in MessageValidatorOpenApiContext
Configuration:
TIP If you are using pccomponentes/messenger-bundle you can use @pccom.messenger_bundle.simple_message.serializer.stream_deserializer
for deserializer service
AggregateMessageContext
When
step for AggregateMessage input:
This is useful to combine it with Then
step in MessageValidatorOpenApiContext
Configuration:
TIP If you are using pccomponentes/messenger-bundle you can use @pccom.messenger_bundle.aggregate_message.serializer.stream_deserializer
for deserializer service
All versions of open-api-messaging-context with dependencies
ext-json Version *
beberlei/assert Version ^3.3
behat/behat Version ^3.13
friends-of-behat/mink Version ^1.10
friends-of-behat/mink-browserkit-driver Version ^1.6
friends-of-behat/mink-extension Version ^2.7
friends-of-behat/symfony-extension Version ^2.4
justinrainbow/json-schema Version ^5.2
pccomponentes/ddd Version ^3.0 || ^4.0
symfony/cache Version ^5.0 || ^6.0 || ^7.0
symfony/messenger Version ^5.0 || ^6.0 || ^7.0
symfony/yaml Version ^5.0 || ^6.0 || ^7.0