From f368f9fc1d2f77edee9cc8040c0861970f6356b8 Mon Sep 17 00:00:00 2001
From: buildmaster
Date: Wed, 10 May 2017 08:52:52 +0000
Subject: [PATCH] Sync docs from master to gh-pages
---
spring-cloud-contract.html | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/spring-cloud-contract.html b/spring-cloud-contract.html
index 0576d92850..caeb0234a6 100644
--- a/spring-cloud-contract.html
+++ b/spring-cloud-contract.html
@@ -9493,6 +9493,13 @@ number of different ways, including as described above using
Contract DSL file and documentation. If you combine that with Spring Cloud
WireMock then you’re getting both the contracts and stubs.
+
+
Why would you want to use this feature? Some people in the community asked questions
+about situation in which they would like to move to DSL based contract definition
+but they already have a lot of Spring MVC tests. Using this feature allows you to generate
+the contract files that you can later modify and move to proper folders so that the
+plugin picks them up.
+
@@ -9542,15 +9549,13 @@ section, contract will get generated and a documentation file too.
Contract.make {
request {
method 'POST'
- url 'http://localhost:8080/foo'
+ url '/foo'
body('''
{"foo": 23 }
''')
headers {
header('''Accept''', '''application/json''')
header('''Content-Type''', '''application/json''')
- header('''Host''', '''localhost:8080''')
- header('''Content-Length''', '''12''')
}
}
response {