Skip to content

Commit 6bee812

Browse files
committed
Update specmatic version to latest
1 parent b8a8a4d commit 6bee812

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Specmatic FastAPI with Redis Demo
22

3-
This is a Python implementation of the [Specmatic Order BFF Service](https://github.com/znsio/specmatic-order-ui)
4-
project.
3+
This is a Python implementation of the [Specmatic Order BFF Service](https://github.com/znsio/specmatic-order-bff-java) project.
54
The implementation is based on the [FastApi](https://fastapi.tiangolo.com/) framework.
65

76
The open api contract for the services is defined in
8-
the [Specmatic Central Contract Repository](https://github.com/znsio/specmatic-order-contracts/blob/main/in/specmatic/examples/store/api_order_v1.yaml)
7+
the [Specmatic Central Contract Repository](https://github.com/specmatic/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/product_search_bff_v4.yaml)
98

109
The bff service internally calls the order api service (on port 8080).
1110

@@ -17,20 +16,45 @@ while mocking out the order api service at the same time.
1716

1817
2. Demonstrate how to mock out the Redis server using Specmatic Redis Mock and Test Containers.
1918

20-
2119
## Prerequisites
22-
2320
- Python 3.11+
2421
- JRE 17+.
22+
- Docker Desktop
23+
24+
1. ### Create a virtual environment named ".venv" by executing the following command in the terminal from the project's root directory
2525

26-
1. Create a virtual environment and install all dependencies:
26+
```shell
27+
python -m venv .venv
28+
```
2729

28-
```bash
29-
python -m venv .venv
30+
2. ### Activate virtual environment by executing
31+
32+
* **on MacOS and Linux**
33+
34+
```shell
3035
source .venv/bin/activate
31-
pip install -r requirements.txt
3236
```
3337

38+
* **on Windows CMD**
39+
40+
```cmd
41+
.venv\Scripts\activate.bat
42+
```
43+
44+
* **on Windows Powershell (you may need to adjust the ExecutionPolicy)**
45+
46+
```powershell
47+
.\.venv\Scripts\Activate.ps1
48+
```
49+
50+
3. ### Install Dependencies
51+
52+
To install all necessary dependencies for this project, navigate to the project's root directory in your terminal and execute
53+
54+
```shell
55+
pip install -r requirements.txt
56+
```
57+
3458
## Running the contract suite
3559

3660
Run the tests using pytest:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fastapi>=0.110
22
pytest>=7.4
33
python-dotenv>=1.0
4-
specmatic==2.27.3
4+
specmatic==2.29.0
55
redis==7.0.1
66
testcontainers==4.13.2
77
coverage==7.11.0

0 commit comments

Comments
 (0)