public interface StubGenerator
| Modifier and Type | Method and Description |
|---|---|
default boolean |
canHandleFileName(String fileName) |
Map<org.springframework.cloud.contract.spec.Contract,String> |
convertContents(String rootName,
org.springframework.cloud.contract.verifier.file.ContractMetadata content) |
default String |
fileExtension()
Describes the file extension that this stub generator can handle.
|
String |
generateOutputFileNameForInput(String inputFileName) |
default boolean canHandleFileName(String fileName)
fileName - - file nametrue if the converter can handle the file to convert it into a
stub.Map<org.springframework.cloud.contract.spec.Contract,String> convertContents(String rootName, org.springframework.cloud.contract.verifier.file.ContractMetadata content)
rootName - - root name of the contractcontent - - metadata of the contractString generateOutputFileNameForInput(String inputFileName)
inputFileName - - name of the input fileContract.name field then that field will override the generated file name.
Example: name of file with 2 contracts is foo.groovy, it will be converted
by the implementation to foo.json. The recursive file converter will create
two files 0_foo.json and 1_foo.jsondefault String fileExtension()
Copyright © 2016–2020 Spring. All rights reserved.