Class DslToWireMockClientConverter

java.lang.Object
org.springframework.cloud.contract.verifier.wiremock.DslToWireMockConverter
org.springframework.cloud.contract.verifier.wiremock.DslToWireMockClientConverter
All Implemented Interfaces:
StubGenerator<com.github.tomakehurst.wiremock.stubbing.StubMapping>

public class DslToWireMockClientConverter extends DslToWireMockConverter
Converts DSLs to WireMock stubs.
Since:
1.0.0
  • Constructor Details

    • DslToWireMockClientConverter

      public DslToWireMockClientConverter()
  • Method Details

    • postProcessStubMapping

      public com.github.tomakehurst.wiremock.stubbing.StubMapping postProcessStubMapping(com.github.tomakehurst.wiremock.stubbing.StubMapping stubMapping, org.springframework.cloud.contract.spec.Contract contract)
      Description copied from interface: StubGenerator
      Post process a generated stub mapping.
      Parameters:
      stubMapping - - mapping of a stub
      contract - - contract for which stub was generated
      Returns:
      the converted stub mapping
    • defaultStubMappingPostProcessing

      public com.github.tomakehurst.wiremock.stubbing.StubMapping defaultStubMappingPostProcessing(com.github.tomakehurst.wiremock.stubbing.StubMapping stubMapping, org.springframework.cloud.contract.spec.Contract contract)
      Description copied from interface: StubGenerator
      Stub mapping to chose when no post processors where found on the classpath.
      Parameters:
      stubMapping - - mapping of a stub
      contract - - contract for which stub was generated
      Returns:
      the converted stub mapping
    • convertContents

      public Map<org.springframework.cloud.contract.spec.Contract,String> convertContents(String rootName, org.springframework.cloud.contract.verifier.file.ContractMetadata contract)
      Parameters:
      rootName - - root name of the contract
      contract - - metadata of the contract
      Returns:
      the collection of converted contracts into stubs. One contract can result in multiple stubs.