diff --git a/internal/experiments/experiments.go b/internal/experiments/experiments.go index 67088e8a..ae54b19b 100644 --- a/internal/experiments/experiments.go +++ b/internal/experiments/experiments.go @@ -20,12 +20,12 @@ import ( const envPrefix = "TASK_X_" var defaultConfigFilenames = []string{ - ".task-experiments.yml", - ".task-experiments.yaml", + ".taskrc.yml", + ".taskrc.yaml", } type ExperimentConfigFile struct { - Experiments map[string]string `yaml:",inline"` + Experiments map[string]string `yaml:"experiments"` } type Experiment struct { diff --git a/website/docs/experiments/experiments.mdx b/website/docs/experiments/experiments.mdx index b42c02d7..f8850ebf 100644 --- a/website/docs/experiments/experiments.mdx +++ b/website/docs/experiments/experiments.mdx @@ -65,8 +65,9 @@ Which method you use depends on how you intend to use the experiment: - ```yaml title=".task-experiments.yml" - X_FEATURE: 1 + ```yaml title=".taskrc.yml" + experiments: + FEATURE: 1 ``` diff --git a/website/static/schema-taskrc.json b/website/static/schema-taskrc.json new file mode 100644 index 00000000..4ed35be3 --- /dev/null +++ b/website/static/schema-taskrc.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Taskrc YAML Schema", + "description": "Schema for .taskrc files.", + "type": "object", + "properties": { + "experiments": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + }, + "additionalProperties": false +}