https://github.com/znsio/specmatic-order-api-java
https://github.com/znsio/specmatic-order-api-java
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/znsio/specmatic-order-api-java
- Owner: znsio
- License: mit
- Created: 2023-05-16T20:13:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T15:48:04.000Z (about 1 year ago)
- Last Synced: 2025-03-19T16:39:07.039Z (about 1 year ago)
- Language: Kotlin
- Size: 352 KB
- Stars: 1
- Watchers: 8
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: License.md
Awesome Lists containing this project
README
# Specmatic Sample Client Application

BFF = Backend For Frontend, the API invoked by the HTTP calls in the client HTML page (Website UI).
This project contains the product API, which is used by a small ecommerce client application.
Here is the [contract](https://github.com/znsio/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_v3.yaml) governing the interaction of the client with the product API.
The architecture diagram was created using the amazing free online SVG editor at [Vectr](https://vectr.com).
### How to run the application?
1. Build the project using : `./mvnw clean install`
2. For unix platform, run the application using : `./mvnw spring-boot:run`
3. For windows platform, run the application using : `mvnw.cmd spring-boot:run`
### How to test the application?
1. Using maven: `mvn clean test`
2. Using docker:
- Start Docker Desktop
- Run the application `./mvnw spring-boot:run`
- Run the tests `docker run --network host -v "$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml" -v "$PWD/build/reports/specmatic:/usr/src/app/build/reports/specmatic" znsio/specmatic test --port=8090 --host=host.docker.internal`