WikiLambda
MediaWiki WikiLambda extension
|
Static Public Member Functions | |
static | buildStructureValidationZError ( $errors) |
Root function to transform an array of Opis\JsonSchema\ValidationError objects to a root Z5/ZError object with all the nested errors identified by the built-in Z50/ZErrorTypes. | |
static | identifyNestedErrors ( $nestedErrors) |
Recursive function that walks the nested structure of errors and: | |
static | identifyError ( $error) |
Given the information provided by the JsonSchema parser about the error (keyword, keywordArgs, data and dataPointer), it tries to match an error type from the error descriptors. | |
static | flattenErrors ( $err) |
Given a nested structure of parsing errors found by json-schema, it returns a flat list of errors, with enough information to match them to error type descriptors. | |
static | errorMatchesDescriptor ( $error, $descriptor) |
static | getDataType ( $data) |
Given an error data field, which is the partial ZObject in which the error has been found, returns its data type if available. | |
static | errorMatchesType ( $error) |
Infers the type of the error data field and returns true if the missing key matches that type. | |
static | createZErrorList ( $errorList) |
Create a Z5/ZError of the type Z509/Multiple errors. | |
static | createValidationZError (ZError $childError) |
Create a Z5/ZError of the type Z502/Not wellformed. | |
static | createAuthorizationZError ( $right, $content, $flags) |
Create a Z5/ZError of the type Z502/Not wellformed. | |
static | createKeyValueZError ( $key, $childError) |
Create a Z5/ZError of the type Z526/Key not wellformed. | |
static | createArrayElementZError ( $index, $childError) |
Create a Z5/ZError of the type Z522/Array element not wellformed. | |
static | createLabelClashZErrors ( $clashes) |
Create a ZError wrapping one or more label clashing errors. | |
static | createZErrorInstance ( $zErrorType, $payload) |
Create a Z5/ZError of a given Z50/ZErrorType. | |
static | createUnknownValidationError ( $message) |
Create an unknown validation error. | |
|
static |
Root function to transform an array of Opis\JsonSchema\ValidationError objects to a root Z5/ZError object with all the nested errors identified by the built-in Z50/ZErrorTypes.
ValidationError[] | $errors |
|
static |
Create a Z5/ZError of the type Z522/Array element not wellformed.
string | $index | |
ZError | $childError |
|
static |
Create a Z5/ZError of the type Z502/Not wellformed.
string | $right | |
ZObjectContent | $content | |
int | $flags | whether is edit EDIT_UPDATE or create EDIT_NEW |
|
static |
Create a Z5/ZError of the type Z526/Key not wellformed.
string | $key | |
ZError | $childError |
|
static |
Create a ZError wrapping one or more label clashing errors.
array | $clashes |
|
static |
Create an unknown validation error.
string | $message |
|
static |
Create a Z5/ZError of the type Z502/Not wellformed.
ZError | $childError |
|
static |
Create a Z5/ZError of a given Z50/ZErrorType.
string | $zErrorType | |
array | $payload |
|
static |
Create a Z5/ZError of the type Z509/Multiple errors.
ZError[] | $errorList |
|
static |
array | $error | |
array | $descriptor |
|
static |
Infers the type of the error data field and returns true if the missing key matches that type.
array | string | $error |
|
static |
Given a nested structure of parsing errors found by json-schema, it returns a flat list of errors, with enough information to match them to error type descriptors.
ValidationError | $err |
|
static |
Given an error data field, which is the partial ZObject in which the error has been found, returns its data type if available.
array | $data |
|
static |
Given the information provided by the JsonSchema parser about the error (keyword, keywordArgs, data and dataPointer), it tries to match an error type from the error descriptors.
array | $error |
|
static |
Recursive function that walks the nested structure of errors and:
array | $nestedErrors |