Skip to content

[C#] Property name "Equals" causes compiler warning for NOTION.COM #8133

Closed

Description

While experimenting with the idea to set TreatWarningsAsErrors in the integration tests, I found this problem:

The NOTION.COM api description contains this definition - see the property named equals:

  "checkboxPropertyFilter": {
    "anyOf": [
      {
        "type": "object",
        "properties": {
          "equals": {
            "type": "boolean"
          }
        },
        "required": ["equals"]
      },
      {
        "type": "object",
        "properties": {
          "does_not_equal": {
            "type": "boolean"
          }
        },
        "required": ["does_not_equal"]
      }
    ]
  },

This results in this code:

  public partial class CheckboxPropertyFilterMember1 : IAdditionalDataHolder, IParsable
  {
      /// <summary>The equals property</summary>
      public bool? Equals { get; set; }

And this brings this warning:
'CheckboxPropertyFilterMember1.Equals' hides inherited member 'object.Equals(object?)'. Use the new keyword if hiding was intended.

This problem happens 67 times.

I will try to find a workaround, but it might be tricky...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triage

    Type

    No type

    Projects

    • Status
      Done ✔️

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions