public class YamlContractConverter extends Object implements org.springframework.cloud.contract.spec.ContractConverter<List<YamlContract>>
YamlContract
to a collection of
Contract
.Modifier and Type | Field and Description |
---|---|
static YamlContractConverter |
INSTANCE |
Constructor and Description |
---|
YamlContractConverter() |
Modifier and Type | Method and Description |
---|---|
Collection<org.springframework.cloud.contract.spec.Contract> |
convertFrom(File file) |
List<YamlContract> |
convertTo(Collection<org.springframework.cloud.contract.spec.Contract> contracts) |
protected byte[] |
getBytes(YamlContract yamlContract) |
boolean |
isAccepted(File file) |
protected String |
name(YamlContract contract) |
List<YamlContract> |
read(byte[] bytes) |
Map<String,byte[]> |
store(List<YamlContract> contracts) |
public static final YamlContractConverter INSTANCE
public boolean isAccepted(File file)
isAccepted
in interface org.springframework.cloud.contract.spec.ContractConverter<List<YamlContract>>
public Collection<org.springframework.cloud.contract.spec.Contract> convertFrom(File file)
convertFrom
in interface org.springframework.cloud.contract.spec.ContractConverter<List<YamlContract>>
public List<YamlContract> convertTo(Collection<org.springframework.cloud.contract.spec.Contract> contracts)
convertTo
in interface org.springframework.cloud.contract.spec.ContractConverter<List<YamlContract>>
public Map<String,byte[]> store(List<YamlContract> contracts)
store
in interface org.springframework.cloud.contract.spec.ContractStorer<List<YamlContract>>
public List<YamlContract> read(byte[] bytes)
read
in interface org.springframework.cloud.contract.spec.ContractReader<List<YamlContract>>
protected String name(YamlContract contract)
protected byte[] getBytes(YamlContract yamlContract)
Copyright © 2016–2021 Spring. All rights reserved.