-
Notifications
You must be signed in to change notification settings - Fork 31
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 importing nested model files #1548
Conversation
CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs
Outdated
Show resolved
Hide resolved
CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs
Outdated
Show resolved
Hide resolved
CodeSnippetsReflection.OpenAPI/LanguageGenerators/GoGenerator.cs
Outdated
Show resolved
Hide resolved
public HashSet<String> GetReferencedNamespaces(Boolean shimmedMePackage = false) | ||
{ | ||
|
||
HashSet<String> result = new HashSet<string>(); |
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.
Does casing matter here?
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.
If it doesn't, you can prevent potential duplicate entries due to different casing
HashSet<String> result = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
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.
approving to avoid blocking this PR while I'm gone but I haven't had time to review the latest changes. Please have somebody else review it
public HashSet<String> GetReferencedNamespaces(Boolean shimmedMePackage = false) | ||
{ | ||
|
||
HashSet<String> result = new HashSet<string>(); |
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.
If it doesn't, you can prevent potential duplicate entries due to different casing
HashSet<String> result = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
Kudos, SonarCloud Quality Gate passed! |
Overview
Fixes import statements for go imports in nested builder folders
Fixes microsoftgraph/msgraph-sdk-go#474
Demo
E.g creating worklow https://learn.microsoft.com/en-us/graph/api/identitygovernance-lifecycleworkflowscontainer-post-workflows?view=graph-rest-beta&tabs=go
Current
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models//identityGovernance"
//other-imports
)
Fix
Testing Instructions
Added unit tests