6 # `document` must be a fragment of definition or structure that the input data will be matched against.
7 # `document` must exist in the Cue schema file provided (`cueSchemaFile`).
8 # The result is a script that can be used to validate the input data (JSON/YAML and more can be supported depending on Cue)
9 # against the fragment described by `document` or the whole definition.
10 # The script will be strict and enforce concrete values, i.e. partial documents are not supported.
15 writeShellScript "validate-using-cue" ''
23 ${lib.optionalString (document != null) "-d \"${document}\""}