Spring Cloud Contract Mountebank is extension plug-in for Spring Cloud Contract https://spring.io/projects/spring-cloud-contract). The implementation base on Pluggable Architecture guide (https://docs.spring.io/spring-cloud-contract/docs/2.2.4.RELEASE/reference/html/advanced.html#customization-pluggable-architecture) and some example code from (https://github.com/spring-cloud/spring-cloud-contract/tree/master/spring-cloud-contract-tools)
Mountebank (http://www.mbtest.org/) is lightweight stub framework. Stub is created from predicates .ejs file, so this plug-in help to convert DSL groovy contract to Mountebank's predicates file. You can use output predicates files to create Mountebank stub instantly.
by default, Mountebank's predicates files were generated in target/stubs/META-INF/{groupId}/{artifactId}/{version}
Your application is implemented Spring Cloud Contract as producer side. You can use either Gradle or Maven plugins. Below you can find an example for Maven.
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>${spring-cloud-contract.version}</version>
<extensions>true</extensions>
<configuration>
<packageWithBaseClasses>your.package.base.class</packageWithBaseClasses>
</configuration>
<!-- add the extension plug-in -->
<dependencies>
<dependency>
<groupId>com.ascendcorp</groupId>
<artifactId>spring-cloud-contract-mountebank</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>
mvn spring-cloud-contract:convert
http://www.mbtest.org/docs/gettingStarted
Feel free to contribute and make it better!
Licensed under Apache Software License 2.0