File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 3
3
To get the best experience when working with Context Generator configuration files, you can use the JSON schema for
4
4
autocompletion and validation in your IDE:
5
5
6
+ ## Using schema definition in configuration files
7
+
8
+ The easiest way to enable IDE validation and autocompletion is to define the ` $schema ` property directly in your
9
+ configuration file. This approach works in most modern IDEs without requiring additional setup.
10
+
11
+ ### YAML Configuration with Schema
12
+
13
+ ``` yaml
14
+ $schema : ' https://raw.githubusercontent.com/context-hub/generator/refs/heads/main/json-schema.json'
15
+ documents :
16
+ ...
17
+ ` ` `
18
+
19
+ ### JSON Configuration with Schema
20
+
21
+ ` ` ` json
22
+ {
23
+ " $schema " : " https://raw.githubusercontent.com/context-hub/generator/refs/heads/main/json-schema.json" ,
24
+ " documents " : [
25
+ ...
26
+ ]
27
+ }
28
+ ```
29
+
30
+ > ** Note:** ` ctx init ` commands will automatically add the ` $schema ` property to generated configuration files.
31
+
32
+ This approach eliminates the need for manual schema downloads or complex IDE configurations, making it the recommended
33
+ method for integrating schema validation into your workflow.
34
+
6
35
## Download the schema
7
36
8
37
``` bash
You can’t perform that action at this time.
0 commit comments