title: Spring Cloud Contract - how to test simple string response?
body: <p>I'm using Spring Cloud Contract framework for REST services integration testing and related client apps contracts. It works for object JSON request / response, but is there a chance to check simple string. Espetially, service which responses Boolean (true or false in response body)?</p>
  
  <p>Part of groovy definition:</p>
  
  <pre><code>response {
      status 200
      headers {
          header('Content-Type', 'application/json;charset=UTF-8')
      }
      body(
          value(client('true'), server(regex("true|false")))
      )
  }
  </code></pre>
  
  <p>Related part of generated test:</p>
  
  <pre><code>    String responseBody = response.getBody().asString();
      null;
  </code></pre>
  
  <p>Is it a bug, isn't it? Or should I do something better in groovy definition? First row gives a chance generator understands what I want, but second line is completely out. Thanks for any hint.</p>
  
  <p>P.S. I know there are different opinions about only string "true" validity as JSON response (some people says so, other not) Please, don't solve it, but only the real issue :-)</p>