MNX Document Model
Loading...
Searching...
No Matches
mnx::validation Namespace Reference

provides schema- and semantic-level validation functions for MNX documents More...

Classes

struct  SemanticValidationResult
 Returns the results of semantic validation. More...
 
struct  ValidationResult
 Encapsulates a schema validation result. More...
 

Functions

ValidationResult schemaValidate (const Document &document, const std::optional< std::string > &jsonSchema=std::nullopt)
 Validates a document against a JSON schema.
 
SemanticValidationResult semanticValidate (const Document &document)
 Validates the semantics of the input MNX document.
 

Detailed Description

provides schema- and semantic-level validation functions for MNX documents

Function Documentation

◆ schemaValidate()

ValidationResult mnx::validation::schemaValidate ( const Document document,
const std::optional< std::string > &  jsonSchema = std::nullopt 
)

Validates a document against a JSON schema.

Parameters
documentThe mnx::Document to validate
jsonSchemaThe JSON schema to validate against, or std::nullopt for the embedded schema
Returns
validation result

◆ semanticValidate()

SemanticValidationResult mnx::validation::semanticValidate ( const Document document)

Validates the semantics of the input MNX document.

Parameters
documentThe document to validate
Returns
validation result