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: README.md
+33-9Lines changed: 33 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
# Specmatic FastAPI with Redis Demo
2
2
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.
5
4
The implementation is based on the [FastApi](https://fastapi.tiangolo.com/) framework.
6
5
7
6
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)
9
8
10
9
The bff service internally calls the order api service (on port 8080).
11
10
@@ -17,20 +16,45 @@ while mocking out the order api service at the same time.
17
16
18
17
2. Demonstrate how to mock out the Redis server using Specmatic Redis Mock and Test Containers.
19
18
20
-
21
19
## Prerequisites
22
-
23
20
- Python 3.11+
24
21
- 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
25
25
26
-
1. Create a virtual environment and install all dependencies:
26
+
```shell
27
+
python -m venv .venv
28
+
```
27
29
28
-
```bash
29
-
python -m venv .venv
30
+
2. ### Activate virtual environment by executing
31
+
32
+
***on MacOS and Linux**
33
+
34
+
```shell
30
35
source .venv/bin/activate
31
-
pip install -r requirements.txt
32
36
```
33
37
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 forthis project, navigate to the project's root directoryin your terminal and execute
0 commit comments