ValidationResult Class

Represents the result of job/asset validation.

This class is used to organize and parse diagnostics from both client & server side before expose them. The result is immutable.

Inheritance
builtins.object
ValidationResult

Constructor

ValidationResult()

Attributes

error_messages

Return all messages of errors in the validation result.

Returns

Type Description

A dictionary of error messages. The key is the yaml path of the error, and the value is the error message.

Examples


   """For example, if repr(self) is:
   ```python
       {
           "errors": [
               {
                   "path": "jobs.job_a.inputs.input_str",
                   "message": "input_str is required",
                   "value": None,
               },
               {
                   "path": "jobs.job_a.inputs.input_str",
                   "message": "input_str must be in the format of xxx",
                   "value": None,
               },
               {
                   "path": "settings.on_init",
                   "message": "On_init job name job_b does not exist in jobs.",
                   "value": None,
               },
           ],
           "warnings": [
               {
                   "path": "jobs.job_a.inputs.input_str",
                   "message": "input_str is required",
                   "value": None,
               }
           ]
       }
       ```
       then the error_messages will be:
       ```python
       {
           "jobs.job_a.inputs.input_str": "input_str is required; input_str must be in the format of xxx",
           "settings.on_init": "On_init job name job_b does not exist in jobs.",
       }
       ```
       """

passed

Returns boolean indicating whether any errors were found.

Returns

Type Description

True if the validation passed, False otherwise.