https://github.com/znsio/specmatic-order-api-nodejs
Specmatic Order API Node.js
https://github.com/znsio/specmatic-order-api-nodejs
Last synced: 10 months ago
JSON representation
Specmatic Order API Node.js
- Host: GitHub
- URL: https://github.com/znsio/specmatic-order-api-nodejs
- Owner: znsio
- Created: 2024-03-22T15:43:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-08T19:59:21.000Z (about 1 year ago)
- Last Synced: 2025-06-08T20:33:20.665Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.9 MB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Specmatic Sample: Nodejs-Express Order API
- [Specmatic Website](https://specmatic.io)
- [Specmatic Documentation](https://specmatic.io/documentation.html)
This sample project illustrates the implementation of contract-driven development and contract testing within a Nodejs(Express) application. In this context, Specmatic is utilized to function as a client, making calls to API service according to its OpenAPI specification to validate its functionality.
Here is the API's [contract/open api spec](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.
## Tech
1. Express
2. Specmatic
3. Jest
## Setup
1. Install [NodeJS](https://nodejs.org/en)
2. Install JRE 17 or later.
## Install Dependencies
To install all necessary dependencies for this project, navigate to the project's root directory in your terminal and execute
```shell
npm install
```
## Execute Tests and Validate Contracts with Specmatic
Executing this command will initiate Specmatic and execute the tests on the Nodejs(Express) application.
```shell
npm run test
```