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>
Converts DSLs to WireMock stubs.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertContents(String rootName, org.springframework.cloud.contract.verifier.file.ContractMetadata contract) com.github.tomakehurst.wiremock.stubbing.StubMappingdefaultStubMappingPostProcessing(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.StubMappingpostProcessStubMapping(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, generateOutputFileNameForInputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.cloud.contract.verifier.converter.StubGenerator
fileExtension
-
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:StubGeneratorPost 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:StubGeneratorStub 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.
-