Specmatic 2.0 is out! Now supports GraphQL and gRPC

Share this page

We’re thrilled to announce the release of Specmatic 2.0.x, a significant milestone release that is set to transform the way developers approach contract testing, intelligent service virtualization and backward compatibility testing. Now you can also transform your GraphQL and gRPC API specs into executable contracts in seconds. Specmatic 2.0 ushers in a new era of API resilience testing. 

These enhancements broaden the scope of Specmatic, allowing teams to adopt cutting-edge technologies while ensuring the integrity and reliability of their APIs. It means your team can spend more time building great features and less time worrying about integration hell. This new release 2.0.x stays true to the spirit of Shift Left by adding more to the arsenal of features that enable teams in catching issues early in the development process with the ability to run tests locally and in CI. 

What’s new? 

GraphQL and gRPC support 

Now you can easily set up leverage your GraphQL and gRPC APIs for contract testing, intelligent service virtualisation and backward compatibility testing, just like you would for your OpenAPI-based services. No more complex and brittle setups that involve an assortment of tools – Specmatic handles it all for you, thereby making for a one stop solution that enables a seamless DevEx. 

YAML config files 

YAML config support has been added in addition to JSON, enabling consistency with the OpenAPI specification format and making for a more concise configuration.    

See Specmatic 2.0 in action with GraphQL

What’s changing? 

Terminology alignment 

In a move to improve semantics and better align with Contract Driven Development terminology, the new provides and consumes sections have replaced the test and stub sections. This change reflects Specmatic’s commitment to clarity and usability in API contract testing.  

Although the test and stub keys will continue to be supported, users are encouraged to adopt the new keys for clarity and consistency. Here’s the documentation. 

Introducing a new domain and new group ID 

We have a new domain for our website – specmatic.io.  

Specmatic packages are now available under a new groupId ‘io.specmatic’.  https://mvnrepository.com/artifact/io.specmatic 
 
Users using Specmatic in projects with JVM languages like Kotlin, Java can migrate to Specmatic 2.0.0 by simply updating their contract tests to import the classes from ‘io.specmatic’ instead of ‘in.specmatic’.   

For example, if you had import statements like this: 

import net.specmatic.test.whatever; 

You’ll now need to update them to: 

import io.specmatic.test.whatever; 

Pricing update 

To leverage these exciting new features and expanded capabilities you will need a paid Specmatic Pro or Enterprise plan. See the updated pricing page for more details 

How to get started 

For GraphQL and gRPC, the setup process is just as straightforward as it is for OpenAPI. All you need are your GraphQL schema files or gRPC proto files, along with a simple Specmatic configuration, and you’re good to go. 

To make it easier for developers to get started with Specmatic 2.0, updated sample projects are readily available. These projects are designed to showcase the full potential of Specmatic’s new features and provide a straightforward path for developers to try out the tool. 

Sample gRPC projects 

https://github.com/specmatic/specmatic-order-bff-grpc-kotlin 
https://github.com/specmatic/specmatic-order-api-grpc-kotlin 
https://github.com/specmatic/specmatic-order-bff-grpc-go 

Sample GraphQL projects: 

https://github.com/specmatic/specmatic-order-bff-graphql-java 
https://github.com/specmatic/specmatic-order-graphql-ui-react 
https://github.com/specmatic/specmatic-order-graphql-consumer-java 

At its core, Specmatic 2.0 is about empowering developers and teams to build more reliable, efficient, and scalable microservices.  

Give it a try and experience the difference for yourself! 

Related Posts

By Hari Krishnan

Specmatic Docker Image now available

Specmatic is now available as a Docker image! Turn your API specifications into executable contracts in seconds. Your favorite features such as contract tests, intelligent
Read More
Dave Farley pointing to the Specmatic tool for easy microservice testing, featured on Dave Farley's Continuous Delivery channel.

“Easy Microservice Testing” – Specmatic featured on Continuous Delivery channel

Dave Farley is a respected author and widely recognised proponent of Continuous Delivery. In this video on his Continuous Delivery YouTube channel he discusses why
Read More

By John

2023 year in review

The end of the year is nearly upon us and we have lots to celebrate! Specmatic just turned 4 and the release of version 1.0
Read More

By Joel Rosario

TMForum ODA CTK API specification conformance testing with Specmatic

We recently discovered some major issues with the TMForum Conformance Test Kit (CTK) v5.0.0 and will demonstrate how using Specmatic can address these problems.
Read More

By Hari Krishnan

Types of Contracts Testing – Consumer Driven, Provider Driven and Contract Driven

The terms Contract Testing and "Consumer Driven Contract Testing" are often used interchangeably thereby making it seem like they are one and the same. However
Read More
api days revised 1920x1080

By John

New features and a BIG Announcement! Specmatic is bringing apidays to India!

In the past few months, we have launched a flurry of exciting features, presented at several global conferences and onboarded several new team members. We
Read More
specmatic challenge winners announced

By John

Specmatic Challenge – winners announced!

The Specmatic challenge is over and we are pleased to announce the winners! Congratulations to Mohd Zaid and Himanshu Singal for successfully completing the challenge
Read More
Contract Testing with Specmatic - Markus Oberlehner

Stubbing an HTTP end-point with Specmatic

Markus Oberlehner gives a brief overview on the topic of Contract Testing with Specmatic and his experience using it for stubbing an HTTP end-point.
Read More

By Naresh Jain

Introduction to Contract Driven Development with Specmatic

Transcript Hi, welcome to this demo of contract-driven development where I'm going to use Specmatic, an open-source tool to turn your API specification into executable
Read More

Contract vs. Approval Testing: Identifying Bugs in RESTfulBooker’s API with Specmatic and TextTest

Testing APIs: Specmatic vs TextTest Emily Bache wanted to compare TextTest with Specmatic and has published a video about her experience: The BEST way to
Read More