kratos/test/schema
Jonas Hungershausen 3d0ae8373c chore: fix kratos linting issues
GitOrigin-RevId: 27ccb2246db1502905251063a1377b203243721e
2025-09-29 16:21:02 +00:00
..
fixtures ci: resolve test fixture issues (#4411) 2025-05-14 10:31:42 +02:00
README.md chore: reenable and fix schema tests (#737) 2020-10-06 15:40:56 +02:00
schema_test.go chore: fix kratos linting issues 2025-09-29 16:21:02 +00:00

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"