@atlaskit/adf-schema 37.0.2 → 37.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +1 -1
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +101 -31
  4. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  5. package/dist/cjs/next-schema/groups/inlineGroup.js +1 -1
  6. package/dist/cjs/next-schema/index.js +511 -0
  7. package/dist/cjs/next-schema/nodes/blockquote.js +3 -2
  8. package/dist/cjs/next-schema/nodes/bodiedExtension.js +6 -2
  9. package/dist/cjs/next-schema/nodes/codeBlock.js +10 -3
  10. package/dist/cjs/next-schema/nodes/date.js +2 -1
  11. package/dist/cjs/next-schema/nodes/emoji.js +2 -1
  12. package/dist/cjs/next-schema/nodes/expand.js +11 -3
  13. package/dist/cjs/next-schema/nodes/extension.js +5 -2
  14. package/dist/cjs/next-schema/nodes/heading.js +28 -5
  15. package/dist/cjs/next-schema/nodes/inlineExtension.js +1 -0
  16. package/dist/cjs/next-schema/nodes/layoutSection.js +15 -2
  17. package/dist/cjs/next-schema/nodes/list.js +12 -9
  18. package/dist/cjs/next-schema/nodes/mediaInline.js +2 -1
  19. package/dist/cjs/next-schema/nodes/mediaSingle.js +75 -4
  20. package/dist/cjs/next-schema/nodes/mention.js +2 -1
  21. package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +8 -4
  22. package/dist/cjs/next-schema/nodes/nestedExpand.js +5 -1
  23. package/dist/cjs/next-schema/nodes/panel.js +3 -0
  24. package/dist/cjs/next-schema/nodes/paragraph.js +29 -5
  25. package/dist/cjs/next-schema/nodes/status.js +2 -1
  26. package/dist/cjs/next-schema/nodes/tableCell.js +4 -1
  27. package/dist/cjs/next-schema/nodes/tableHeader.js +5 -2
  28. package/dist/cjs/next-schema/nodes/task.js +1 -0
  29. package/dist/cjs/next-schema/nodes/text.js +7 -1
  30. package/dist/cjs/schema/nodes/media.js +10 -4
  31. package/dist/cjs/schema/nodes/text.js +1 -0
  32. package/dist/es2019/next-schema/full-schema.adf.js +1 -1
  33. package/dist/es2019/next-schema/generated/nodeTypes.js +100 -30
  34. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  35. package/dist/es2019/next-schema/groups/inlineGroup.js +1 -1
  36. package/dist/es2019/next-schema/index.js +2 -0
  37. package/dist/es2019/next-schema/nodes/blockquote.js +3 -2
  38. package/dist/es2019/next-schema/nodes/bodiedExtension.js +6 -2
  39. package/dist/es2019/next-schema/nodes/codeBlock.js +10 -3
  40. package/dist/es2019/next-schema/nodes/date.js +2 -1
  41. package/dist/es2019/next-schema/nodes/emoji.js +2 -1
  42. package/dist/es2019/next-schema/nodes/expand.js +11 -3
  43. package/dist/es2019/next-schema/nodes/extension.js +5 -2
  44. package/dist/es2019/next-schema/nodes/heading.js +27 -4
  45. package/dist/es2019/next-schema/nodes/inlineExtension.js +1 -0
  46. package/dist/es2019/next-schema/nodes/layoutSection.js +15 -2
  47. package/dist/es2019/next-schema/nodes/list.js +12 -9
  48. package/dist/es2019/next-schema/nodes/mediaInline.js +2 -1
  49. package/dist/es2019/next-schema/nodes/mediaSingle.js +76 -5
  50. package/dist/es2019/next-schema/nodes/mention.js +2 -1
  51. package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +8 -4
  52. package/dist/es2019/next-schema/nodes/nestedExpand.js +5 -1
  53. package/dist/es2019/next-schema/nodes/panel.js +3 -0
  54. package/dist/es2019/next-schema/nodes/paragraph.js +29 -5
  55. package/dist/es2019/next-schema/nodes/status.js +2 -1
  56. package/dist/es2019/next-schema/nodes/tableCell.js +4 -1
  57. package/dist/es2019/next-schema/nodes/tableHeader.js +5 -2
  58. package/dist/es2019/next-schema/nodes/task.js +1 -0
  59. package/dist/es2019/next-schema/nodes/text.js +7 -1
  60. package/dist/es2019/schema/nodes/media.js +3 -1
  61. package/dist/es2019/schema/nodes/text.js +1 -0
  62. package/dist/esm/next-schema/full-schema.adf.js +1 -1
  63. package/dist/esm/next-schema/generated/nodeTypes.js +100 -30
  64. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  65. package/dist/esm/next-schema/groups/inlineGroup.js +1 -1
  66. package/dist/esm/next-schema/index.js +2 -0
  67. package/dist/esm/next-schema/nodes/blockquote.js +3 -2
  68. package/dist/esm/next-schema/nodes/bodiedExtension.js +6 -2
  69. package/dist/esm/next-schema/nodes/codeBlock.js +10 -3
  70. package/dist/esm/next-schema/nodes/date.js +2 -1
  71. package/dist/esm/next-schema/nodes/emoji.js +2 -1
  72. package/dist/esm/next-schema/nodes/expand.js +11 -3
  73. package/dist/esm/next-schema/nodes/extension.js +5 -2
  74. package/dist/esm/next-schema/nodes/heading.js +27 -4
  75. package/dist/esm/next-schema/nodes/inlineExtension.js +1 -0
  76. package/dist/esm/next-schema/nodes/layoutSection.js +15 -2
  77. package/dist/esm/next-schema/nodes/list.js +12 -9
  78. package/dist/esm/next-schema/nodes/mediaInline.js +2 -1
  79. package/dist/esm/next-schema/nodes/mediaSingle.js +76 -5
  80. package/dist/esm/next-schema/nodes/mention.js +2 -1
  81. package/dist/esm/next-schema/nodes/multiBodiedExtension.js +8 -4
  82. package/dist/esm/next-schema/nodes/nestedExpand.js +5 -1
  83. package/dist/esm/next-schema/nodes/panel.js +3 -0
  84. package/dist/esm/next-schema/nodes/paragraph.js +29 -5
  85. package/dist/esm/next-schema/nodes/status.js +2 -1
  86. package/dist/esm/next-schema/nodes/tableCell.js +4 -1
  87. package/dist/esm/next-schema/nodes/tableHeader.js +5 -2
  88. package/dist/esm/next-schema/nodes/task.js +1 -0
  89. package/dist/esm/next-schema/nodes/text.js +7 -1
  90. package/dist/esm/schema/nodes/media.js +9 -4
  91. package/dist/esm/schema/nodes/text.js +1 -0
  92. package/dist/types/next-schema/full-schema.adf.d.ts +18 -0
  93. package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
  94. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
  95. package/dist/types/next-schema/generated/nodeTypes.d.ts +145 -96
  96. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +128 -6
  97. package/dist/types/next-schema/index.d.ts +5 -0
  98. package/dist/types/next-schema/nodes/blockCard.d.ts +18 -0
  99. package/dist/types/next-schema/nodes/blockquote.d.ts +20 -1
  100. package/dist/types/next-schema/nodes/bodiedExtension.d.ts +20 -0
  101. package/dist/types/next-schema/nodes/caption.d.ts +18 -0
  102. package/dist/types/next-schema/nodes/codeBlock.d.ts +48 -0
  103. package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +18 -0
  104. package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +18 -0
  105. package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +18 -0
  106. package/dist/types/next-schema/nodes/date.d.ts +18 -0
  107. package/dist/types/next-schema/nodes/decisionItem.d.ts +18 -0
  108. package/dist/types/next-schema/nodes/decisionList.d.ts +18 -0
  109. package/dist/types/next-schema/nodes/embedCard.d.ts +18 -0
  110. package/dist/types/next-schema/nodes/emoji.d.ts +18 -0
  111. package/dist/types/next-schema/nodes/expand.d.ts +25 -0
  112. package/dist/types/next-schema/nodes/extension.d.ts +19 -0
  113. package/dist/types/next-schema/nodes/extensionFrame.d.ts +18 -0
  114. package/dist/types/next-schema/nodes/hardBreak.d.ts +18 -0
  115. package/dist/types/next-schema/nodes/heading.d.ts +80 -0
  116. package/dist/types/next-schema/nodes/image.d.ts +18 -0
  117. package/dist/types/next-schema/nodes/inlineCard.d.ts +18 -0
  118. package/dist/types/next-schema/nodes/inlineExtension.d.ts +18 -0
  119. package/dist/types/next-schema/nodes/layoutColumn.d.ts +18 -0
  120. package/dist/types/next-schema/nodes/layoutSection.d.ts +22 -0
  121. package/dist/types/next-schema/nodes/list.d.ts +36 -0
  122. package/dist/types/next-schema/nodes/media.d.ts +18 -0
  123. package/dist/types/next-schema/nodes/mediaGroup.d.ts +18 -0
  124. package/dist/types/next-schema/nodes/mediaInline.d.ts +18 -0
  125. package/dist/types/next-schema/nodes/mediaSingle.d.ts +67 -1
  126. package/dist/types/next-schema/nodes/mention.d.ts +18 -0
  127. package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +18 -0
  128. package/dist/types/next-schema/nodes/nestedExpand.d.ts +22 -0
  129. package/dist/types/next-schema/nodes/panel.d.ts +22 -1
  130. package/dist/types/next-schema/nodes/paragraph.d.ts +29 -0
  131. package/dist/types/next-schema/nodes/placeholder.d.ts +18 -0
  132. package/dist/types/next-schema/nodes/rule.d.ts +18 -0
  133. package/dist/types/next-schema/nodes/status.d.ts +18 -0
  134. package/dist/types/next-schema/nodes/table.d.ts +18 -0
  135. package/dist/types/next-schema/nodes/tableCell.d.ts +18 -0
  136. package/dist/types/next-schema/nodes/tableHeader.d.ts +18 -0
  137. package/dist/types/next-schema/nodes/tableRow.d.ts +18 -0
  138. package/dist/types/next-schema/nodes/task.d.ts +36 -0
  139. package/dist/types/next-schema/nodes/text.d.ts +22 -1
  140. package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +18 -0
  141. package/dist/types/next-schema/nodes/unsupportedInline.d.ts +18 -0
  142. package/package.json +8 -3
  143. package/schema-generators/__tests__/unit/__fixtures__/index.fixture.ts +140 -0
  144. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -45
  145. package/schema-generators/__tests__/unit/adfToValidatorSpecValidation.unit.ts +88 -0
  146. package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +70 -61
  147. package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +152 -46
  148. package/schema-next/package.json +9 -0
  149. package/schema-generators/__tests__/unit/jqueries.md +0 -194
  150. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +0 -2320
