Commit e3b815f
committed
docs: Fix config schema
It seems like jsonschema2md ironically doesn't validate the schema of the input
it receives. :)
It fails horribly with:
```
file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:697
...schema[keyword`examples`].map((example) => paragraph(code('yaml', yaml.dump(example, undefined, 2)))),
^
TypeError: schema[keyword].map is not a function or its return value is not iterable
at makeexamples (file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:697:38)
at file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:762:14
at Array.map (<anonymous>)
at makeproplist (file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:750:54)
at file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:831:16
at Array.map (<anonymous>)
at makedefinitions (file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:818:10)
at file:///home/cklein/elastisys/welkin/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:888:10
at /home/cklein/elastisys/welkin/node_modules/ferrum/src/sequence.js:1234:12
at /home/cklein/elastisys/welkin/node_modules/ferrum/src/sequence.js:807:5
```
I added `console.log(schema[keyword`examples`]);` before the failing line and,
long story short, it seems like jsonschema2md expects a list of examples and not
a string.1 parent 1bc3731 commit e3b815f
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4283 | 4283 | | |
4284 | 4284 | | |
4285 | 4285 | | |
4286 | | - | |
| 4286 | + | |
| 4287 | + | |
4287 | 4288 | | |
4288 | 4289 | | |
4289 | 4290 | | |
| |||
0 commit comments