You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/supported_protocols/asyncapi/kafka.mdx
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ Please refer to [Specmatic documentation](/references/configuration) for more de
83
83
Now we can run below command to spin a Kafka mock server. Please note the volume mapping to pass the specmatic.yaml to the Kafka Docker image and also the port mappings.
docker run --network host -v "$(pwd):/usr/src/app" specmatic/enterprise --external-broker-url localhost:9092
118
114
```
119
115
120
116
The `--network host` flag is important when using `localhost` for the broker address, as it allows the container to access the host network directly. This avoids common issues with Docker container networking when referring to services on the host machine.
@@ -378,10 +374,10 @@ Start the Specmatic Kafka mock server using the following command:
378
374
379
375
```bash
380
376
docker run --rm --name specmatic-kafka-mock \
381
-
-p 9999:9999 \
382
-
-v "$PWD/spec.yaml:/usr/src/app/spec.yaml" \
377
+
--network host \
378
+
-v "$(pwd):/usr/src/app" \
383
379
specmatic/enterprise \
384
-
virtualize spec.yaml \
380
+
mock spec.yaml \
385
381
--external-broker-url host.docker.internal:9092
386
382
```
387
383
@@ -495,7 +491,7 @@ To test this service from the command line, follow the below steps.
495
491
2. **Run the Service**: Start your service locally.
496
492
3. **Run Contract Tests**: Use the following command to run the contract tests against the service by replacing `kafka_broker_host` and `kafka_broker_port` with appropriate values:
497
493
```shell
498
-
docker run --network="host" -v "$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml" specmatic/enterprise test --host=<kafka_broker_host> --port=<kafka_broker_port>
494
+
docker run --network="host" -v "$(pwd):/usr/src/app" specmatic/enterprise test --host=<kafka_broker_host> --port=<kafka_broker_port>
499
495
```
500
496
501
497
To get information around all the CLI args of the `test` command, run the following command.
@@ -568,7 +564,7 @@ Start your application that implements the AsyncAPI specification. The applicati
568
564
Execute the contract tests using the Specmatic Docker image:
569
565
570
566
```bash
571
-
docker run --network host -v "$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml" -v "$PWD/spec:/usr/src/app/spec" specmatic/enterprise test
567
+
docker run --network host -v "$(pwd):/usr/src/app" specmatic/enterprise test
Copy file name to clipboardExpand all lines: docs/supported_protocols/asyncapi/migrate-from-specmatic-kafka-to-async.mdx
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
-
title: Migrating to specmatic-async
2
+
title: Migrating to Specmatic Enterprise
3
3
sidebar_position: 11
4
-
sidebar_label: Migrating to specmatic-async
4
+
sidebar_label: Migrating to Specmatic Enterprise
5
5
---
6
6
7
-
# Migrating from `specmatic-kafka` to `specmatic-async`
7
+
# Migrating from `specmatic-kafka` to `specmatic enterprise`
8
8
9
-
Migrating to `specmatic-async` unlocks multi-protocol support, improved configuration, and a unified approach to async contract testing and mocking. This guide walks you through the key steps for a smooth transition.
9
+
Migrating to `specmatic enterprise` unlocks multi-protocol support, improved configuration, and a unified approach to async contract testing and mocking. This guide walks you through the key steps for a smooth transition.
10
10
11
11
## Migration Steps
12
12
@@ -46,7 +46,7 @@ contracts:
46
46
Refer to the [Configuration Reference](./index.mdx#configuration-reference) for all available options.
47
47
48
48
### 2. Update Docker Image
49
-
Replace the `specmatic-kafka` image with `specmatic-async` in your Docker commands.
49
+
Replace the `specmatic/specmatic-kafka` image with `specmatic/enterprise` in your Docker commands.
50
50
51
51
**Before:**
52
52
```bash
@@ -73,10 +73,9 @@ public class KafkaContractTest implements SpecmaticKafkaContractTest {
0 commit comments