Skip to content
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

fix nested enum not resolving #37

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

zsylvia-verily
Copy link
Contributor

@zsylvia-verily zsylvia-verily commented Nov 2, 2023

In utils.rs, the find_enum_by_name and find_enum_by_name_in_message functions assume the enum is the last part of the full enum path and that the rest of the enum path is the package. It does not consider that the enum may be nested within another message. This results in the plugin searching for the enum .some.package.TestMessage.TestEnum in the "package" .some.package.TestMessage which is not actually a package, and thus it does not find it.

The unit test added reproduces this issue when tested against the previous version.

NOTE: I made the decision to only support one layer of nested enum rather than infinitely nested messages and enums to keep it simpler.

Issue: #36

@rkrishnan2012
Copy link
Contributor

This fixes #38

@rholshausen rholshausen merged commit 1d8aeda into pactflow:main Nov 8, 2023
4 of 5 checks passed
@rholshausen
Copy link
Contributor

0.3.7 released

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