Updated readme
This commit is contained in:
16
README.adoc
16
README.adoc
@@ -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'))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user