This is the official EXPRESS Language Foundation schemas site.
This repository contains formal schema definitions for ELF-published formats and specifications.
The EXPRESS schema manifest is defined in ELF 5004.
Schema definitions for EXPRESS schema manifest:
-
Schema Manifest v1 - Defines structure for listing EXPRESS schemas and their locations
The EXPRESS changes file is defined in ELF 5005.
Schema definitions for EXPRESS changes tracking:
-
Schema Changes v1 - Records modifications to EXPRESS schema structure across versions
-
Mapping Changes v1 - Records modifications to EXPRESS schema mappings across versions
These schemas are defined using JSON Schema (draft-07) and can be used to:
-
Validate EXPRESS changes YAML files
-
Generate documentation
-
Build tooling for working with EXPRESS change records
-
Ensure consistency across EXPRESS change specifications
Depending on the editor or tool you are using, the schemas can be referenced directly via their URLs.
The yaml-language-server comment line can be configured to use these schemas
for YAML files.
This syntax was originally defined by RedHat for YAML schema validation, and has been adopted by Visual Studio Code and other editors that support the Language Server Protocol.
This schema can be used for validation by inserting the following comment line at the beginning of the YAML file.
Syntax:
# yaml-language-server: $schema=https://www.expresslang.org/schemas/{schema_path}Where,
{schema_path}-
is the path to the schema file relative to the root of this repository.
# yaml-language-server: $schema=https://www.expresslang.org/schemas/changes/v1/schema_changes.yamlThe YAML root $schema property can be included directly in the YAML file to
specify the schema to be used for validation.
While semantically correct, this approach is unfortunately not as widely supported by editors and tools as the comment line method.
These schemas can be used for programmatic validation of EXPRESS Changes YAML files using any JSON Schema validation library that supports draft-07.
In Ruby, the json-schema gem can be used as follows:
require 'yaml'
require 'json-schema'
schema = YAML.load_file('path/to/schema_changes.yaml')
data = YAML.load_file('path/to/changes.yaml')
JSON::Validator.validate!(schema, data)In Python, the jsonschema package can be used as follows:
import yaml
import jsonschema
with open('path/to/schema_changes.yaml') as schema_file:
schema = yaml.safe_load(schema_file)
with open('path/to/changes.yaml') as data_file:
data = yaml.safe_load(data_file)
jsonschema.validate(instance=data, schema=schema)In JavaScript, the ajv package can be used as follows:
const fs = require('fs');
const Ajv = require('ajv');
const ajv = new Ajv();
const schema = JSON.parse(fs.readFileSync('path/to/schema_changes.json'));
const data = JSON.parse(fs.readFileSync('path/to/changes.json'));
ajv.validate(schema, data);To contribute to these schemas, please submit a pull request to the schemas repository.