We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 457f6fd commit 2127299Copy full SHA for 2127299
docs/user_docs/support/faq-kcl.md
@@ -2586,3 +2586,17 @@ The command to validate the JSON data below gives the output `Validate success!`
2586
```bash
2587
kcl vet data.json schema.k
2588
```
2589
+
2590
+## 63. How can i extend an array's default value in a given schema?
2591
2592
+We use the += operator to extend the default values in an array.
2593
2594
+```KCL
2595
+schema MyApp:
2596
+ args: [str] = ["default", "args"]
2597
2598
+app = MyApp {
2599
+ args += ["additional", "args"]
2600
+}
2601
+```
2602
0 commit comments