O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Contract tests using Pact.js

Each microservice has its own independent implementation; let's say our categories service(product-catalog service). It has an endpoint for fetching a list of categories, getting the list of products associated with those categories, adding any new categories, and so on. Now our shopping cart microservices (consumer) utilizes this service, but at any point in time, the categories microservice (provider) may change.

At any point in time:

  • The provider might change the endpoint /categories/list to /categories
  • The provider might change several things in the payload
  • The provider might add new mandatory parameters or may introduce a new authentication mechanism
  • The provider might remove endpoints that are needed by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required