@@ -8,52 +8,149 @@ import {
8
8
  import { getNodesAndMarksMap } from '../../../src/schema/create-schema';
9
9
  import { printExpected, printReceived, matcherHint } from 'jest-matcher-utils';
10
10
  import { filterAndSortMarks, formatContent } from '../helpers/_utils';
11
+ import {
12
+ blockCard,
13
+ blockquote,
14
+ blockquoteWithList,
15
+ bodiedExtension,
16
+ bulletList,
17
+ caption,
18
+ codeBlock,
19
+ confluenceJiraIssue,
20
+ confluenceUnsupportedBlock,
21
+ confluenceUnsupportedInline,
22
+ date,
23
+ decisionItem,
24
+ decisionList,
25
+ doc,
26
+ embedCard,
27
+ emoji,
28
+ expand,
29
+ extendedPanel,
30
+ extension,
31
+ extensionFrame,
32
+ hardBreak,
33
+ heading,
34
+ image,
35
+ inlineCard,
36
+ inlineExtension,
37
+ layoutColumn,
38
+ layoutSection,
39
+ listItem,
40
+ listItemWithTask,
41
+ media,
42
+ mediaGroup,
43
+ mediaInline,
44
+ mediaSingle,
45
+ mediaSingleFull,
46
+ mediaSingleWithCaption,
47
+ mediaSingleWithWidthType,
48
+ mention,
49
+ multiBodiedExtension,
50
+ nestedExpand,
51
+ orderedList,
52
+ orderedListWithOrder,
53
+ panel,
54
+ paragraph,
55
+ placeholder,
56
+ rule,
57
+ status,
58
+ taskItem,
59
+ taskList,
60
+ table,
61
+ tableCell,
62
+ tableHeader,
63
+ tableRow,
64
+ text,
65
+ unsupportedBlock,
66
+ unsupportedInline,
67
+ } from '../../../src/schema/nodes';
11
68
 
12
69
  const defaultSchema = getNodesAndMarksMap();
13
70
 
14
71
  /**
15
- * TODO: The EXCLUDE and SKIPPED consts are defined to pass the test
72
+ * TODO: The SKIPPED consts are defined to pass the test
16
73
  * Once following ticket is done, will need to remove exclude and unskip tests.
17
74
  * https://product-fabric.atlassian.net/browse/ED-23488
18
75
  */
19
- const EXCLUDE_CONTENT_FROM_NODESPEC = [
20
- 'uknownBlock', // We won't have it in DSL
21
- ];
22
-
23
- const SKIPPED_NODESPEC_TESTS = [
24
- 'unknownBlock', // unused node
25
- 'mediaSingleFull', // not aligned with old spec - content is different, another case similar to layoutSection
26
- 'layoutSection', // new ADF DSL doesn't have unsupportedBlock*|unsupportedBlock+ in content, it's not supported in DSL and doesn't make much sense, might have to hard code this one
27
- ];
76
+ const SKIPPED_NODESPEC_TESTS = [];
28
77
 
29
- /**
30
- *
31
- * When the default schema is created, there's a nodesInOrder map being used to map node name to a node spec
32
- * The mapped node spec could be a different variant, rather than the base one.
33
- * https://bitbucket.org/atlassian/adf-schema/src/main/packages/adf-schema/src/schema/create-schema.ts#lines-143
34
- *
35
- * TODO: consider stage0 as well
36
- */
37
- const defaultSchemaNodeSpecMap = () => {
38
- return {
39
- blockquote: 'blockquoteWithList',
40
- extension: 'extensionWithMarks',
41
- bodiedExtension: 'bodiedExtensionWithMarks',
42
- inlineExtension: 'inlineExtensionWithMarks',
43
- mediaSingle: 'mediaSingleFull',
44
- nestedExpand: 'nestedExpandWithNoMarks',
45
- codeBlock: 'codeBlockWithNoMarks',
46
- heading: 'headingWithNoMarks',
47
- // Base variant is not used anywhere
48
- expand: 'expandWithNoMark',
49
- };
78
+ const newSpecNameReference = {
79
+ blockquote: 'blockquoteLegacy',
80
+ blockquoteWithList: 'blockquote',
81
+ extendedPanel: 'panel',
82
+ inlineExtension: 'inlineExtensionWithMarks',
83
+ listItem: 'listItemLegacy',
84
+ listItemWithTask: 'listItem',
85
+ mediaSingleWithCaption: 'mediaSingleCaption',
86
+ mediaSingleWithWidthType: 'mediaSingleWidthType',
87
+ orderedListWithOrder: 'orderedList',
88
+ panel: 'panelLegacy',
50
89
  };
51
90
 
52
- const getDefaultSpecName = (nodeName: string) => {
53
- const customNodeSpecName = defaultSchemaNodeSpecMap()[nodeName];
91
+ const getNewSpecName = (nodeName: string) => {
92
+ const customNodeSpecName = newSpecNameReference[nodeName];
54
93
  return customNodeSpecName ? customNodeSpecName : nodeName;
55
94
  };
56
95
 
96
+ const oldSpecReferences = {
97
+ blockCard,
98
+ blockquote,
99
+ blockquoteWithList,
100
+ bodiedExtension,
101
+ bulletList,
102
+ caption,
103
+ codeBlock,
104
+ confluenceJiraIssue,
105
+ confluenceUnsupportedBlock,
106
+ confluenceUnsupportedInline,
107
+ date,
108
+ decisionItem,
109
+ decisionList,
110
+ doc,
111
+ embedCard,
112
+ emoji,
113
+ expand,
114
+ extendedPanel: extendedPanel(true),
115
+ extension,
116
+ extensionFrame,
117
+ hardBreak,
118
+ heading,
119
+ image,
120
+ inlineCard,
121
+ inlineExtension,
122
+ layoutColumn,
123
+ layoutSection,
124
+ listItem,
125
+ listItemWithTask,
126
+ media,
127
+ mediaGroup,
128
+ mediaInline,
129
+ mediaSingle,
130
+ mediaSingleFull,
131
+ mediaSingleWithCaption,
132
+ mediaSingleWithWidthType,
133
+ mention,
134
+ multiBodiedExtension,
135
+ nestedExpand,
136
+ orderedList,
137
+ orderedListWithOrder,
138
+ panel: panel(true),
139
+ paragraph,
140
+ placeholder,
141
+ rule,
142
+ status,
143
+ taskItem,
144
+ taskList,
145
+ table,
146
+ tableCell,
147
+ tableHeader,
148
+ tableRow,
149
+ text,
150
+ unsupportedBlock,
151
+ unsupportedInline,
152
+ };
153
+
57
154
  const failMessage = (actual, expected, not) => () =>
58
155
  `${matcherHint(
59
156
  `${not ? '.not' : ''}.toMatchNodeSpec`,
@@ -80,19 +177,24 @@ expect.extend({
80
177
  const formattedExpected = {
81
178
  ...expected,
82
179
  ...(expected.content && {
83
- content: formatContent(expected.content, EXCLUDE_CONTENT_FROM_NODESPEC),
180
+ content: formatContent(expected.content),
84
181
  }),
85
182
  ...(expected.marks && {
86
183
  marks: filterAndSortMarks(expected.marks),
87
184
  }),
88
185
  };
89
186
 
90
- // TODO: why
187
+ // status node used uuid for localId, which is incorrect, and not supported in DSL.
91
188
  if (formattedExpected?.attrs?.localId?.default) {
92
189
  formattedExpected.attrs.localId.default = '';
93
190
  }
94
191
 
95
- const pass = this.equals(formattedActual, formattedExpected);
192
+ const pass = this.equals(
193
+ formattedActual,
194
+ formattedExpected,
195
+ undefined,
196
+ true, // enable strict equal
197
+ );
96
198
  return {
97
199
  pass,
98
200
  message: failMessage(formattedActual, formattedExpected, pass),
@@ -151,24 +253,26 @@ describe('validate PM schema', () => {
151
253
  // check if there's any missing markSpec
152
254
  expect(newMarkSpecFn).toBeDefined();
153
255
  const newMarkSpec = newMarkSpecFn<any>({});
154
- expect(omit(newMarkSpec, ['parseDOM', 'toDOM'])).toEqual(
155
- omit(legacyMarkSpec, ['parseDOM', 'toDOM']),
256
+ expect(
257
+ omit(newMarkSpec, ['parseDOM', 'toDOM', 'toDebugString']),
258
+ ).toStrictEqual(
259
+ omit(legacyMarkSpec, ['parseDOM', 'toDOM', 'toDebugString']),
156
260
  );
157
261
  });
158
262
  });
159
263
  });
160
264
 
161
265
  describe('nodes', () => {
162
- const { nodes } = defaultSchema;
163
266
  const skipLists = SKIPPED_NODESPEC_TESTS;
164
- const testCases = Object.entries(nodes).map(([key, value]) => {
165
- const specName = getDefaultSpecName(key);
267
+ const testCases = Object.entries(oldSpecReferences).map(([key, value]) => {
268
+ const newSpecName = getNewSpecName(key);
269
+ console.log('newSpecName', newSpecName, newNodeSpecs[newSpecName]);
166
270
  return {
167
- name: specName,
271
+ name: key,
168
272
  legacyNodeSpec: value,
169
- newNodeSpecFn: newNodeSpecs[specName] as NodeSpecFactory,
273
+ newNodeSpecFn: newNodeSpecs[newSpecName] as NodeSpecFactory,
170
274
  testingMethod: {
171
- skip: skipLists.includes(specName),
275
+ skip: skipLists.includes(key),
172
276
  },
173
277
  };
174
278
  });
@@ -190,8 +294,10 @@ describe('validate PM schema', () => {
190
294
  // check if there's any missing nodeSpec
191
295
  expect(newNodeSpecFn).toBeDefined();
192
296
  const newNodeSpec = newNodeSpecFn<any>({});
193
- expect(omit(newNodeSpec, ['parseDOM', 'toDOM'])).toMatchNodeSpec(
194
- omit(legacyNodeSpec, ['parseDOM', 'toDOM']),
297
+ expect(
298
+ omit(newNodeSpec, ['parseDOM', 'toDOM', 'toDebugString']),
299
+ ).toMatchNodeSpec(
300
+ omit(legacyNodeSpec, ['parseDOM', 'toDOM', 'toDebugString']),
195
301
  );
196
302
  });
197
303
  },
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@atlaskit/adf-schema/schema-next",
3
+ "description": "Schema generated from ADF DSL (Experimental)",
4
+ "main": "../dist/cjs/next-schema/index.js",
5
+ "module": "../dist/esm/next-schema/index.js",
6
+ "module:es2019": "../dist/es2019/next-schema/index.js",
7
+ "sideEffects": false,
8
+ "types": "../dist/types/next-schema/index.d.ts"
9
+ }
@@ -1,194 +0,0 @@
1
- # Jqueries
2
-
3
- Temp file to hold jqueries for whittling down the json spec
4
-
5
- Delete all subfields:
6
-
7
- ```sh
8
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .type, .items, .minItems) else . end)'
9
- ```
10
-
11
- Delete all subfields and content objects:
12
-
13
- ```sh
14
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .type, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content) else . end)'
15
- ```
16
-
17
- Delete all subfields except for type. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
18
-
19
- ```sh
20
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node) else . end)'
21
- ```
22
-
23
- Delete all subfields except for type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
24
-
25
- ```sh
26
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node) else . end)'
27
- ```
28
-
29
- Delete all subfields except for marks, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
30
-
31
- ```sh
32
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .text, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node) else . end)'
33
- ```
34
-
35
- Delete all subfields except for marks, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
36
-
37
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
38
-
39
- ```sh
40
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
41
- .content, .text, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems,
42
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
43
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks) else . end)'
44
- ```
45
-
46
- Delete all subfields except for marks, anyOf, items, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
47
-
48
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
49
-
50
- ```sh
51
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
52
- .content, .text, .attrs, .version, .required, .additionalProperties, .allOf, .minItems,
53
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
54
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)'
55
- ```
56
-
57
- Delete all subfields except for marks, attrs, anyOf, items, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
58
-
59
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
60
-
61
- ```sh
62
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
63
- .content, .text, .version, .required, .additionalProperties, .allOf, .minItems,
64
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
65
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)'
66
- ```
67
-
68
- Delete all subfields except for text, marks, attrs, anyOf, items, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
69
-
70
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
71
-
72
- ```sh
73
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
74
- .content, .version, .required, .additionalProperties, .allOf, .minItems,
75
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
76
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)'
77
- ```
78
-
79
- Delete all subfields except for content, text, marks, attrs, anyOf, items, type and properties. Base level content objects (not nodes) are also deleted. `inline` is also deleted, as it is a content object for paragraph.
80
-
81
- All fields of content have been deleted as well.
82
-
83
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
84
-
85
- ```sh
86
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
87
- .version, .required, .additionalProperties, .allOf, .minItems, .content.items, .content.type, .content."$ref",
88
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
89
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
90
- ```
91
-
92
- Delete all subfields except for content, text, marks, attrs, anyOf, items, type and properties. Base level content objects (not nodes) are also deleted. `inline` is also deleted, as it is a content object for paragraph.
93
-
94
- All fields of content except for type have been deleted as well.
95
-
96
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
97
-
98
- ```sh
99
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
100
- .version, .required, .additionalProperties, .allOf, .minItems, .content.items, .content."$ref",
101
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
102
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
103
- ```
104
-
105
- Delete all subfields except for content, text, marks, attrs, anyOf, items, type and properties. Base level content objects (not nodes) are also deleted. `inline` is also deleted, as it is a content object for paragraph.
106
-
107
- All fields of content except for type and items have been deleted as well.
108
-
109
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
110
-
111
- ```sh
112
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
113
- .version, .required, .additionalProperties, .allOf, .minItems, .content.items.anyOf?, .content.items."$ref"?, .content.items[]?, .content."$ref",
114
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
115
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
116
- ```
117
-
118
- Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
119
-
120
- All fields of content except for type and items have been deleted as well.
121
-
122
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
123
-
124
- ```sh
125
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
126
- .version, .required, .additionalProperties, .allOf, .content.items.anyOf?, .content.items."$ref"?, .content.items[]?, .content."$ref",
127
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
128
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
129
- ```
130
-
131
- Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
132
-
133
- All fields of content except for type and items have been deleted as well.
134
-
135
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
136
-
137
- ```sh
138
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
139
- .required, .additionalProperties, .allOf, .content.items.anyOf?, .content.items."$ref"?, .content.items[]?, .content."$ref",
140
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
141
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
142
- ```
143
-
144
- Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
145
-
146
- All fields of content except for type, items, items.$ref and $ref have been deleted as well.
147
-
148
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
149
-
150
- ```sh
151
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
152
- .required, .additionalProperties, .allOf, .content.items.anyOf?,
153
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
154
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
155
- ```
156
-
157
- Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
158
-
159
- All fields of content except for type, items, items.$ref and $ref have been deleted as well.
160
-
161
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
162
-
163
- ```sh
164
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
165
- .required, .additionalProperties, .allOf,
166
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
167
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
168
- ```
169
-
170
- Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
171
-
172
- `additionalProperties` and `allOf` are deleted as well.
173
-
174
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
175
-
176
- ```sh
177
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
178
- .additionalProperties, .allOf, .properties.required,
179
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
180
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
181
- ```
182
-
183
- Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
184
-
185
- `additionalProperties` and `allOf` are deleted as well.
186
-
187
- A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
188
-
189
- ```sh
190
- cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
191
- .allOf,
192
- .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
193
- .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
194
- ```