Implement IEquatable/ICloneable for all classes in the model hierarchy?
Hi,
I'm having quite some issues with comparing OpenApiSchema objects to other ones. My workaround for now is to create Extension Methods to compare the hierarchy against another one. (Which leads to a different set of problems)
What are your thoughts about implenting at least IEquatable<T|OpenApiSchema> for OpenApiSchema to allow this?
Kind regards & thanks for your work Olli
Edit: Same goes for Cloneable as well. Edit2: I'm dumb Edit3: Is there any intention I'm not seeing why this was left out? What I'm seeing, it should be possible to create a generic implementation for equals and clone for the time being.
This sounds like a great idea to me. ICloneable would be really useful. IEquatable is partially useful. We already have two submissions for comparison capabilities. I want to be really careful about creating even more code to maintain.
Would a comparision capability meet your needs for IEquatable?
Comparison is totally enough.
I quickly looked through some of the classes, is there any suggested approach of how to implement ICloneable? For the model I think it should be mostly straight forward, but the Any models (IOpenApiAny) could be a bit trickier.
I will try to create a feat branch today and see how it's going.
Ugh, I really don't like those OpenApiAny things. I'll take a look and see if I have any suggestions.