23andMe / Yamale

A schema and validator for YAML.
MIT License
666 stars 88 forks source link

Include external schema file #215

Closed BasSchoutenTribe closed 1 year ago

BasSchoutenTribe commented 1 year ago

Is it possible to include another external schema file into the current one without having to change the python code that executes the validation?

Background: im using Yamale from within platformio where an extra build script is added to validate yaml files against a schema configured in the projects properties file platformio.ini). The python build script to validate is generic of course, and will be the same for all projects, so i'm looking for a way to declare included files inside a schema.yaml file

something like this:

sensor:
  id: include('id')
  type: str()
  mapwithproperties: include('schemafile2.yml/propertiesmap')
---
id: int(min=0, max=255)
cblakkan commented 1 year ago

It's not currently possible to do this