Search in sources :

Example 1 with ContractVerifierMetadata

use of org.springframework.cloud.contract.verifier.dsl.ContractVerifierMetadata in project spring-cloud-contract by spring-cloud.

the class WireMockRequestStubStrategy method appendBody.

private void appendBody(RequestPatternBuilder requestPatternBuilder) {
    if (contract.getMetadata().containsKey(ContractVerifierMetadata.METADATA_KEY)) {
        ContractVerifierMetadata metadata = ContractVerifierMetadata.fromMetadata(contract.getMetadata());
        appendSpringCloudContractMatcher(metadata, requestPatternBuilder);
        if (!StringUtils.hasLength(metadata.getTool())) {
            doAppendBody(requestPatternBuilder);
        }
    } else {
        doAppendBody(requestPatternBuilder);
    }
}
Also used : ContractVerifierMetadata(org.springframework.cloud.contract.verifier.dsl.ContractVerifierMetadata)

Aggregations

ContractVerifierMetadata (org.springframework.cloud.contract.verifier.dsl.ContractVerifierMetadata)1