[
https://issues.apache.org/jira/browse/AVRO-2299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843855#comment-17843855
]
Oscar Westra van Holthe - Kind edited comment on AVRO-2299 at 5/6/24 7:52 PM:
------------------------------------------------------------------------------
Hi everyone,
It's been a few years again, but with AVRO-3677, it's now possible to define
your own schema format. After the next release, we'll have {{{}json{}}},
{{{}json/pretty{}}}, {{{}json/inline{}}}, {{canonical}} and {{{}idl{}}}. And by
implementing an {{{}org.apache.avro.SchemaFormatterFactory{}}}, you can add any
format necessary.
Using Ryans proposal, it's probably a good idea to refactor the parsing
canonical form as a specific configuration of a more general canonical form.
This last one can then be extended/configured as a new schema format.
was (Author: opwvhk):
Hi everyone,
It's been a few years again, but with AVRO-3677, it's now possible to define
your own schema format. After the next release, we'll have {{{}json{}}},
{{{}json/pretty{}}}, {{{}json/inline{}}}, {{canonical}} and {{{}idl{}}}. And by
implementing an {{{}org.apache.avro.SchemaFormatterFactory{}}}, you can add any
format necessary.
Using Ryans proposal, it's probably a good idea to refactor the parsing
canonical form as a specific configuration of a more general canonical form.
This last one can then be extended/configured as a new schema format.
> Get Plain Schema
> ----------------
>
> Key: AVRO-2299
> URL: https://issues.apache.org/jira/browse/AVRO-2299
> Project: Apache Avro
> Issue Type: New Feature
> Components: java
> Affects Versions: 1.9.0, 1.8.2, 1.9.1
> Reporter: Rumeshkrishnan Mohan
> Assignee: Doug Cutting
> Priority: Major
> Labels: features, pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {panel:title=Avro Schema Reserved Keys:}
> "doc", "fields", "items", "name", "namespace",
> "size", "symbols", "values", "type", "aliases", "default"
> {panel}
> AVRO also supports user defined properties for both Schema and Field.
> Is there way to get the schema with reserved property (key, value)?
> Input Schema:
> {code:java}
> {
> "name": "testSchema",
> "namespace": "com.avro",
> "type": "record",
> "fields": [
> {
> "name": "email",
> "type": "string",
> "doc": "email id",
> "user_field_prop": "xxxxx"
> }
> ],
> "user_schema_prop": "xxxxxx"
> }{code}
> Expected Plain Schema:
> {code:java}
> {
> "name": "testSchema",
> "namespace": "com.avro",
> "type": "record",
> "fields": [
> {
> "name": "email",
> "type": "string",
> "doc": "email id"
> }
> ]
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)