Skip to content

Commit 5b453bf

Browse files
authored
Merge pull request #260 from ssbarnea/master
Improved documentation on schema configuration
2 parents 093c7f3 + 873f73e commit 5b453bf

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

README.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -76,41 +76,42 @@ some_mapping: !Mapping-example
7676
yaml.schemas applies a schema to a file. In other words, the schema (placed on the left) is applied to the glob pattern on the right. Your schema can be local or online. Your schema must be a relative path and not an absolute path.
7777
7878
When associating a schema it should follow the format below
79-
```
80-
yaml.schemas: {
79+
```JSON
80+
"yaml.schemas": {
8181
"url": "globPattern",
8282
"Kubernetes": "globPattern",
83-
"kedge": "globPattern"
83+
"kedge": ["globPattern", "globPattern2"]
8484
}
8585
```
8686

8787
e.g.
88-
```
89-
yaml.schemas: {
90-
"http://json.schemastore.org/composer": "/*",
91-
"../relative/path/schema.json": "/config*.yaml",
88+
```JSON
89+
"yaml.schemas": {
90+
"http://json.schemastore.org/composer": ["/*"],
91+
"file:///home/johnd/some-schema.json": ["some.yaml"],
92+
"../relative/path/schema.json": ["/config*.yaml"],
9293
}
9394
```
9495

9596
e.g.
9697

97-
```
98-
yaml.schemas: {
99-
"kubernetes": "/myYamlFile.yaml"
98+
```JSON
99+
"yaml.schemas": {
100+
"kubernetes": ["/myYamlFile.yaml"]
100101
}
101102
```
102103
e.g.
103-
```
104-
yaml.schemas: {
105-
"kedge": "/myKedgeApp.yaml"
104+
```JSON
105+
"yaml.schemas": {
106+
"kedge": ["/myKedgeApp.yaml"]
106107
}
107108
```
108109

109110
e.g.
110-
```
111-
yaml.schemas: {
112-
"http://json.schemastore.org/composer": "/*",
113-
"kubernetes": "/myYamlFile.yaml"
111+
```JSON
112+
"yaml.schemas": {
113+
"http://json.schemastore.org/composer": ["/*"],
114+
"kubernetes": ["/myYamlFile.yaml"]
114115
}
115116
```
116117

0 commit comments

Comments
 (0)