Skip to content

Commit a9b9320

Browse files
committed
make schema schemas closed, update schemas to fix schema and schema schema bugs
1 parent eb4d08d commit a9b9320

File tree

11 files changed

+1121
-541
lines changed

11 files changed

+1121
-541
lines changed

src/resources/editor/tools/vs-code.mjs

Lines changed: 310 additions & 149 deletions
Large diffs are not rendered by default.

src/resources/editor/tools/yaml/web-worker.js

Lines changed: 310 additions & 149 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/editor/tools/yaml/yaml-intelligence-resources.json

Lines changed: 303 additions & 142 deletions
Large diffs are not rendered by default.

src/resources/schema/cell-figure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- name: fig-subcap
1919
schema:
2020
anyOf:
21-
- true
21+
- enum: [true]
2222
- maybeArrayOf: string
2323
description: Figure subcaptions
2424

src/resources/schema/cell-table.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- name: tbl-subcap
66
schema:
77
anyOf:
8-
- true
8+
- enum: [true]
99
- maybeArrayOf: string
1010
description: Table subcaptions
1111

src/resources/schema/cell-textoutput.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@
8080
tags:
8181
engine: knitr
8282
schema:
83-
anyOf:
84-
- enum: [markup, asis, hold, hide]
85-
- false
83+
enum: [markup, asis, hold, hide, false]
8684
default: markup
8785
description:
8886
short: "How to display text results"

src/resources/schema/definitions.yml

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,18 @@
144144
- photon-dark
145145
- body-light
146146
- gruvbox-dark
147-
issue-term:
148-
string:
149-
description:
150-
short: How posts should be mapped to Github issues
151-
long: |
152-
How posts should be mapped to Github issues
153-
(`pathname`, `url`, `title` or `og:title`)
154-
completions:
155-
- pathname
156-
- url
157-
- title
158-
- og:title
147+
issue-term:
148+
string:
149+
description:
150+
short: How posts should be mapped to Github issues
151+
long: |
152+
How posts should be mapped to Github issues
153+
(`pathname`, `url`, `title` or `og:title`)
154+
completions:
155+
- pathname
156+
- url
157+
- title
158+
- og:title
159159
required: [repo]
160160
giscus:
161161
object:
@@ -296,10 +296,10 @@
296296
string:
297297
description: The URL to an image for the annotation service. This image will appear to the left of the name of the currently selected group.
298298
required: [apiUrl, authority, grantToken]
299-
description: |
300-
Alternative annotation services which the client should
301-
connect to instead of connecting to the public Hypothesis
302-
service at hypothes.is.
299+
description: |
300+
Alternative annotation services which the client should
301+
connect to instead of connecting to the public Hypothesis
302+
service at hypothes.is.
303303
branding:
304304
object:
305305
properties:
@@ -445,23 +445,23 @@
445445
description: Sites published from project
446446
schema:
447447
object:
448+
closed: true
448449
properties:
449450
netlify:
450451
arrayOf:
451452
ref: publish-record
452-
description: "Sites published to Netlify"
453-
additionalProperties: false
453+
description: "Sites published to Netlify"
454454

455455
- id: publish-record
456456
object:
457+
closed: true
457458
properties:
458459
id:
459460
string:
460461
description: "Unique identifier for site"
461462
url:
462463
string:
463464
description: "Published URL for site"
464-
additionalProperties: false
465465

