mirror of https://github.com/ory/kratos
GitOrigin-RevId: 27ccb2246db1502905251063a1377b203243721e |
||
|---|---|---|
| .. | ||
| fixtures | ||
| README.md | ||
| schema_test.go | ||
README.md
Schema Tests
This test works by validating cases of the payload against a schema.
To add a case, place a file in the ${schemaName}.schema.test.${success|failure} folder.
A success case should validate, a failure case should throw a validation error.
Handling of "$ref"
To allow testing definitions on their own, and reduce the size of individual cases,
every "$ref" in the schema will be replaced with "const" before validation.
This means that a case only has to define the pointer as a string. Example:
default_browser_return_url: "#/definitions/defaultReturnTo"
hooks:
- "#/definitions/selfServiceSessionRevokerHook"