-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating default parsing in AvscParser (#546)
* Default for a node can be processed if its type is union and first element of union is resolved. * Updated processing of defaults to be done after resolution of schemas in the same file is complete. Added UT * fix checkstyle * refactor logic * unnecessary continue removed
- Loading branch information
Showing
3 changed files
with
152 additions
and
14 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
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
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,89 @@ | ||
{ | ||
"type": "record", | ||
"name": "RecursiveRefUnion", | ||
"namespace": "com.test", | ||
"doc": "Top record", | ||
"fields": [ | ||
{ | ||
"name": "innerField2", | ||
"type": [ | ||
"null", | ||
{ | ||
"type": "record", | ||
"name": "NestedType2", | ||
"doc": "", | ||
"fields": [ | ||
{ | ||
"name": "innerField3", | ||
"type": { | ||
"type": "record", | ||
"name": "NestedType3", | ||
"fields": [ | ||
{ | ||
"name": "innerField4", | ||
"type": [ | ||
"null", | ||
"NestedType2" | ||
], | ||
"doc": "", | ||
"default": null | ||
}, | ||
{ | ||
"name": "innerField5", | ||
"type": { | ||
"type": "record", | ||
"name": "NestedType4", | ||
"fields": [ | ||
{ | ||
"name": "innerField6", | ||
"type": [ | ||
"null", | ||
"NestedType2" | ||
], | ||
"doc": "!!!!", | ||
"default": null | ||
}, | ||
{ | ||
"name": "innerField7", | ||
"type": [ | ||
"null", | ||
{ | ||
"type": "record", | ||
"name": "NestedType5", | ||
"doc": "", | ||
"fields": [ | ||
{ | ||
"name": "field", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
], | ||
"doc": "", | ||
"default": null | ||
} | ||
] | ||
}, | ||
"doc": "." | ||
}, | ||
{ | ||
"name": "innerField8", | ||
"type": [ | ||
"null", | ||
"NestedType5" | ||
], | ||
"doc": "!!!!", | ||
"default": null | ||
} | ||
] | ||
}, | ||
"doc": "." | ||
} | ||
] | ||
} | ||
], | ||
"doc": "", | ||
"default": null | ||
} | ||
] | ||
} |