Implement equality (`IEquatable<T>` and override object.Equals/GetHashCode) for object models

Open
#2,989 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
csharp, openapi

Research direction

Start by surveying the OpenAPI object model types, beginning with OpenApiSchema, and determine which models are in scope. Define the expected equality and hashing behavior before implementation; done means the intended object models support the requested comparisons with coverage for the behavior.

Written by the indexing model from the issue text.

Description

help wanted

I want to be able to compare two different OpenApiSchema instances for equality. I think it would make sense to implement equality on all object model types so that they implement IEquatable<T> and override object.Equals and GetHashCode methods.

Dominant language
C#
Stars
1.6k
Forks
286
Avg merge
6h 38m
Merged PRs (30d)
35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/OpenAPI.NET

All issues in microsoft/OpenAPI.NET

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.