openapiv3
openapiv3 copied to clipboard
Derive `Hash` for all types
Would be very handy to allow for them to be stored as keys in Hash{Map,Set}
s.
In addition to Hash
I think you'd need Eq
which can't be derived in particular because NumberType
contains f64
s that don't implement Eq
. I'm planning on closing this in the next few days, but even if you get back here and it's closed I would invite comments or suggestions to satisfy your use case. If you don't get a response, feel free to open a new issue and my apologies if it seems like this was closed prematurely!
you could use something like https://docs.rs/ordered-float/latest/ordered_float/ for NumberType
, i don't think NaN is valid in an openapi spec anyways(?)
I think that equality issues aren't limited to NaN
s