Skip to content

Conversation

L2jLiga
Copy link
Contributor

@L2jLiga L2jLiga commented Oct 18, 2021

This PR handle one of the cases mentioned in this issue #181

Checklist

index.js Outdated
return code
}

const functionsWithReferenceCode = new Map()
Copy link
Member

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.

Copy link
Contributor Author

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' }
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit e35c261 into master Oct 19, 2021
@L2jLiga L2jLiga deleted the basic-recursion-support branch October 19, 2021 22:01
@Relequestual Relequestual mentioned this pull request Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants