Class JsonSchemaValidationWorkflowRunner<T extends com.google.protobuf.MessageOrBuilder>

java.lang.Object
org.phenopackets.phenopackettools.validator.jsonschema.JsonSchemaValidationWorkflowRunner<T>
Type Parameters:
T - must be one of the three top-level elements of the Phenopacket schema: PhenopacketOrBuilder, FamilyOrBuilder, or CohortOrBuilder.
All Implemented Interfaces:
ValidationWorkflowRunner<T>

public class JsonSchemaValidationWorkflowRunner<T extends com.google.protobuf.MessageOrBuilder> extends Object implements ValidationWorkflowRunner<T>
Validates if given top-level element satisfies the following criteria:
  • data format requirements - for instance if the element is a valid JSON document if JSON input is provided
  • basic Phenopacket schema syntax requirements - the requirements described by the reference documentation. Absence of a required field is an ValidationLevel.ERROR and absence of a recommended field is a ValidationLevel.WARNING,
  • custom requirements - requirements provided in a JSON schema document(s) provided by the user or provided as ad hoc PhenopacketValidators.

The validation is performed in the order as outlined above. Note that the data format validation must pass in order for the latter steps to run.

Use one of JsonSchemaValidationWorkflowRunnerBuilders provided via static constructors (e.g. phenopacketBuilder()) to build the validation workflow.