Skip to content

Commit 860152d

Browse files
fix: template uses anonymous schema name when object type is unknown (#296)
* fix: Throw error when schema type is unknown instead of setting to the x-schema-parser-id * chore: remove comments
1 parent ea82761 commit 860152d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

filters/all.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,7 @@ function fixType([name, javaName, property]) {
340340
// Picking a type for the user may be difficult - especially since the first avro union value must be the default value which is normally of type null.
341341
typeName = 'Object';
342342
} else {
343-
// check to see if it's a ref to another schema.
344-
typeName = property.ext('x-parser-schema-id');
345-
346-
if (!typeName) {
347-
throw new Error(`Can't determine the type of property ${ name}`);
348-
}
343+
throw new Error(`Can't determine the type of property ${ name }`);
349344
}
350345
} else if (type === 'array') {
351346
if (!property.items()) {

0 commit comments

Comments
 (0)