-
-
Notifications
You must be signed in to change notification settings - Fork 208
support for recursion in arrays #363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
index.js
Outdated
return code | ||
} | ||
|
||
const functionsWithReferenceCode = new Map() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This map must be cleared after each code generation, otherwise we will leak memory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sure, yes, my bad. Will fix that
} | ||
}, | ||
type: 'array', | ||
items: { $ref: '#/definitions/directory' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test using external schemas?
I think a map track only one ref when there are conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed issue with conflicts and added corresponding tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This PR handle one of the cases mentioned in this issue #181
Checklist
npm run test
andnpm run benchmark
and the Code of conduct