[ https://issues.apache.org/jira/browse/AVRO-1274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639516#comment-13639516 ]
Scott Carey commented on AVRO-1274: ----------------------------------- This looks good. Minor nit: perhaps change defaultValue( val) to default(val) for brevity and alignment with the name of the property in json. Minor concern: How does this API deal with names that are the full name? For example, the two below should be the same: {code} SchemaBuilder.recordType("myrecord").namespace("org.example").build(); SchemaBuilder.recordType("org.example.myrecord").build() {code} But we should document the behavior when mixing the two: {code} SchemaBuilder.recordType("org.example1.myrecord").namespace("org.example2").build(); {code} It would be nice if the builder API behaved consistent with the schema parser when provided similar information: {"type": "record", "name":"org.example1.myrecord", "namespace":"org.example2"} In part because if the builder API was in sync with the parser, we could use it in the parser, simplifying the parser and making behavior consistent. > Add a schema builder API > ------------------------ > > Key: AVRO-1274 > URL: https://issues.apache.org/jira/browse/AVRO-1274 > Project: Avro > Issue Type: New Feature > Components: java > Reporter: Tom White > Assignee: Tom White > Attachments: AVRO-1274.patch, AVRO-1274.patch, AVRO-1274.patch, > AVRO-1274.patch, AVRO-1274.patch, AVRO-1274.patch, TestDefaults.patch > > > It would be nice to have a fluent API that made it easier to construct record > schemas. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira