Allows passing of regex type (#832)

without this change if one does $(regex("[0-9]")) we have no knowledge of whether the result should be text or a number. What we do ATM is we always generate a String
with this change once can pass the type of regular expression and we will generate the concrete value of that given type

fixes gh-768
This commit is contained in:
Marcin Grzejszczak
2018-12-28 16:29:32 +01:00
committed by GitHub
parent 58bf533462
commit 56fbc11f62
40 changed files with 989 additions and 263 deletions

View File

@@ -12,7 +12,7 @@ import org.springframework.cloud.contract.spec.Contract
response {
status OK()
body([
count: 200
count: $(regex("[2-9][0-9][0-9]").asInteger())
])
headers {
contentType("application/json")