You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
OlliMartin
changed the title
Make OpenApiSchema partial or implement IEquatable for all classes in the model hierarchy?
Implement IEquatable/ICloneable for all classes in the model hierarchy?
Dec 14, 2020
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?
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.
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.
The text was updated successfully, but these errors were encountered: