Skip to content

Commit

Permalink
RE: fix primitive types definitions handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mtseluiko committed Jan 20, 2021
1 parent bc5c30c commit 271f11e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reverse_engineering/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const handleType = (data, schema, parentSchema, definitions) => {
if (Array.isArray(data.type)) {
schema = handleMultipleTypes(data, schema, parentSchema, definitions);
} else if (typeof data.type === 'object') {
if (data.type.name) {
if (data.type.name && ['record', 'enum', 'fixed'].includes(data.type.type)) {
data.type = addDefinitions([data.type], definitions).pop();

handleRecursiveSchema(data, schema, {}, definitions);
Expand Down

0 comments on commit 271f11e

Please sign in to comment.