forked from apache/avro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#2 from thiru-apache/thiru-AVRO-1723-A
Added a unit-test for forward referencing of named types
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@namespace("org.foo") | ||
protocol Import { | ||
/* Name Value record */ | ||
record ANameValue { | ||
/** the name */ | ||
string name; | ||
/** the value */ | ||
string value; | ||
/* is the value a json object */ | ||
ValueType type = "PLAIN"; | ||
} | ||
enum ValueType {JSON, BASE64BIN, PLAIN} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"protocol": "Import", | ||
"namespace": "org.foo", | ||
"types": [ | ||
{ | ||
"type": "record", | ||
"name": "ANameValue", | ||
"fields": [ | ||
{ "name":"name", "type": "string", "doc":"the name" }, | ||
{ "name": "value", "type": "string", "doc": "the value" }, | ||
{ "name": "type", "type": { "type": "enum", "name":"ValueType", "symbols": ["JSON","BASE64BIN","PLAIN"] } } | ||
] | ||
} | ||
], | ||
"messages": { } | ||
} |