use of com.linkedin.data.schema.AbstractSchemaParser in project rest.li by linkedin.
the class PdlEncoderTest method parseSchema.
private DataSchema parseSchema(String text, String name) throws IOException {
DataSchemaResolver resolver = MultiFormatDataSchemaResolver.withBuiltinFormats(pegasusSrcDir.getAbsolutePath());
AbstractSchemaParser parser = new PdlSchemaParser(resolver);
parser.parse(text);
return extractSchema(parser, name);
}
use of com.linkedin.data.schema.AbstractSchemaParser in project rest.li by linkedin.
the class PdlEncoderTest method parseSchema.
private DataSchema parseSchema(File file) throws IOException {
DataSchemaResolver resolver = MultiFormatDataSchemaResolver.withBuiltinFormats(pegasusSrcDir.getAbsolutePath());
AbstractSchemaParser parser = new PdlSchemaParser(resolver);
parser.parse(new FileInputStream(file));
return extractSchema(parser, file.getAbsolutePath());
}
Aggregations