Defined in: packages/core/src/utils/JsonSchemaValidator.ts:34
Constructors
Constructor
new JsonSchemaValidator():
JsonSchemaValidator
Returns
JsonSchemaValidator
Methods
validate()
static
validate(jsonMapping
,expectedStructure
):ValidationResult
Defined in: packages/core/src/utils/JsonSchemaValidator.ts:43
Validates JsonMapping structure against an expected type structure. Checks if the JsonMapping covers all required properties and relationships.
Parameters
jsonMapping
The JsonMapping configuration to validate
expectedStructure
The expected type structure to validate against
Returns
ValidationResult containing validation status and detailed errors
validateStrict()
static
validateStrict(jsonMapping
,expectedStructure
):void
Defined in: packages/core/src/utils/JsonSchemaValidator.ts:59
Validates JsonMapping structure and throws an error if validation fails. Convenience method for strict validation scenarios.
Parameters
jsonMapping
The JsonMapping configuration to validate
expectedStructure
The expected type structure to validate against
Returns
void
Throws
Error if validation fails with detailed error messages
validateAgainstSample()
static
validateAgainstSample<T
>(jsonMapping
,sampleObject
):ValidationResult
Defined in: packages/core/src/utils/JsonSchemaValidator.ts:220
Validates JsonMapping structure against a sample object that implements the expected type. This method extracts structure from the sample object and compares it with JsonMapping.
Type Parameters
T
T
Parameters
jsonMapping
The JsonMapping configuration to validate
sampleObject
T
A sample object that implements the expected interface/type
Returns
ValidationResult containing validation status and detailed errors
validateAgainstSampleStrict()
static
validateAgainstSampleStrict<T
>(jsonMapping
,sampleObject
):void
Defined in: packages/core/src/utils/JsonSchemaValidator.ts:236
Validates JsonMapping structure against a sample object and throws an error if validation fails. Convenience method for strict validation scenarios with sample objects.
Type Parameters
T
T
Parameters
jsonMapping
The JsonMapping configuration to validate
sampleObject
T
A sample object that implements the expected interface/type
Returns
void
Throws
Error if validation fails with detailed error messages