UNPKG

45.2 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "$id": "https://spec.myst.tools/json-schema/myst.schema.json",
4 "description": "Myst syntax tree built on existing mdast schemas",
5 "type": "object",
6 "allOf": [
7 {
8 "properties": {
9 "type": {
10 "const": "root"
11 },
12 "children": {
13 "description": "Top-level children of myst document",
14 "anyOf": [
15 {
16 "type": "array",
17 "items": {
18 "anyOf": [
19 {
20 "$ref": "#/$defs/Block"
21 },
22 {
23 "$ref": "#/$defs/BlockBreak"
24 },
25 {
26 "$ref": "#/$defs/FlowContent"
27 }
28 ]
29 }
30 },
31 {
32 "type": "array",
33 "items": {
34 "$ref": "#/$defs/ListContent"
35 }
36 },
37 {
38 "type": "array",
39 "items": {
40 "$ref": "#/$defs/PhrasingContent"
41 }
42 }
43 ]
44 },
45 "position": {},
46 "data": {}
47 },
48 "additionalProperties": false
49 },
50 {
51 "$ref": "#/$defs/Parent"
52 }
53 ],
54 "$defs": {
55 "FlowContent": {
56 "anyOf": [
57 {
58 "$ref": "#/$defs/Paragraph"
59 },
60 {
61 "$ref": "#/$defs/Definition"
62 },
63 {
64 "$ref": "#/$defs/Heading"
65 },
66 {
67 "$ref": "#/$defs/ThematicBreak"
68 },
69 {
70 "$ref": "#/$defs/Blockquote"
71 },
72 {
73 "$ref": "#/$defs/List"
74 },
75 {
76 "$ref": "#/$defs/HTML"
77 },
78 {
79 "$ref": "#/$defs/Code"
80 },
81 {
82 "$ref": "#/$defs/Comment"
83 },
84 {
85 "$ref": "#/$defs/Target"
86 },
87 {
88 "$ref": "#/$defs/Directive"
89 },
90 {
91 "$ref": "#/$defs/Admonition"
92 },
93 {
94 "$ref": "#/$defs/Container"
95 },
96 {
97 "$ref": "#/$defs/Math"
98 },
99 {
100 "$ref": "#/$defs/Table"
101 },
102 {
103 "$ref": "#/$defs/FootnoteDefinition"
104 }
105 ]
106 },
107 "ListContent": {
108 "anyOf": [
109 {
110 "$ref": "#/$defs/ListItem"
111 }
112 ]
113 },
114 "PhrasingContent": {
115 "anyOf": [
116 {
117 "$ref": "#/$defs/StaticPhrasingContent"
118 },
119 {
120 "$ref": "#/$defs/Emphasis"
121 },
122 {
123 "$ref": "#/$defs/Strong"
124 },
125 {
126 "$ref": "#/$defs/Link"
127 },
128 {
129 "$ref": "#/$defs/LinkReference"
130 },
131 {
132 "$ref": "#/$defs/Subscript"
133 },
134 {
135 "$ref": "#/$defs/Superscript"
136 },
137 {
138 "$ref": "#/$defs/Underline"
139 },
140 {
141 "$ref": "#/$defs/Abbreviation"
142 },
143 {
144 "$ref": "#/$defs/CrossReference"
145 },
146 {
147 "$ref": "#/$defs/FootnoteReference"
148 }
149 ]
150 },
151 "StaticPhrasingContent": {
152 "anyOf": [
153 {
154 "$ref": "#/$defs/Text"
155 },
156 {
157 "$ref": "#/$defs/HTML"
158 },
159 {
160 "$ref": "#/$defs/EmphasisStatic"
161 },
162 {
163 "$ref": "#/$defs/StrongStatic"
164 },
165 {
166 "$ref": "#/$defs/InlineCode"
167 },
168 {
169 "$ref": "#/$defs/Break"
170 },
171 {
172 "$ref": "#/$defs/Image"
173 },
174 {
175 "$ref": "#/$defs/ImageReference"
176 },
177 {
178 "$ref": "#/$defs/Role"
179 },
180 {
181 "$ref": "#/$defs/SubscriptStatic"
182 },
183 {
184 "$ref": "#/$defs/SuperscriptStatic"
185 },
186 {
187 "$ref": "#/$defs/UnderlineStatic"
188 },
189 {
190 "$ref": "#/$defs/InlineMath"
191 }
192 ]
193 },
194 "BlockBreak": {
195 "type": "object",
196 "description": "Top-level break in the myst document, breaking it into Blocks",
197 "allOf": [
198 {
199 "properties": {
200 "type": {
201 "const": "blockBreak"
202 },
203 "meta": {
204 "description": "Block metadata. Conventionally this is a stringified JSON dictionary but it may be any arbitrary string.",
205 "type": "string"
206 },
207 "position": {},
208 "data": {}
209 },
210 "additionalProperties": false
211 },
212 {
213 "$ref": "#/$defs/Node"
214 }
215 ]
216 },
217 "Block": {
218 "type": "object",
219 "description": "Top-level content blocks or cells the myst document, delimited by BlockBreaks",
220 "allOf": [
221 {
222 "properties": {
223 "type": {
224 "const": "block"
225 },
226 "meta": {
227 "description": "block metadata from preceding break; conventionally, a stringified JSON dictionary but may be any arbitrary string",
228 "type": "string"
229 },
230 "children": {
231 "description": "Top-level children of myst document",
232 "anyOf": [
233 {
234 "type": "array",
235 "items": {
236 "$ref": "#/$defs/FlowContent"
237 }
238 },
239 {
240 "type": "array",
241 "items": {
242 "$ref": "#/$defs/ListContent"
243 }
244 },
245 {
246 "type": "array",
247 "items": {
248 "$ref": "#/$defs/PhrasingContent"
249 }
250 }
251 ]
252 },
253 "position": {},
254 "data": {}
255 },
256 "additionalProperties": false
257 },
258 {
259 "$ref": "#/$defs/Node"
260 }
261 ]
262 },
263 "Role": {
264 "description": "Custom in-line behavior",
265 "type": "object",
266 "allOf": [
267 {
268 "required": [
269 "name"
270 ],
271 "properties": {
272 "type": {
273 "const": "mystRole"
274 },
275 "name": {
276 "type": "string"
277 },
278 "value": {
279 "description": "content of the directive",
280 "type": "string"
281 },
282 "children": {
283 "description": "parsed role content",
284 "type": "array",
285 "items": {
286 "$ref": "#/$defs/PhrasingContent"
287 }
288 },
289 "position": {},
290 "data": {}
291 },
292 "additionalProperties": false
293 },
294 {
295 "$ref": "#/$defs/Node"
296 }
297 ]
298 },
299 "Directive": {
300 "description": "Content block with predefined behavior",
301 "type": "object",
302 "allOf": [
303 {
304 "required": [
305 "name"
306 ],
307 "properties": {
308 "type": {
309 "const": "mystDirective"
310 },
311 "name": {
312 "type": "string"
313 },
314 "args": {
315 "type": "string"
316 },
317 "options": {
318 "type": "object"
319 },
320 "value": {
321 "description": "body of the directive, excluding options",
322 "type": "string"
323 },
324 "children": {
325 "description": "parsed directive content",
326 "type": "array",
327 "items": {
328 "anyOf": [
329 {
330 "$ref": "#/$defs/FlowContent"
331 },
332 {
333 "$ref": "#/$defs/PhrasingContent"
334 }
335 ]
336 }
337 },
338 "position": {},
339 "data": {}
340 },
341 "additionalProperties": false
342 },
343 {
344 "$ref": "#/$defs/Node"
345 }
346 ]
347 },
348 "Target": {
349 "description": "Target node - provides identifier/label for the following node",
350 "type": "object",
351 "allOf": [
352 {
353 "properties": {
354 "type": {
355 "const": "mystTarget"
356 },
357 "label": {
358 "description": "unresolved target label",
359 "type": "string"
360 },
361 "position": {},
362 "data": {}
363 },
364 "additionalProperties": false
365 },
366 {
367 "$ref": "#/$defs/Node"
368 }
369 ]
370 },
371 "CrossReference": {
372 "description": "In-line reference to an associated node",
373 "type": "object",
374 "allOf": [
375 {
376 "properties": {
377 "type": {
378 "const": "crossReference"
379 },
380 "kind": {
381 "type": "string",
382 "enum": [
383 "eq",
384 "numref",
385 "ref"
386 ],
387 "description": "Indicates if the references should be numbered.\n```{warning}\nThe `kind` was based on docutils and is subject to change as we improve the `crossReference` experience.\n```"
388 },
389 "children": {
390 "type": "array",
391 "items": {
392 "$ref": "#/$defs/StaticPhrasingContent"
393 },
394 "description": "Children of the crossReference, can include text with \"%s\" or \"{number}\" and enumerated references will be filled in."
395 },
396 "identifier": {},
397 "label": {},
398 "position": {},
399 "data": {}
400 },
401 "additionalProperties": false
402 },
403 {
404 "$ref": "#/$defs/Association"
405 },
406 {
407 "$ref": "#/$defs/Node"
408 }
409 ]
410 },
411 "Abbreviation": {
412 "description": "Abbreviation node described by title",
413 "type": "object",
414 "allOf": [
415 {
416 "properties": {
417 "type": {
418 "const": "abbreviation"
419 },
420 "children": {
421 "description": "abbreviated value",
422 "type": "array",
423 "items": {
424 "$ref": "#/$defs/StaticPhrasingContent"
425 }
426 },
427 "title": {
428 "description": "advisory information for the abbreviation",
429 "type": "string"
430 },
431 "position": {},
432 "data": {}
433 },
434 "additionalProperties": false
435 },
436 {
437 "$ref": "#/$defs/Parent"
438 }
439 ]
440 },
441 "Admonition": {
442 "description": "Admonition node for drawing attention to text, separate from the neighboring content",
443 "type": "object",
444 "allOf": [
445 {
446 "properties": {
447 "type": {
448 "const": "admonition"
449 },
450 "kind": {
451 "description": "kind of admonition, to determine styling",
452 "type": "string",
453 "enum": [
454 "attention",
455 "caution",
456 "danger",
457 "error",
458 "hint",
459 "important",
460 "note",
461 "seealso",
462 "tip",
463 "warning"
464 ]
465 },
466 "class": {
467 "description": "admonition class info to override kind",
468 "type": "string"
469 },
470 "children": {
471 "type": "array",
472 "items": {
473 "anyOf": [
474 {
475 "$ref": "#/$defs/AdmonitionTitle"
476 },
477 {
478 "$ref": "#/$defs/FlowContent"
479 }
480 ]
481 },
482 "description": "An optional `admonitionTitle` followed by the admonitions content."
483 },
484 "position": {},
485 "data": {}
486 },
487 "additionalProperties": false
488 },
489 {
490 "$ref": "#/$defs/Node"
491 }
492 ]
493 },
494 "AdmonitionTitle": {
495 "description": "Custom title for admonition, replaces kind as title",
496 "type": "object",
497 "allOf": [
498 {
499 "properties": {
500 "type": {
501 "const": "admonitionTitle"
502 },
503 "children": {
504 "type": "array",
505 "items": {
506 "$ref": "#/$defs/PhrasingContent"
507 }
508 },
509 "position": {},
510 "data": {}
511 },
512 "additionalProperties": false
513 },
514 {
515 "$ref": "#/$defs/Parent"
516 }
517 ]
518 },
519 "Container": {
520 "description": "Top-level container node to provide association and numbering to child content",
521 "type": "object",
522 "allOf": [
523 {
524 "required": [
525 "kind"
526 ],
527 "properties": {
528 "type": {
529 "const": "container"
530 },
531 "kind": {
532 "description": "kind of container contents",
533 "type": "string",
534 "enum": [
535 "figure",
536 "table"
537 ]
538 },
539 "class": {
540 "description": "any custom class information",
541 "type": "string"
542 },
543 "enumerated": {
544 "description": "count this container for numbering based on kind, e.g. Figure 1a",
545 "type": "boolean"
546 },
547 "enumerator": {
548 "description": "resolved enumerated value for this container",
549 "type": "string"
550 },
551 "children": {
552 "type": "array",
553 "items": {
554 "anyOf": [
555 {
556 "$ref": "#/$defs/Caption"
557 },
558 {
559 "$ref": "#/$defs/Legend"
560 },
561 {
562 "$ref": "#/$defs/Image"
563 },
564 {
565 "$ref": "#/$defs/Table"
566 }
567 ]
568 }
569 },
570 "identifier": {},
571 "label": {},
572 "position": {},
573 "data": {}
574 },
575 "additionalProperties": false
576 },
577 {
578 "if": {
579 "properties": {
580 "kind": {
581 "const": "figure"
582 }
583 }
584 },
585 "then": {
586 "properties": {
587 "children": {
588 "type": "array",
589 "items": {
590 "anyOf": [
591 {
592 "$ref": "#/$defs/Caption"
593 },
594 {
595 "$ref": "#/$defs/Legend"
596 },
597 {
598 "$ref": "#/$defs/Image"
599 }
600 ]
601 }
602 }
603 }
604 },
605 "else": {
606 "properties": {
607 "children": {
608 "type": "array",
609 "items": {
610 "anyOf": [
611 {
612 "$ref": "#/$defs/Caption"
613 },
614 {
615 "$ref": "#/$defs/Legend"
616 },
617 {
618 "$ref": "#/$defs/Table"
619 }
620 ]
621 }
622 }
623 }
624 }
625 },
626 {
627 "$ref": "#/$defs/OptionalAssociation"
628 },
629 {
630 "$ref": "#/$defs/Parent"
631 }
632 ]
633 },
634 "Caption": {
635 "description": "Caption for container content",
636 "type": "object",
637 "allOf": [
638 {
639 "properties": {
640 "type": {
641 "const": "caption"
642 },
643 "children": {
644 "type": "array",
645 "items": {
646 "$ref": "#/$defs/FlowContent"
647 }
648 },
649 "position": {},
650 "data": {}
651 },
652 "additionalProperties": false
653 },
654 {
655 "$ref": "#/$defs/Parent"
656 }
657 ]
658 },
659 "Legend": {
660 "description": "Legend for container content",
661 "type": "object",
662 "allOf": [
663 {
664 "properties": {
665 "type": {
666 "const": "legend"
667 },
668 "children": {
669 "type": "array",
670 "items": {
671 "$ref": "#/$defs/FlowContent"
672 }
673 },
674 "position": {},
675 "data": {}
676 },
677 "additionalProperties": false
678 },
679 {
680 "$ref": "#/$defs/Parent"
681 }
682 ]
683 },
684 "FootnoteReference": {
685 "description": "Inline reference to footnote",
686 "type": "object",
687 "allOf": [
688 {
689 "properties": {
690 "type": {
691 "const": "footnoteReference"
692 },
693 "identifier": {},
694 "label": {},
695 "position": {},
696 "data": {}
697 },
698 "additionalProperties": false
699 },
700 {
701 "$ref": "#/$defs/Association"
702 },
703 {
704 "$ref": "#/$defs/Node"
705 }
706 ]
707 },
708 "FootnoteDefinition": {
709 "description": "Rich footnote content associated with footnote reference",
710 "type": "object",
711 "allOf": [
712 {
713 "properties": {
714 "type": {
715 "const": "footnoteDefinition"
716 },
717 "children": {
718 "type": "array",
719 "items": {
720 "$ref": "#/$defs/FlowContent"
721 }
722 },
723 "identifier": {},
724 "label": {},
725 "position": {},
726 "data": {}
727 },
728 "additionalProperties": false
729 },
730 {
731 "$ref": "#/$defs/Association"
732 },
733 {
734 "$ref": "#/$defs/Parent"
735 }
736 ]
737 },
738 "Math": {
739 "description": "Math node for presenting numbered equations",
740 "type": "object",
741 "allOf": [
742 {
743 "properties": {
744 "type": {
745 "const": "math"
746 },
747 "enumerated": {
748 "description": "count this math block for numbering based on kind, e.g. See equation (1a)",
749 "type": "boolean"
750 },
751 "enumerator": {
752 "description": "resolved enumerated value for this math block",
753 "type": "string"
754 },
755 "identifier": {},
756 "label": {},
757 "value": {},
758 "position": {},
759 "data": {}
760 },
761 "additionalProperties": false
762 },
763 {
764 "$ref": "#/$defs/OptionalAssociation"
765 },
766 {
767 "$ref": "#/$defs/Literal"
768 }
769 ]
770 },
771 "InlineMath": {
772 "description": "Fragment of math, similar to InlineCode, using role {math}",
773 "type": "object",
774 "allOf": [
775 {
776 "properties": {
777 "type": {
778 "const": "inlineMath"
779 },
780 "value": {},
781 "position": {},
782 "data": {}
783 },
784 "additionalProperties": false
785 },
786 {
787 "$ref": "#/$defs/Literal"
788 }
789 ]
790 },
791 "Table": {
792 "description": "Two-dimensional table data",
793 "type": "object",
794 "allOf": [
795 {
796 "properties": {
797 "type": {
798 "const": "table"
799 },
800 "align": {
801 "type": "string",
802 "enum": [
803 "left",
804 "center",
805 "right"
806 ]
807 },
808 "children": {
809 "type": "array",
810 "items": {
811 "$ref": "#/$defs/TableRow"
812 }
813 },
814 "position": {},
815 "data": {}
816 },
817 "additionalProperties": false
818 },
819 {
820 "$ref": "#/$defs/Parent"
821 }
822 ]
823 },
824 "TableRow": {
825 "description": "One row of table containing cells",
826 "type": "object",
827 "allOf": [
828 {
829 "properties": {
830 "type": {
831 "const": "tableRow"
832 },
833 "children": {
834 "type": "array",
835 "items": {
836 "$ref": "#/$defs/TableCell"
837 }
838 },
839 "position": {},
840 "data": {}
841 },
842 "additionalProperties": false
843 },
844 {
845 "$ref": "#/$defs/Parent"
846 }
847 ]
848 },
849 "TableCell": {
850 "description": "One cell of table",
851 "type": "object",
852 "allOf": [
853 {
854 "properties": {
855 "type": {
856 "const": "tableCell"
857 },
858 "header": {
859 "type": "boolean"
860 },
861 "align": {
862 "description": "alignment of content within cell",
863 "type": "string",
864 "enum": [
865 "left",
866 "center",
867 "right"
868 ]
869 },
870 "children": {
871 "type": "array",
872 "items": {
873 "$ref": "#/$defs/PhrasingContent"
874 }
875 },
876 "position": {},
877 "data": {}
878 },
879 "additionalProperties": false
880 },
881 {
882 "$ref": "#/$defs/Parent"
883 }
884 ]
885 },
886 "Subscript": {
887 "description": "Subscript content, using role {subscript}",
888 "type": "object",
889 "allOf": [
890 {
891 "properties": {
892 "type": {
893 "const": "subscript"
894 },
895 "children": {
896 "type": "array",
897 "items": {
898 "$ref": "#/$defs/PhrasingContent"
899 }
900 },
901 "position": {},
902 "data": {}
903 },
904 "additionalProperties": false
905 },
906 {
907 "$ref": "#/$defs/Parent"
908 }
909 ]
910 },
911 "SubscriptStatic": {
912 "description": "Subscript content, with static children; used when parent node requires static content",
913 "type": "object",
914 "allOf": [
915 {
916 "properties": {
917 "type": {
918 "const": "subscript"
919 },
920 "children": {
921 "type": "array",
922 "items": {
923 "$ref": "#/$defs/StaticPhrasingContent"
924 }
925 },
926 "position": {},
927 "data": {}
928 },
929 "additionalProperties": false
930 },
931 {
932 "$ref": "#/$defs/Parent"
933 }
934 ]
935 },
936 "Superscript": {
937 "description": "Superscript content, using role {superscript}",
938 "type": "object",
939 "allOf": [
940 {
941 "properties": {
942 "type": {
943 "const": "superscript"
944 },
945 "children": {
946 "type": "array",
947 "items": {
948 "$ref": "#/$defs/PhrasingContent"
949 }
950 },
951 "position": {},
952 "data": {}
953 },
954 "additionalProperties": false
955 },
956 {
957 "$ref": "#/$defs/Parent"
958 }
959 ]
960 },
961 "SuperscriptStatic": {
962 "description": "Superscript content, with static children; used when parent node requires static content",
963 "type": "object",
964 "allOf": [
965 {
966 "properties": {
967 "type": {
968 "const": "superscript"
969 },
970 "children": {
971 "type": "array",
972 "items": {
973 "$ref": "#/$defs/StaticPhrasingContent"
974 }
975 },
976 "position": {},
977 "data": {}
978 },
979 "additionalProperties": false
980 },
981 {
982 "$ref": "#/$defs/Parent"
983 }
984 ]
985 },
986 "Underline": {
987 "description": "Underline content, using role {underline}",
988 "type": "object",
989 "allOf": [
990 {
991 "properties": {
992 "type": {
993 "const": "underline"
994 },
995 "children": {
996 "type": "array",
997 "items": {
998 "$ref": "#/$defs/PhrasingContent"
999 }
1000 },
1001 "position": {},
1002 "data": {}
1003 },
1004 "additionalProperties": false
1005 },
1006 {
1007 "$ref": "#/$defs/Parent"
1008 }
1009 ]
1010 },
1011 "UnderlineStatic": {
1012 "description": "Underline content, with static children; used when parent node requires static content",
1013 "type": "object",
1014 "allOf": [
1015 {
1016 "properties": {
1017 "type": {
1018 "const": "underline"
1019 },
1020 "children": {
1021 "type": "array",
1022 "items": {
1023 "$ref": "#/$defs/StaticPhrasingContent"
1024 }
1025 },
1026 "position": {},
1027 "data": {}
1028 },
1029 "additionalProperties": false
1030 },
1031 {
1032 "$ref": "#/$defs/Parent"
1033 }
1034 ]
1035 },
1036 "Comment": {
1037 "description": "Comment nodes for comments present in myst but ignored upon render",
1038 "type": "object",
1039 "allOf": [
1040 {
1041 "properties": {
1042 "type": {
1043 "const": "mystComment"
1044 },
1045 "value": {},
1046 "position": {},
1047 "data": {}
1048 },
1049 "additionalProperties": false
1050 },
1051 {
1052 "$ref": "#/$defs/Literal"
1053 }
1054 ]
1055 },
1056 "Paragraph": {
1057 "type": "object",
1058 "allOf": [
1059 {
1060 "properties": {
1061 "type": {
1062 "const": "paragraph"
1063 },
1064 "children": {
1065 "type": "array",
1066 "items": {
1067 "$ref": "#/$defs/PhrasingContent"
1068 }
1069 },
1070 "position": {},
1071 "data": {}
1072 },
1073 "additionalProperties": false
1074 },
1075 {
1076 "$ref": "#/$defs/Parent"
1077 }
1078 ]
1079 },
1080 "Heading": {
1081 "type": "object",
1082 "allOf": [
1083 {
1084 "required": [
1085 "depth"
1086 ],
1087 "properties": {
1088 "type": {
1089 "const": "heading"
1090 },
1091 "depth": {
1092 "type": "integer",
1093 "minimum": 1,
1094 "maximum": 6
1095 },
1096 "enumerated": {
1097 "description": "count this heading for numbering based on kind, e.g. Section 2.4.1",
1098 "type": "boolean"
1099 },
1100 "enumerator": {
1101 "description": "resolved enumerated value for this heading",
1102 "type": "string"
1103 },
1104 "children": {
1105 "type": "array",
1106 "items": {
1107 "$ref": "#/$defs/PhrasingContent"
1108 }
1109 },
1110 "identifier": {},
1111 "label": {},
1112 "position": {},
1113 "data": {}
1114 },
1115 "additionalProperties": false
1116 },
1117 {
1118 "$ref": "#/$defs/Parent"
1119 },
1120 {
1121 "$ref": "#/$defs/OptionalAssociation"
1122 }
1123 ]
1124 },
1125 "ThematicBreak": {
1126 "type": "object",
1127 "allOf": [
1128 {
1129 "properties": {
1130 "type": {
1131 "const": "thematicBreak"
1132 },
1133 "position": {},
1134 "data": {}
1135 },
1136 "additionalProperties": false
1137 },
1138 {
1139 "$ref": "#/$defs/Node"
1140 }
1141 ]
1142 },
1143 "Blockquote": {
1144 "type": "object",
1145 "allOf": [
1146 {
1147 "properties": {
1148 "type": {
1149 "const": "blockquote"
1150 },
1151 "children": {
1152 "type": "array",
1153 "items": {
1154 "$ref": "#/$defs/FlowContent"
1155 }
1156 },
1157 "position": {},
1158 "data": {}
1159 },
1160 "additionalProperties": false
1161 },
1162 {
1163 "$ref": "#/$defs/Parent"
1164 }
1165 ]
1166 },
1167 "List": {
1168 "type": "object",
1169 "allOf": [
1170 {
1171 "properties": {
1172 "type": {
1173 "const": "list"
1174 },
1175 "ordered": {
1176 "description": "Is item order important or not?",
1177 "type": "boolean"
1178 },
1179 "start": {
1180 "description": "Starting number of ordered list",
1181 "type": "integer"
1182 },
1183 "spread": {
1184 "description": "One or more children are separated with a blank line from others",
1185 "type": "boolean"
1186 },
1187 "children": {
1188 "type": "array",
1189 "items": {
1190 "$ref": "#/$defs/ListContent"
1191 }
1192 },
1193 "position": {},
1194 "data": {}
1195 },
1196 "additionalProperties": false
1197 },
1198 {
1199 "$ref": "#/$defs/Parent"
1200 }
1201 ]
1202 },
1203 "ListItem": {
1204 "type": "object",
1205 "allOf": [
1206 {
1207 "properties": {
1208 "type": {
1209 "const": "listItem"
1210 },
1211 "spread": {
1212 "description": "One or more children are separated with a blank line from others",
1213 "type": "boolean"
1214 },
1215 "children": {
1216 "type": "array",
1217 "items": {
1218 "anyOf": [
1219 {
1220 "$ref": "#/$defs/PhrasingContent"
1221 },
1222 {
1223 "$ref": "#/$defs/FlowContent"
1224 }
1225 ]
1226 }
1227 },
1228 "position": {},
1229 "data": {}
1230 },
1231 "additionalProperties": false
1232 },
1233 {
1234 "$ref": "#/$defs/Parent"
1235 }
1236 ]
1237 },
1238 "HTML": {
1239 "description": "Fragment of raw HTML - does not need to be valid or complete",
1240 "type": "object",
1241 "allOf": [
1242 {
1243 "properties": {
1244 "type": {
1245 "const": "html"
1246 },
1247 "value": {},
1248 "position": {},
1249 "data": {}
1250 },
1251 "additionalProperties": false
1252 },
1253 {
1254 "$ref": "#/$defs/Literal"
1255 }
1256 ]
1257 },
1258 "Code": {
1259 "description": "Block of preformatted text",
1260 "type": "object",
1261 "allOf": [
1262 {
1263 "properties": {
1264 "type": {
1265 "const": "code"
1266 },
1267 "lang": {
1268 "description": "language of the code",
1269 "type": "string"
1270 },
1271 "meta": {
1272 "description": "custom information relating to the node",
1273 "type": "string"
1274 },
1275 "class": {
1276 "description": "user-defined class for code block",
1277 "type": "string"
1278 },
1279 "showLineNumbers": {
1280 "type": "boolean"
1281 },
1282 "startingLineNumber": {
1283 "type": "integer",
1284 "minimum": 1
1285 },
1286 "emphasizeLines": {
1287 "type": "array",
1288 "items": {
1289 "type": "integer",
1290 "minimum": 1
1291 }
1292 },
1293 "identifier": {},
1294 "label": {},
1295 "value": {},
1296 "position": {},
1297 "data": {}
1298 },
1299 "additionalProperties": false
1300 },
1301 {
1302 "if": {
1303 "required": [
1304 "meta"
1305 ]
1306 },
1307 "then": {
1308 "required": [
1309 "lang"
1310 ]
1311 },
1312 "else": {}
1313 },
1314 {
1315 "if": {
1316 "required": [
1317 "startingLineNumber"
1318 ]
1319 },
1320 "then": {
1321 "required": [
1322 "showLineNumbers"
1323 ]
1324 },
1325 "else": {}
1326 },
1327 {
1328 "$ref": "#/$defs/OptionalAssociation"
1329 },
1330 {
1331 "$ref": "#/$defs/Literal"
1332 }
1333 ]
1334 },
1335 "Definition": {
1336 "description": "Reference to a url resource",
1337 "type": "object",
1338 "allOf": [
1339 {
1340 "properties": {
1341 "type": {
1342 "const": "definition"
1343 },
1344 "identifier": {},
1345 "label": {},
1346 "url": {},
1347 "title": {},
1348 "position": {},
1349 "data": {}
1350 },
1351 "additionalProperties": false
1352 },
1353 {
1354 "$ref": "#/$defs/Association"
1355 },
1356 {
1357 "$ref": "#/$defs/Resource"
1358 },
1359 {
1360 "$ref": "#/$defs/Node"
1361 }
1362 ]
1363 },
1364 "Text": {
1365 "type": "object",
1366 "allOf": [
1367 {
1368 "properties": {
1369 "type": {
1370 "const": "text"
1371 },
1372 "value": {},
1373 "position": {},
1374 "data": {}
1375 },
1376 "additionalProperties": false
1377 },
1378 {
1379 "$ref": "#/$defs/Literal"
1380 }
1381 ]
1382 },
1383 "Emphasis": {
1384 "description": "Stressed, italicized content",
1385 "type": "object",
1386 "allOf": [
1387 {
1388 "properties": {
1389 "type": {
1390 "const": "emphasis"
1391 },
1392 "children": {
1393 "type": "array",
1394 "items": {
1395 "$ref": "#/$defs/PhrasingContent"
1396 }
1397 },
1398 "position": {},
1399 "data": {}
1400 },
1401 "additionalProperties": false
1402 },
1403 {
1404 "$ref": "#/$defs/Parent"
1405 }
1406 ]
1407 },
1408 "EmphasisStatic": {
1409 "description": "Stressed, italicized content, with static children; used when parent node requires static content",
1410 "type": "object",
1411 "allOf": [
1412 {
1413 "properties": {
1414 "type": {
1415 "const": "emphasis"
1416 },
1417 "children": {
1418 "type": "array",
1419 "items": {
1420 "$ref": "#/$defs/StaticPhrasingContent"
1421 }
1422 },
1423 "position": {},
1424 "data": {}
1425 },
1426 "additionalProperties": false
1427 },
1428 {
1429 "$ref": "#/$defs/Parent"
1430 }
1431 ]
1432 },
1433 "Strong": {
1434 "description": "Important, serious, urgent, bold content",
1435 "type": "object",
1436 "allOf": [
1437 {
1438 "properties": {
1439 "type": {
1440 "const": "strong"
1441 },
1442 "children": {
1443 "type": "array",
1444 "items": {
1445 "$ref": "#/$defs/PhrasingContent"
1446 }
1447 },
1448 "position": {},
1449 "data": {}
1450 },
1451 "additionalProperties": false
1452 },
1453 {
1454 "$ref": "#/$defs/Parent"
1455 }
1456 ]
1457 },
1458 "StrongStatic": {
1459 "description": "Important, serious, urgent, bold content, with static children; used when parent node requires static content",
1460 "type": "object",
1461 "allOf": [
1462 {
1463 "properties": {
1464 "type": {
1465 "const": "strong"
1466 },
1467 "children": {
1468 "type": "array",
1469 "items": {
1470 "$ref": "#/$defs/StaticPhrasingContent"
1471 }
1472 },
1473 "position": {},
1474 "data": {}
1475 },
1476 "additionalProperties": false
1477 },
1478 {
1479 "$ref": "#/$defs/Parent"
1480 }
1481 ]
1482 },
1483 "InlineCode": {
1484 "description": "Fragment of code",
1485 "type": "object",
1486 "allOf": [
1487 {
1488 "properties": {
1489 "type": {
1490 "const": "inlineCode"
1491 },
1492 "value": {},
1493 "position": {},
1494 "data": {}
1495 },
1496 "additionalProperties": false
1497 },
1498 {
1499 "$ref": "#/$defs/Literal"
1500 }
1501 ]
1502 },
1503 "Break": {
1504 "description": "Line break",
1505 "type": "object",
1506 "allOf": [
1507 {
1508 "properties": {
1509 "type": {
1510 "const": "break"
1511 },
1512 "position": {},
1513 "data": {}
1514 },
1515 "additionalProperties": false
1516 },
1517 {
1518 "$ref": "#/$defs/Node"
1519 }
1520 ]
1521 },
1522 "Link": {
1523 "description": "Hyperlink",
1524 "type": "object",
1525 "allOf": [
1526 {
1527 "properties": {
1528 "type": {
1529 "const": "link"
1530 },
1531 "children": {
1532 "type": "array",
1533 "items": {
1534 "$ref": "#/$defs/StaticPhrasingContent"
1535 }
1536 },
1537 "url": {},
1538 "title": {},
1539 "position": {},
1540 "data": {}
1541 },
1542 "additionalProperties": false
1543 },
1544 {
1545 "$ref": "#/$defs/Resource"
1546 },
1547 {
1548 "$ref": "#/$defs/Parent"
1549 }
1550 ]
1551 },
1552 "Image": {
1553 "description": "Image hyperlink",
1554 "type": "object",
1555 "allOf": [
1556 {
1557 "properties": {
1558 "type": {
1559 "const": "image"
1560 },
1561 "class": {
1562 "description": "user-defined class for image",
1563 "type": "string"
1564 },
1565 "width": {
1566 "description": "image width in pixels or percentage",
1567 "type": "string"
1568 },
1569 "align": {
1570 "type": "string",
1571 "enum": [
1572 "left",
1573 "center",
1574 "right"
1575 ]
1576 },
1577 "url": {},
1578 "title": {},
1579 "alt": {},
1580 "position": {},
1581 "data": {}
1582 },
1583 "additionalProperties": false
1584 },
1585 {
1586 "$ref": "#/$defs/Resource"
1587 },
1588 {
1589 "$ref": "#/$defs/Alternative"
1590 },
1591 {
1592 "$ref": "#/$defs/Node"
1593 }
1594 ]
1595 },
1596 "LinkReference": {
1597 "description": "Hyperlink through association",
1598 "type": "object",
1599 "allOf": [
1600 {
1601 "properties": {
1602 "type": {
1603 "const": "linkReference"
1604 },
1605 "children": {
1606 "type": "array",
1607 "items": {
1608 "$ref": "#/$defs/StaticPhrasingContent"
1609 }
1610 },
1611 "referenceType": {},
1612 "identifier": {},
1613 "label": {},
1614 "position": {},
1615 "data": {}
1616 },
1617 "additionalProperties": false
1618 },
1619 {
1620 "$ref": "#/$defs/Reference"
1621 },
1622 {
1623 "$ref": "#/$defs/Association"
1624 },
1625 {
1626 "$ref": "#/$defs/Parent"
1627 }
1628 ]
1629 },
1630 "ImageReference": {
1631 "description": "Image through association",
1632 "type": "object",
1633 "allOf": [
1634 {
1635 "properties": {
1636 "type": {
1637 "const": "imageReference"
1638 },
1639 "referenceType": {},
1640 "identifier": {},
1641 "label": {},
1642 "alt": {},
1643 "position": {},
1644 "data": {}
1645 },
1646 "additionalProperties": false
1647 },
1648 {
1649 "$ref": "#/$defs/Reference"
1650 },
1651 {
1652 "$ref": "#/$defs/Association"
1653 },
1654 {
1655 "$ref": "#/$defs/Alternative"
1656 },
1657 {
1658 "$ref": "#/$defs/Node"
1659 }
1660 ]
1661 },
1662 "Resource": {
1663 "description": "Reference to external resource",
1664 "type": "object",
1665 "required": [
1666 "url"
1667 ],
1668 "properties": {
1669 "url": {
1670 "type": "string",
1671 "description": "A Uniform Resource Locator (URL) to an external resource or link."
1672 },
1673 "title": {
1674 "description": "advisory information, e.g. for a tooltip",
1675 "type": "string"
1676 }
1677 }
1678 },
1679 "OptionalAssociation": {
1680 "description": "Internal relation from one node to another; not required by node",
1681 "type": "object",
1682 "properties": {
1683 "identifier": {
1684 "description": "identifier that may match another node; value is unparsed and must be normalized such that whitespace is collapsed to single space, initial/final space is trimmed, and case is folded",
1685 "type": "string"
1686 },
1687 "label": {
1688 "description": "node label; character escapes and references are parsed; may be normalized to a unique identifier",
1689 "type": "string"
1690 }
1691 }
1692 },
1693 "Association": {
1694 "description": "Internal relation from one node to another",
1695 "type": "object",
1696 "allOf": [
1697 {
1698 "required": [
1699 "identifier"
1700 ],
1701 "properties": {
1702 "identifier": {}
1703 }
1704 },
1705 {
1706 "$ref": "#/$defs/OptionalAssociation"
1707 }
1708 ]
1709 },
1710 "Alternative": {
1711 "description": "Alternative description of image",
1712 "type": "object",
1713 "properties": {
1714 "alt": {
1715 "description": "field describing the image",
1716 "type": "string"
1717 }
1718 }
1719 },
1720 "Reference": {
1721 "description": "Marker associated to another node",
1722 "type": "object",
1723 "required": [
1724 "referenceType"
1725 ],
1726 "properties": {
1727 "referenceType": {
1728 "description": "explicitness of the reference:\n`shortcut` - reference is implicit, identifier inferred\n`collapsed` - reference explicit, identifier inferred\n`full` - reference explicit, identifier explicit",
1729 "type": "string",
1730 "enum": [
1731 "shortcut",
1732 "collapsed",
1733 "full"
1734 ]
1735 }
1736 }
1737 },
1738 "Node": {
1739 "description": "Base node object, based on the [unist](https://github.com/syntax-tree/unist) syntax tree.",
1740 "type": "object",
1741 "required": [
1742 "type"
1743 ],
1744 "properties": {
1745 "type": {
1746 "description": "identifier for node variant",
1747 "type": "string"
1748 },
1749 "data": {
1750 "description": "information associated by the ecosystem with the node; never specified by mdast",
1751 "type": "object"
1752 },
1753 "position": {
1754 "description": "location of node in source file; must not be present for generated nodes",
1755 "$ref": "#/$defs/Position"
1756 }
1757 }
1758 },
1759 "Literal": {
1760 "description": "Basic node with required string value",
1761 "type": "object",
1762 "allOf": [
1763 {
1764 "required": [
1765 "value"
1766 ],
1767 "properties": {
1768 "value": {
1769 "type": "string",
1770 "description": "The value of the node"
1771 }
1772 }
1773 },
1774 {
1775 "$ref": "#/$defs/Node"
1776 }
1777 ]
1778 },
1779 "Parent": {
1780 "description": "Basic node with required node children",
1781 "type": "object",
1782 "allOf": [
1783 {
1784 "required": [
1785 "children"
1786 ],
1787 "properties": {
1788 "children": {
1789 "type": "array",
1790 "description": "List of children nodes",
1791 "items": {
1792 "$ref": "#/$defs/Node"
1793 }
1794 }
1795 }
1796 },
1797 {
1798 "$ref": "#/$defs/Node"
1799 }
1800 ]
1801 },
1802 "Point": {
1803 "description": "One place in a source file",
1804 "type": "object",
1805 "required": [
1806 "line",
1807 "column"
1808 ],
1809 "properties": {
1810 "line": {
1811 "description": "line in the source file, 1-indexed",
1812 "type": "integer",
1813 "minimum": 1
1814 },
1815 "column": {
1816 "description": "column in the source file, 1-indexed",
1817 "type": "integer",
1818 "minimum": 1
1819 },
1820 "offset": {
1821 "description": "offset character in the source file, 0-indexed",
1822 "type": "integer",
1823 "minimum": 0
1824 }
1825 },
1826 "additionalProperties": false
1827 },
1828 "Position": {
1829 "description": "Location of a node in a source file",
1830 "type": "object",
1831 "required": [
1832 "start",
1833 "end"
1834 ],
1835 "properties": {
1836 "start": {
1837 "description": "place of first character of parsed source region",
1838 "$ref": "#/$defs/Point"
1839 },
1840 "end": {
1841 "description": "place of first character after parsed source region, whether it exists or not",
1842 "$ref": "#/$defs/Point"
1843 },
1844 "indent": {
1845 "description": "start column at each index in the source region, for elements that span multiple lines",
1846 "type": "array",
1847 "items": {
1848 "type": "integer",
1849 "minimum": 0
1850 }
1851 }
1852 },
1853 "additionalProperties": false
1854 }
1855 }
1856}
\No newline at end of file