https://github.com/ascendcorp/spring-cloud-contract-mountebank
Plug-in to generate mountebank predicates stub files
https://github.com/ascendcorp/spring-cloud-contract-mountebank
Last synced: 3 months ago
JSON representation
Plug-in to generate mountebank predicates stub files
- Host: GitHub
- URL: https://github.com/ascendcorp/spring-cloud-contract-mountebank
- Owner: ascendcorp
- Created: 2020-09-01T06:23:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T15:31:49.000Z (almost 5 years ago)
- Last Synced: 2025-01-24T17:46:11.740Z (4 months ago)
- Language: Groovy
- Size: 12.7 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Spring Cloud Contract for Mountebank
[](http://www.apache.org/licenses/LICENSE-2.0)
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}***
## Pre-Requisite
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.
## Add library to Spring Cloud Contract Maven Plugin dependency
```xml
org.springframework.cloud
spring-cloud-contract-maven-plugin
${spring-cloud-contract.version}
true
your.package.base.class
com.ascendcorp
spring-cloud-contract-mountebank
1.0.0
```
## Command
```java
mvn spring-cloud-contract:convert
```## Setup stub
http://www.mbtest.org/docs/gettingStartedFeel free to contribute and make it better!
-------------------------------------
_Licensed under [Apache Software License 2.0](https://www.apache.org/licenses/LICENSE-2.0)_