public class YamlValidator extends Object
| Constructor and Description |
|---|
YamlValidator() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
parse(File file,
InputStream isSchema,
Class<T> type)
Parse the yaml
file to required DTO type using jackson library. |
public static <T> T parse(File file, InputStream isSchema, Class<T> type) throws IOException
file to required DTO type using jackson library.
Before parsing the input file, schema validation will be done to validate the file syntax.T - Jackson object model to parse the yaml contentfile - yaml file to be parsedisSchema - json schema definition to be used for schema validationtype - Jackson object model to parse the yaml contentIOException - when failed to read input filesCopyright © 2019 WSO2. All rights reserved.