use of com.fasterxml.jackson.core.FormatSchema in project camel-kamelets by apache.
the class InflightAvroSchemaResolver method resolve.
@Override
public FormatSchema resolve(Exchange exchange) {
String schemaJson = (String) exchange.getProperty("schema");
Boolean validate = Boolean.valueOf((String) exchange.getProperty("validate"));
Schema raw = new Schema.Parser().setValidate(validate).parse(schemaJson);
AvroSchema schema = new AvroSchema(raw);
return schema;
}
Aggregations