Skip to content

Commit 0cf605e

Browse files
JosephBJoyceJP-Ellis
authored andcommitted
chore(docs): update examples/readme.md
Fix typos Authored-By: JosephBJoyce Cherry-Picked-By: JP-Ellis <josh@jpellis.me>
1 parent 4da86d3 commit 0cf605e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Assuming you have [hatch](https://hatch.pypa.io/latest/) installed, the example
88
hatch run example
99
```
1010

11-
The code within the examples is intended to be well documented and you are encouraged to look through the code as well (or submit a PR if anything is unclear!).
11+
The code within the examples is intended to be well-documented and you are encouraged to look through the code as well (or submit a PR if anything is unclear!).
1212

1313
## Overview
1414

@@ -34,7 +34,7 @@ sequenceDiagram
3434

3535
To test this interaction naively would require both the consumer and provider to be running at the same time. While this is straightforward in the above example, this quickly becomes impractical as the number of interactions grows between many microservices. Pact solves this by allowing the consumer and provider to be tested independently.
3636

37-
Pact achieves this be mocking the other side of the interaction:
37+
Pact achieves this by mocking the other side of the interaction:
3838

3939
<!-- markdownlint-disable no-inline-html -->
4040
<div align="center">
@@ -65,7 +65,7 @@ sequenceDiagram
6565
</div>
6666
<!-- markdownlint-enable no-inline-html -->
6767

68-
In the first stage, the consumer defines a number of interactions in the form below. Pact sets up a mock server that will respond to the requests as defined by the consumer. All these interactions, containing both the request and expected response, are all sent to the Pact Broker.
68+
In the first stage, the consumer defines a number of interactions in the form below. Pact sets up a mock server that will respond to the requests as defined by the consumer. All these interactions, containing both the request and expected response, are sent to the Pact Broker.
6969

7070
> Given {provider state} </br>
7171
> Upon receiving {description} </br>
@@ -74,7 +74,7 @@ In the first stage, the consumer defines a number of interactions in the form be
7474
7575
In the second stage, the provider retrieves the interactions from the Pact Broker. It then sets up a mock client that will make the requests as defined by the consumer. Pact then verifies that the responses from the provider match the expected responses defined by the consumer.
7676

77-
In this way, Pact is consumer driven and can ensure that the provider is compatible with the consumer. While this example showcases both sides in Python, this is absolutely not required. The provider could be written in any language, and satisfy contracts from a number of consumers all written in different languages.
77+
In this way, Pact is consumer-driven and can ensure that the provider is compatible with the consumer. While this example showcases both sides in Python, this is absolutely not required. The provider could be written in any language, and satisfy contracts from a number of consumers all written in different languages.
7878

7979
### Consumer
8080

@@ -97,9 +97,9 @@ expected: dict[str, Any] = {
9797

9898
### Provider
9999

100-
This example showcases to different providers, one written in Flask and one written in FastAPI. Both are simple Python web servers that respond to a HTTP GET request. The Flask provider is defined in [`src/flask.py`][examples.src.flask] and the FastAPI provider is defined in [`src/fastapi.py`][examples.src.fastapi]. The tests for the providers are defined in [`tests/test_01_provider_flask.py`][examples.tests.test_01_provider_flask] and [`tests/test_01_provider_fastapi.py`][examples.tests.test_01_provider_fastapi].
100+
This example showcases two different providers; one written in Flask and one written in FastAPI. Both are simple Python web servers that respond to a HTTP GET request. The Flask provider is defined in [`src/flask.py`][examples.src.flask] and the FastAPI provider is defined in [`src/fastapi.py`][examples.src.fastapi]. The tests for the providers are defined in [`tests/test_01_provider_flask.py`][examples.tests.test_01_provider_flask] and [`tests/test_01_provider_fastapi.py`][examples.tests.test_01_provider_fastapi].
101101

102-
Unlike the consumer side, the provider side is responsible to responding to the interactions defined by the consumers. In this regard, the provider testing is rather simple:
102+
Unlike the consumer side, the provider side is responsible for responding to the interactions defined by the consumers. In this regard, the provider testing is rather simple:
103103

104104
```py
105105
code, _ = verifier.verify_with_broker(

0 commit comments

Comments
 (0)