diff --git a/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs b/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs index 60db9b957d..9402676257 100644 --- a/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs +++ b/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs @@ -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()