Schema
The Edoxen schema is published as a JSON Schema (Draft 7) YAML file in schema/edoxen.yaml in the Ruby gem repo.
Loading
ruby
require 'json_schemer'
require 'yaml'
schema = YAML.safe_load(File.read('schema/edoxen.yaml'))
schemer = JSONSchemer.schema(schema)
data = YAML.safe_load(File.read('resolutions/ciml-39-decisions.yaml'))
errors = schemer.validate(data).to_a
puts errors.empty? ? 'VALID' : errors.map { |e| e['data_pointer'] }CLI
sh
edoxen validate resolutions/*.yamlKey invariants enforced
- A
ResolutionSetmust have a non-emptyresolutionsarray. - Every
Resolutionmust have anidentifierand at least onelocalizations[]entry. - Every
Localizationmust have alanguage_codematching^[a-z]{3}$(ISO 639-3). Action.type,Consideration.type,Approval.type,Approval.degree,ResolutionDate.kindare enum-restricted.source_urls[].refis required.- Per-object
additionalProperties: falsekeeps the wire shape minimal — typos surface as schema errors, not silent ignores.
Schema extension points
To customize Edoxen for your organization, fork the schema and either:
- Extend the
Action.type/Consideration.typeenum. - Add new
ResolutionDate.kindvalues. - Add custom
metadata.*fields (and dropadditionalProperties: falseon the metadata object).