Merge branch 'master' of github.com:backstage/backstage into rugvip/exts

* 'master' of github.com:backstage/backstage:
  docs: show how to assign annotations to primitive array item types in config schema
  Add missing IncludeSecret type
  Update .changeset/friendly-numbers-accept.md
  Add documentation for config $include
  Added changeset for config $include
  Add deprecation notice to $data
  Config: Add $include which replaces $data and can include any value
This commit is contained in:
blam
2021-01-05 10:00:53 +01:00
7 changed files with 114 additions and 13 deletions
+20
View File
@@ -0,0 +1,20 @@
---
'@backstage/config-loader': patch
---
Deprecate `$data` and replace it with `$include` which allows for any type of json value to be read from external files. In addition, `$include` can be used without a path, which causes the value at the root of the file to be loaded.
Most usages of `$data` can be directly replaced with `$include`, except if the referenced value is not a string, in which case the value needs to be changed. For example:
```yaml
# app-config.yaml
foo:
$data: foo.yaml#myValue # replacing with $include will turn the value into a number
$data: bar.yaml#myValue # replacing with $include is safe
# foo.yaml
myValue: 0xf00
# bar.yaml
myValue: bar
```