go-openapi / validate

openapi toolkit validation helpers
Apache License 2.0
115 stars 53 forks source link

Better advertising of $ref sibling issues #52

Open fredbi opened 6 years ago

fredbi commented 6 years ago

When writing yaml specs, indentation does matter.

It is vey easy to mismatch a $ref into a sibling object.

In that case, the parser overrides the schema by the $ref, which is correct behavior.

Often, valid vs invalid differ by only a few blanks.

Currently, the validator follows the parsed schema. Most likely, we get some difficult to understand errors such as 'xxx in body does not validate OneOf()' ... I found very frustrating to plow specs for hours to eventually figure out the problem.

Todo:

alexstojda commented 5 years ago

@fredbi any progress on this?

fredbi commented 5 years ago

no I've very much busy patching up some other sides of go-openapi