Skip to content

Commit

Permalink
Merge pull request #88 from microsoft/bugfix/empty-class-name
Browse files Browse the repository at this point in the history
- fixes #70 a bug where empty class names would make the generation fail
  • Loading branch information
baywet authored Apr 9, 2021
2 parents 3193b29 + ad2014f commit 9d23470
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private static CodeTypeBase ConvertUnionTypeToWrapper(CodeClass codeClass, CodeU
}
protected void MoveClassesWithNamespaceNamesUnderNamespace(CodeElement currentElement) {
if(currentElement is CodeClass currentClass &&
!string.IsNullOrEmpty(currentClass.Name) &&
currentClass.Parent is CodeNamespace parentNamespace) {
var childNamespaceWithClassName = parentNamespace.InnerChildElements
.OfType<CodeNamespace>()
Expand Down

0 comments on commit 9d23470

Please sign in to comment.