libopenapi-validator icon indicating copy to clipboard operation
libopenapi-validator copied to clipboard

Redundant bool return in Validation functions

Open nickajacks1 opened this issue 2 years ago • 1 comments

The validation functions return both a bool and error(s). It leads to simpler code to simply ignore the returned bool and check for len(errs) > 0 or err != nil I suggest dropping the returned bool for the next breaking change unless there's some other purpose for it that I've missed

nickajacks1 avatar Oct 01 '23 19:10 nickajacks1

Good idea, it does seem redundant as an API design.

daveshanley avatar Oct 07 '23 12:10 daveshanley