Updated readme

This commit is contained in:
Marcin Grzejszczak
2016-07-21 14:39:57 +02:00
parent 7496101b1d
commit 472cd89768

View File

@@ -201,24 +201,26 @@ org.springframework.cloud.contract.spec.Contract.make {
url '/fraudcheck'
body("""
{
"clientId":"${value(consumer(regex('[0-9]{10}')), producer('1234567890'))}",
"clientId":"${value(consumer(regex('[0-9]{10}')))}",
"loanAmount":99999}
"""
)
headers {
header('Content-Type', 'application/vnd.fraud.v1+json')
}
}
response {
status 200
body( """{
"fraudCheckStatus": "${value(consumer('FRAUD'), producer(regex('[A-Z]{5}')))}",
"rejectionReason": "Amount too high"
}""")
"fraudCheckStatus": "FRAUD",
"rejectionReason": "Amount too high"
}""")
headers {
header('Content-Type': value(producer(regex('application/vnd.fraud.v1.json.*')), consumer('application/vnd.fraud.v1+json')))
}
header('Content-Type': value(
producer(regex('application/vnd.fraud.v1.json.*')),
consumer('application/vnd.fraud.v1+json'))
)
}
}
}