Skip to content

Commit

Permalink
Updated Schema.js to lookup shared schemas by fully qualified name
Browse files Browse the repository at this point in the history
Shared lookup fails in the case that two Avro records have the
same namespace and the referrer defines the referent's name without using
a fully qualified name. This resolves the issue by using the
referent's fully qualified name for the lookup.
  • Loading branch information
crimsonmagick committed May 20, 2023
1 parent 85afbe8 commit 6450b47
Show file tree
Hide file tree
Showing 2 changed files with 1,043 additions and 1,223 deletions.
2 changes: 1 addition & 1 deletion public/js/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ AvroDoc.Schema = function (avrodoc, shared_types, schema_json, filename) {
return type;
} else if (hasOwnPropertyS(shared_types, qualifiedNameStr)) {
const sharedType = shared_types[qualifiedNameStr].find(
(sharedSchema) => sharedSchema.qualified_name === name
(sharedSchema) => sharedSchema.qualified_name === qualifiedNameStr
);

if (sharedType) {
Expand Down
Loading

0 comments on commit 6450b47

Please sign in to comment.