Skip to content

Instantly share code, notes, and snippets.

@AlicanAkkus
Last active May 5, 2019 14:30
Show Gist options
  • Save AlicanAkkus/0336b5f7b6b2f3e0662b04df58898f76 to your computer and use it in GitHub Desktop.
Save AlicanAkkus/0336b5f7b6b2f3e0662b04df58898f76 to your computer and use it in GitHub Desktop.
Spring Cloud Contract
import org.springframework.cloud.contract.spec.Contract
Contract.make {
description "should retrieve account"
request {
method GET()
url ('/api/v1/accounts'){
queryParameters {
parameter("accountId", 1L)
}
}
}
response {
status OK()
headers {
contentType(applicationJson())
}
body(file("retrieveAccountResponse.json"))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment