@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.
- package/CHANGELOG.md +151 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +101 -31
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/groups/inlineGroup.js +1 -1
- package/dist/cjs/next-schema/index.js +511 -0
- package/dist/cjs/next-schema/nodes/blockquote.js +3 -2
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +6 -2
- package/dist/cjs/next-schema/nodes/codeBlock.js +10 -3
- package/dist/cjs/next-schema/nodes/date.js +2 -1
- package/dist/cjs/next-schema/nodes/emoji.js +2 -1
- package/dist/cjs/next-schema/nodes/expand.js +11 -3
- package/dist/cjs/next-schema/nodes/extension.js +5 -2
- package/dist/cjs/next-schema/nodes/heading.js +28 -5
- package/dist/cjs/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/cjs/next-schema/nodes/layoutSection.js +15 -2
- package/dist/cjs/next-schema/nodes/list.js +12 -9
- package/dist/cjs/next-schema/nodes/mediaInline.js +2 -1
- package/dist/cjs/next-schema/nodes/mediaSingle.js +75 -4
- package/dist/cjs/next-schema/nodes/mention.js +2 -1
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +8 -4
- package/dist/cjs/next-schema/nodes/nestedExpand.js +5 -1
- package/dist/cjs/next-schema/nodes/panel.js +3 -0
- package/dist/cjs/next-schema/nodes/paragraph.js +29 -5
- package/dist/cjs/next-schema/nodes/status.js +2 -1
- package/dist/cjs/next-schema/nodes/tableCell.js +4 -1
- package/dist/cjs/next-schema/nodes/tableHeader.js +5 -2
- package/dist/cjs/next-schema/nodes/task.js +1 -0
- package/dist/cjs/next-schema/nodes/text.js +7 -1
- package/dist/cjs/schema/nodes/media.js +10 -4
- package/dist/cjs/schema/nodes/text.js +1 -0
- package/dist/es2019/next-schema/full-schema.adf.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +100 -30
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/groups/inlineGroup.js +1 -1
- package/dist/es2019/next-schema/index.js +2 -0
- package/dist/es2019/next-schema/nodes/blockquote.js +3 -2
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +6 -2
- package/dist/es2019/next-schema/nodes/codeBlock.js +10 -3
- package/dist/es2019/next-schema/nodes/date.js +2 -1
- package/dist/es2019/next-schema/nodes/emoji.js +2 -1
- package/dist/es2019/next-schema/nodes/expand.js +11 -3
- package/dist/es2019/next-schema/nodes/extension.js +5 -2
- package/dist/es2019/next-schema/nodes/heading.js +27 -4
- package/dist/es2019/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/es2019/next-schema/nodes/layoutSection.js +15 -2
- package/dist/es2019/next-schema/nodes/list.js +12 -9
- package/dist/es2019/next-schema/nodes/mediaInline.js +2 -1
- package/dist/es2019/next-schema/nodes/mediaSingle.js +76 -5
- package/dist/es2019/next-schema/nodes/mention.js +2 -1
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +8 -4
- package/dist/es2019/next-schema/nodes/nestedExpand.js +5 -1
- package/dist/es2019/next-schema/nodes/panel.js +3 -0
- package/dist/es2019/next-schema/nodes/paragraph.js +29 -5
- package/dist/es2019/next-schema/nodes/status.js +2 -1
- package/dist/es2019/next-schema/nodes/tableCell.js +4 -1
- package/dist/es2019/next-schema/nodes/tableHeader.js +5 -2
- package/dist/es2019/next-schema/nodes/task.js +1 -0
- package/dist/es2019/next-schema/nodes/text.js +7 -1
- package/dist/es2019/schema/nodes/media.js +3 -1
- package/dist/es2019/schema/nodes/text.js +1 -0
- package/dist/esm/next-schema/full-schema.adf.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +100 -30
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/groups/inlineGroup.js +1 -1
- package/dist/esm/next-schema/index.js +2 -0
- package/dist/esm/next-schema/nodes/blockquote.js +3 -2
- package/dist/esm/next-schema/nodes/bodiedExtension.js +6 -2
- package/dist/esm/next-schema/nodes/codeBlock.js +10 -3
- package/dist/esm/next-schema/nodes/date.js +2 -1
- package/dist/esm/next-schema/nodes/emoji.js +2 -1
- package/dist/esm/next-schema/nodes/expand.js +11 -3
- package/dist/esm/next-schema/nodes/extension.js +5 -2
- package/dist/esm/next-schema/nodes/heading.js +27 -4
- package/dist/esm/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/esm/next-schema/nodes/layoutSection.js +15 -2
- package/dist/esm/next-schema/nodes/list.js +12 -9
- package/dist/esm/next-schema/nodes/mediaInline.js +2 -1
- package/dist/esm/next-schema/nodes/mediaSingle.js +76 -5
- package/dist/esm/next-schema/nodes/mention.js +2 -1
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +8 -4
- package/dist/esm/next-schema/nodes/nestedExpand.js +5 -1
- package/dist/esm/next-schema/nodes/panel.js +3 -0
- package/dist/esm/next-schema/nodes/paragraph.js +29 -5
- package/dist/esm/next-schema/nodes/status.js +2 -1
- package/dist/esm/next-schema/nodes/tableCell.js +4 -1
- package/dist/esm/next-schema/nodes/tableHeader.js +5 -2
- package/dist/esm/next-schema/nodes/task.js +1 -0
- package/dist/esm/next-schema/nodes/text.js +7 -1
- package/dist/esm/schema/nodes/media.js +9 -4
- package/dist/esm/schema/nodes/text.js +1 -0
- package/dist/types/next-schema/full-schema.adf.d.ts +18 -0
- package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +145 -96
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +128 -6
- package/dist/types/next-schema/index.d.ts +5 -0
- package/dist/types/next-schema/nodes/blockCard.d.ts +18 -0
- package/dist/types/next-schema/nodes/blockquote.d.ts +20 -1
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +20 -0
- package/dist/types/next-schema/nodes/caption.d.ts +18 -0
- package/dist/types/next-schema/nodes/codeBlock.d.ts +48 -0
- package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +18 -0
- package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +18 -0
- package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +18 -0
- package/dist/types/next-schema/nodes/date.d.ts +18 -0
- package/dist/types/next-schema/nodes/decisionItem.d.ts +18 -0
- package/dist/types/next-schema/nodes/decisionList.d.ts +18 -0
- package/dist/types/next-schema/nodes/embedCard.d.ts +18 -0
- package/dist/types/next-schema/nodes/emoji.d.ts +18 -0
- package/dist/types/next-schema/nodes/expand.d.ts +25 -0
- package/dist/types/next-schema/nodes/extension.d.ts +19 -0
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +18 -0
- package/dist/types/next-schema/nodes/hardBreak.d.ts +18 -0
- package/dist/types/next-schema/nodes/heading.d.ts +80 -0
- package/dist/types/next-schema/nodes/image.d.ts +18 -0
- package/dist/types/next-schema/nodes/inlineCard.d.ts +18 -0
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +18 -0
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +18 -0
- package/dist/types/next-schema/nodes/layoutSection.d.ts +22 -0
- package/dist/types/next-schema/nodes/list.d.ts +36 -0
- package/dist/types/next-schema/nodes/media.d.ts +18 -0
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +18 -0
- package/dist/types/next-schema/nodes/mediaInline.d.ts +18 -0
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +67 -1
- package/dist/types/next-schema/nodes/mention.d.ts +18 -0
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +18 -0
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +22 -0
- package/dist/types/next-schema/nodes/panel.d.ts +22 -1
- package/dist/types/next-schema/nodes/paragraph.d.ts +29 -0
- package/dist/types/next-schema/nodes/placeholder.d.ts +18 -0
- package/dist/types/next-schema/nodes/rule.d.ts +18 -0
- package/dist/types/next-schema/nodes/status.d.ts +18 -0
- package/dist/types/next-schema/nodes/table.d.ts +18 -0
- package/dist/types/next-schema/nodes/tableCell.d.ts +18 -0
- package/dist/types/next-schema/nodes/tableHeader.d.ts +18 -0
- package/dist/types/next-schema/nodes/tableRow.d.ts +18 -0
- package/dist/types/next-schema/nodes/task.d.ts +36 -0
- package/dist/types/next-schema/nodes/text.d.ts +22 -1
- package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +18 -0
- package/dist/types/next-schema/nodes/unsupportedInline.d.ts +18 -0
- package/package.json +8 -3
- package/schema-generators/__tests__/unit/__fixtures__/index.fixture.ts +140 -0
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -45
- package/schema-generators/__tests__/unit/adfToValidatorSpecValidation.unit.ts +88 -0
- package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +70 -61
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +152 -46
- package/schema-next/package.json +9 -0
- package/schema-generators/__tests__/unit/jqueries.md +0 -194
- 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
|
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
|
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
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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
|
53
|
-
const customNodeSpecName =
|
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
|
180
|
+
content: formatContent(expected.content),
|
84
181
|
}),
|
85
182
|
...(expected.marks && {
|
86
183
|
marks: filterAndSortMarks(expected.marks),
|
87
184
|
}),
|
88
185
|
};
|
89
186
|
|
90
|
-
//
|
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(
|
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(
|
155
|
-
omit(
|
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(
|
165
|
-
const
|
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:
|
271
|
+
name: key,
|
168
272
|
legacyNodeSpec: value,
|
169
|
-
newNodeSpecFn: newNodeSpecs[
|
273
|
+
newNodeSpecFn: newNodeSpecs[newSpecName] as NodeSpecFactory,
|
170
274
|
testingMethod: {
|
171
|
-
skip: skipLists.includes(
|
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(
|
194
|
-
omit(
|
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
|
-
```
|