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

Fixes type resolution in discriminator functions in .Net #1673

Merged
merged 3 commits into from
Jun 28, 2022

Conversation

andrueastman
Copy link
Member

This PR closes #1670

Changes include : -

  • Update the TranslateTypeAndAvoidUsingNamespaceSegmentNames method for scenarios where the types referenced would have similar names but exist in different namespaces.
  • Update the dotnet code method writer to use the GetTypeString method to ensure the type name used is properly disambiguated.
  • Ensures the right namespace is calculated via GetShortestNamespace when generating new types through the discriminator mappings.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

81.8% 81.8% Coverage
0.0% 0.0% Duplication

@andrueastman andrueastman self-assigned this Jun 28, 2022
@andrueastman andrueastman merged commit 2516dc5 into main Jun 28, 2022
@andrueastman andrueastman deleted the andrueastman/FixBetaGeneration branch June 28, 2022 16:34
@andrueastman
Copy link
Member Author

Thanks @baywet

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.

CSharp generator type references doesn't disambiguate with namespaces in some cases
2 participants