Closed donbobbo4 closed 7 years ago
@donbobbo4 I'm afraid I don't understand your issue very well. We want to better document it (see https://github.com/apiaryio/dredd/issues/496), but Dredd goes like this:
+ Schema
section containing JSON Schema, then such schema used for validation.+ Schema
section, gavel.js takes the example and checks whether the real response has at least object properties of the same names.+ Attributes
(a.k.a MSON), then API Blueprint parser generates both example and schema and Dredd uses the generated schema for validation.As of now validation of headers is done by checking whether all documented headers are present in the real response (i.e. headers with the same names are present). Only values of headers significant for content negotiation are validated also by value.
The behavior was documented (https://github.com/apiaryio/dredd/issues/496) and there's no follow up from @donbobbo4. Closing this for now.
Testing should validate off of MSOM Properties as well as schema. Here is the current rules but think if MSOM properties are defined then it should validate schema. Apiary is already generating a schema based off of these properties.
Expectations There are some automatically-generated expectations on HTTP responses based on examples in the blueprint with the use of Gavel.js library. Please refer to Gavel rules if you want to know more.
Headers Expectations
Body Expectations