Closed Heanthor closed 7 years ago
@Heanthor Unfortunately, yes, at the moment. This is a known issue:
+ Body
and let Gavel.js to generate the underlying JSON Schema for you)+ Attributes
and let Drafter to generate the underlying JSON Schema for you) UPDATE: resolved! 🎉As a workaround, you can:
+ Schema
section with your own JSON Schema, which will override any generation and will result in validation according to your own rules.I hope this helps!
@honzajavorek It would help if you could provide an example of the test you mention. The documentation your link points to contains nothing useful I believe
@adityasaxena You mean the + Schema
mention?
@adityasaxena I've added an example to the specification: https://github.com/apiaryio/api-blueprint/pull/385
I'm frustrated by dredd's inability to validate inside JSON arrays. My API response has the following layout:
which dredd validates by checking if "code", "status", and "data" are present. I cannot find any way to make gavel validate the contents of the "data" array. Is the only option to write custom hooks and do the work myself?