we have e.g. (new Tapir{}.emptyIO == new Tapir{}.emptyIO) == false
This is obviously a synthetic example but a more general question is IMO valid: given that EndpointIOs are case classes, EndpointIO.Info is a case class, Schema is a case class, CodecFormats are case classes, do you think an e.g. Codec.id (which is a product of a Schema and a CodecFormat) could be structurally comparable as well?
Since encoding/decoding functions are involved, any equality would be accidental anyway. That is, you can always create an “identical” codec but with a different instance of the e.g. id function. So this might be misleading. Even in the schema, there are functions: validators, coproduct projections etc.
My use-case was basically doing some endpoint analysis where i was filtering with sth along the lines of
.filterNot(_.securityInput == emptyInput)
which unexpectedly (for me) failed when i started declaring endpoints in a class that did extends Tapir (regardless of how smart is that, i mean… it’s public so why not :D)
So basically was just looking to get only endpoints that were declaring securityInput and stumbled over universal equality.