diff --git a/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs b/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs index d792bd2817..553b727766 100644 --- a/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs +++ b/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs @@ -186,7 +186,7 @@ current.Parent is CodeClass parentClass && ReturnType = (CodeTypeBase)currentProperty.Type.Clone(), Documentation = new() { - Description = $"Gets the {currentProperty.Name} property value. {currentProperty.Documentation.Description}", + Description = $"Gets the {currentProperty.WireName} property value. {currentProperty.Documentation.Description}", }, AccessedProperty = currentProperty, Deprecation = currentProperty.Deprecation, @@ -200,7 +200,7 @@ current.Parent is CodeClass parentClass && Kind = CodeMethodKind.Setter, Documentation = new() { - Description = $"Sets the {currentProperty.Name} property value. {currentProperty.Documentation.Description}", + Description = $"Sets the {currentProperty.WireName} property value. {currentProperty.Documentation.Description}", }, AccessedProperty = currentProperty, ReturnType = new CodeType diff --git a/src/Kiota.Builder/Refiners/JavaRefiner.cs b/src/Kiota.Builder/Refiners/JavaRefiner.cs index 33e63c41b7..a520c844db 100644 --- a/src/Kiota.Builder/Refiners/JavaRefiner.cs +++ b/src/Kiota.Builder/Refiners/JavaRefiner.cs @@ -256,9 +256,10 @@ private static void AddEnumSetImport(CodeElement currentElement) private const string MultipartBodyClassName = "MultipartBody"; private static void CorrectCommonNames(CodeElement currentElement) { - if (currentElement is CodeMethod m) + if (currentElement is CodeMethod m && + currentElement.Parent is CodeClass parentClass) { - m.Name = m.Name.ToFirstCharacterLowerCase(); + parentClass.RenameChildElement(m.Name, m.Name.ToFirstCharacterLowerCase()); } else if (currentElement is CodeIndexer i) {