466466
- id: base-website
467467
object:
@@ -777,7 +777,7 @@
777777
description: "The sidebar's foreground color (named or hex color)."
778778
border:
779779
boolean:
780-
descrition: "Whether to show a border on the sidebar (defaults to true for 'docked' sidebars)"
780+
description: "Whether to show a border on the sidebar (defaults to true for 'docked' sidebars)"
781781
alignment:
782782
enum: ["left", "right", "center"]
783783
description: "Alignment of the items within the sidebar (`left`, `right`, or `center`)"
@@ -896,18 +896,20 @@
896896
anyOf:
897897
- ref: navigation-item
898898
- object:
899-
part:
900-
string:
901-
description: "Part title or path to input file"
902-
chapters:
903-
arrayOf:
904-
ref: navigation-item
905-
description: "Path to chapter input file"
899+
properties:
900+
part:
901+
string:
902+
description: "Part title or path to input file"
903+
chapters:
904+
arrayOf:
905+
ref: navigation-item
906+
description: "Path to chapter input file"
906907
required: [part]
907908

908909
- id: chapter-list
909910
arrayOf:
910911
ref: chapter-item
912+
911913
- id: crossref-labels-schema
912914
string:
913915
completions:
@@ -1400,8 +1402,9 @@
14001402
May be assigned by the CSL processor based on item metadata; For the identifier of the item
14011403
in the input data file, use `citation-key` instead
14021404
citation-number:
1403-
ref: csl-number
1404-
description: Index (starting at 1) of the cited reference in the bibliography (generated by the CSL processor).
1405+
schema:
1406+
ref: csl-number
1407+
description: Index (starting at 1) of the cited reference in the bibliography (generated by the CSL processor).
14051408
hidden: true
14061409
collection-editor:
14071410
ref: csl-person
@@ -1488,7 +1491,8 @@
14881491
ref: csl-person
14891492
description: Executive producer of the item (e.g. of a television series).
14901493
first-reference-note-number:
1491-
ref: csl-number
1494+
schema:
1495+
ref: csl-number
14921496
description:
14931497
short: Number of a preceding note containing the first reference to the item.
14941498
long: |
@@ -1670,13 +1674,14 @@
16701674
description: Recipient (e.g. of a letter).
16711675
references:
16721676
string:
1673-
short: Resources related to the procedural history of a legal case or legislation.
1674-
long: |
1675-
Resources related to the procedural history of a legal case or legislation;
1677+
description:
1678+
short: Resources related to the procedural history of a legal case or legislation.
1679+
long: |
1680+
Resources related to the procedural history of a legal case or legislation;
16761681
1677-
Can also be used to refer to the procedural history of other items (e.g.
1678-
"Conference canceled" for a presentation accepted as a conference that was subsequently
1679-
canceled; details of a retraction or correction notice)
1682+
Can also be used to refer to the procedural history of other items (e.g.
1683+
"Conference canceled" for a presentation accepted as a conference that was subsequently
1684+
canceled; details of a retraction or correction notice)
16801685
reviewed-author:
16811686
ref: csl-person
16821687
description: Author of the item reviewed by the current item.

src/resources/schema/document-options.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183

184184
- name: aspectratio
185185
schema:
186-
anyOf:
186+
enum:
187187
- 43
188188
- 169
189189
- 1610

src/resources/schema/document-reveal-navigation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
schema:
133133
anyOf:
134134
- number
135-
- false
135+
- enum: [false]
136136
default: 0
137137
description: "Automatically progress all slides at the specified interval"
138138

src/resources/schema/project.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@
6868
chapters:
6969
ref: chapter-list
7070
description: "Book part and chapter files"
71+
appendices:
72+
ref: chapter-list
73+
description: "Book appendix files"
7174
references:
7275
path:
7376
description: "Book references file"
74-
appendices:
75-
arrayOf:
76-
ref: chapter-item
77-
description: "Book appendix files"
7877
output-file:
7978
path:
8079
description: "Base name for single-file output (e.g. PDF, ePub)"
@@ -110,7 +109,7 @@
110109
#
111110
# In order to provide a good error message, we need an error
112111
# to be reported with instancePath ["type"].
113-
# Tis is a hacky way to do it.
112+
# This is a hacky way to do it.
114113
#
115114
# In general, full json schema would allow negative assertions,
116115
# but that makes our error localization heuristics worse. So we hack.

0 commit comments

Comments
 (0)