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 Summary
Constructors Constructor Description DslToWireMockClientConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<org.springframework.cloud.contract.spec.Contract,String>
convertContents(String rootName, org.springframework.cloud.contract.verifier.file.ContractMetadata contract)
com.github.tomakehurst.wiremock.stubbing.StubMapping
defaultStubMappingPostProcessing(com.github.tomakehurst.wiremock.stubbing.StubMapping stubMapping, org.springframework.cloud.contract.spec.Contract contract)
Stub mapping to chose when no post processors where found on the classpath.com.github.tomakehurst.wiremock.stubbing.StubMapping
postProcessStubMapping(com.github.tomakehurst.wiremock.stubbing.StubMapping stubMapping, org.springframework.cloud.contract.spec.Contract contract)
Post process a generated stub mapping.-
Methods inherited from class org.springframework.cloud.contract.verifier.wiremock.DslToWireMockConverter
canReadStubMapping, generateOutputFileNameForInput
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.contract.verifier.converter.StubGenerator
fileExtension
-
-
-
-
Method Detail
-
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 stubcontract
- - 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 stubcontract
- - 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 contractcontract
- - metadata of the contract- Returns:
- the collection of converted contracts into stubs. One contract can result in multiple stubs.
-
-