From 14f18dcdd31d8c8d261d40a73d5f858c8d3ed0e3 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 23 Feb 2017 11:09:27 +0100 Subject: [PATCH] Added information in the docs about execute method and concatation without this it can be misunderstood that execute() can be used with Strings with this we're informing the users that the value of the given property (url, header, body) has to be uniquely a execute command fixes #231 --- docs/src/main/asciidoc/verifier/contract.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/src/main/asciidoc/verifier/contract.adoc b/docs/src/main/asciidoc/verifier/contract.adoc index caedb24906..711d8d29ec 100644 --- a/docs/src/main/asciidoc/verifier/contract.adoc +++ b/docs/src/main/asciidoc/verifier/contract.adoc @@ -242,6 +242,12 @@ include::{verifier_core_path}/src/test/groovy/org/springframework/cloud/contract include::{plugins_path}/spring-cloud-contract-gradle-plugin/src/test/resources/functionalTest/bootSimple/src/test/groovy/org/springframework/cloud/contract/verifier/twitter/places/BaseMockMvcSpec.groovy[tags=base_class,indent=0] ---- + +IMPORTANT: You can't use both a String and `execute` to perform concatenation. E.g. calling +`header('Authorization', 'Bearer ' + execute('authToken()'))` will lead to improper results. +To make this work just call `header('Authorization', execute('authToken()'))` and ensure that +the `authToken()` method returns everything that you need. + ===== Dynamic properties in matchers sections If you've been working with https://docs.pact.io/[Pact] this might seem familiar. Quite a few users