Validate Flipt flag state (.yaml, .yml) files
--extra-schema
(short form -e
) can be used to pass additional constraints via a CUE schema file.
This file will be unified with the base schema used within flipt validate
to ensure the format of Flipt files.
You can find the base schema here.
As an example, take the following flipt features.yaml
file:
description
field is not required. However, imagine that you want to ensure this field is always provided with a non-empty string. You can do this via the --extra-schema
flag and a CUE definition.
In this instance we’re going to create a CUE file named extended.cue
.
Within this file we will add a constraint to the #Flag
CUE definition, which ensures our desired behavior.