C#: rename property 'Equals' - #8134
Open
Wolfgang Knauf (WolfgangHG) wants to merge 1 commit into
Open
Conversation
Wolfgang Knauf (WolfgangHG)
force-pushed
the
equals
branch
from
September 2, 2026 20:13
f7b46fa to
1e5204a
Compare
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Thank you for the contribution
| ### Changed | ||
|
|
||
| - Ruby: a model sharing its name with a sibling namespace had the disambiguation suffix applied once per reference to it rather than once, so generation failed with `The element to rename was not found available_phone_number_countryModelModelModelModel`. The reference pass was removed: `CodeType.Name` already delegates to the type definition, so references follow the rename on their own. Un-suppresses the Twilio integration and idempotency tests. [kiota-abstractions-ruby#66](https://github.com/microsoft/kiota-abstractions-ruby/issues/66) | ||
| - C#: create property "EqualsEscaped" instead of "Equals" for model properties "equals" to avoid a compiler warning [#8133](https://github.com/microsoft/kiota/issues/8133) |
There was a problem hiding this comment.
Update your pull request and move to the unreleased section. We're in the process of releasing.
| { | ||
| private readonly Lazy<HashSet<string>> _reservedNames = new(static () => new(StringComparer.OrdinalIgnoreCase) | ||
| { | ||
| "Equals" //warning "hides inherited member 'object.Equals(object?)'", https://github.com/microsoft/kiota/issues/8133 |
There was a problem hiding this comment.
Shouldn't get hash code and to string be in here in principle?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is attempt to resolve #8133
The NOTION.COM api contains model properties
equalsthat result in class propertyEquals, which causes a warning.This commit adds a list of reserved property names (which currently contains only
Equals). The result looks like this:Please review it thorougly, maybe my approach to add a class
CSharpReservedPropertyNamesProviderand another call toReplaceReservedNamesinCSharpRefiner.RefineAsynccould have been done better. If yes, give me feedback 😄