Class JsonSchemaInferencer
java.lang.Object
com.shaft.capture.generate.api.JsonSchemaInferencer
Infers a standard (draft-04-compatible) JSON Schema document from one recorded sample response
body, for use with
SHAFT.API's assertThatResponse().matchesSchema(path), which
is backed by REST-Assured's io.restassured.module.jsv.JsonSchemaValidator.
Since a schema is inferred from exactly one recorded sample, every key observed on an object
is marked required -- this is deliberately strict (a real endpoint may omit optional
keys on other calls) but matches what was actually recorded; nothing here invents fields that
were never observed.
-
Method Summary
-
Method Details
-
infer
-