Skip to content

znsio/specmatic-order-api-nodejs

Repository files navigation

Specmatic Sample: Nodejs-Express Order API

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 governing the interaction of the client with the product API.

Tech

  1. Express
  2. Specmatic
  3. Jest

Setup

  1. Install NodeJS
  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

npm install

Execute Tests and Validate Contracts with Specmatic

Executing this command will initiate Specmatic and execute the tests on the Nodejs(Express) application.

npm run test

About

Specmatic Order API Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •