@redpanda-data/docs-extensions-and-macros 5.11.1 → 5.12.0
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/docs-data/rpk-overrides.schema.json +744 -0
- package/extensions/set-available-attachment-versions.js +9 -1
- package/macros/DOCUMENTING_UNRELEASED_FEATURES.adoc +188 -0
- package/macros/PROPERTY_AND_ENTERPRISE_REFERENCES.adoc +20 -2
- package/macros/REFERENCE.adoc +92 -3
- package/macros/badge.js +9 -1
- package/macros/enterprise.js +180 -19
- package/macros/prop.js +636 -183
- package/package.json +5 -4
- package/tools/property-extractor/cloud_config.py +16 -3
- package/tools/redpanda-connect/report-delta.js +49 -3
- package/tools/rpk-docs/extract-conditional-content.js +3 -1
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://redpanda.com/schemas/rpk-overrides.json",
|
|
4
|
+
"title": "RPK Documentation Overrides",
|
|
5
|
+
"description": "Schema for overriding auto-generated rpk command documentation. Provides comprehensive controls for technical writers to customize, exclude, deprecate, and enhance command documentation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Reference to this schema file"
|
|
11
|
+
},
|
|
12
|
+
"textTransformations": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "Global text transformation rules applied to all command descriptions during generation. Allows writers to define patterns that should be formatted as inline code or replaced consistently across all commands.",
|
|
15
|
+
"properties": {
|
|
16
|
+
"replacements": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"description": "Text replacements applied BEFORE inline code formatting. Use for normalizing text (e.g., STDOUT → stdout). Applied in order.",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"pattern": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Regular expression pattern to match text that should be replaced. Use JavaScript regex syntax."
|
|
25
|
+
},
|
|
26
|
+
"replacement": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Replacement text. Can use $1, $2, etc. for capture groups, or $& for entire match."
|
|
29
|
+
},
|
|
30
|
+
"description": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Human-readable explanation of what this transformation does"
|
|
33
|
+
},
|
|
34
|
+
"flags": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Regular expression flags. Default: 'g' (global). Common: 'gi' (global, case-insensitive)",
|
|
37
|
+
"default": "g",
|
|
38
|
+
"pattern": "^[gimsuvy]*$"
|
|
39
|
+
},
|
|
40
|
+
"applyToCode": {
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"description": "Also apply this replacement inside code contexts: code blocks captured from help text (verbatim command examples) and inline code spans. Default false: code contexts are protected from prose transformations. Use for binary-name rewrites like rpai to rpk ai."
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["pattern", "replacement"],
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"inlineCode": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"description": "Patterns to wrap in inline code (backticks). Applied AFTER replacements and AFTER code block protection. Use negative lookbehind/lookahead to avoid double-wrapping.",
|
|
52
|
+
"items": {
|
|
53
|
+
"oneOf": [
|
|
54
|
+
{
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Regular expression pattern. Matched text will be wrapped in backticks."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"pattern": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "Regular expression pattern to match text that should be wrapped in backticks"
|
|
64
|
+
},
|
|
65
|
+
"replacement": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "Optional custom replacement (e.g., '`$1`' for first capture group). If omitted, wraps entire match in backticks."
|
|
68
|
+
},
|
|
69
|
+
"description": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Human-readable explanation of what this pattern matches"
|
|
72
|
+
},
|
|
73
|
+
"flags": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Regular expression flags. Default: 'g'",
|
|
76
|
+
"default": "g",
|
|
77
|
+
"pattern": "^[gimsuvy]*$"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": ["pattern"],
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
},
|
|
89
|
+
"definitions": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"description": "Reusable definitions that can be referenced via $ref",
|
|
92
|
+
"additionalProperties": {
|
|
93
|
+
"$ref": "#/$defs/flagOverrides"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"commands": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"description": "Command-specific overrides, keyed by full command path (e.g., 'rpk topic create')",
|
|
99
|
+
"additionalProperties": {
|
|
100
|
+
"$ref": "#/$defs/commandOverride"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"$defs": {
|
|
105
|
+
"commandOverride": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"description": "Overrides for a specific command",
|
|
108
|
+
"properties": {
|
|
109
|
+
"description": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "Override the command description. Replaces only the main description; sections from rpk output are preserved."
|
|
112
|
+
},
|
|
113
|
+
"appendToDescription": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Content to append to the auto-generated description instead of replacing it."
|
|
116
|
+
},
|
|
117
|
+
"descriptionScope": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"enum": ["cloud", "self-hosted", "both"],
|
|
120
|
+
"description": "Scope for the description override: 'cloud' (only in cloud docs), 'self-hosted' (only in self-hosted docs), or 'both' (default)"
|
|
121
|
+
},
|
|
122
|
+
"introducedInVersion": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Version when this command was introduced (e.g., 'v26.2.0')"
|
|
125
|
+
},
|
|
126
|
+
"flags": {
|
|
127
|
+
"$ref": "#/$defs/flagOverrides"
|
|
128
|
+
},
|
|
129
|
+
"$refs": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"description": "Array of $ref paths to merge into this command (e.g., ['#/definitions/common-kafka-flags'])",
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"exclude": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": "If true, exclude this command from documentation entirely. Use for internal or hidden commands that shouldn't be documented."
|
|
139
|
+
},
|
|
140
|
+
"excludeFlags": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"description": "List of flag names to exclude from documentation (without dashes)",
|
|
143
|
+
"items": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"excludeExamples": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"description": "List of regex patterns to exclude specific examples from the source EXAMPLES section. Matches against example descriptions or commands.",
|
|
150
|
+
"items": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"deprecated": {
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"description": "Mark this command as deprecated. A deprecation notice will be shown."
|
|
157
|
+
},
|
|
158
|
+
"deprecatedMessage": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "Custom deprecation message explaining what to use instead. Only used when deprecated is true."
|
|
161
|
+
},
|
|
162
|
+
"deprecatedInVersion": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Version when this command was deprecated (e.g., 'v26.1.0')"
|
|
165
|
+
},
|
|
166
|
+
"removedInVersion": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "Version when this command will be or was removed (e.g., 'v27.0.0')"
|
|
169
|
+
},
|
|
170
|
+
"replacement": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"description": "For deprecated commands, specify what command or approach to use instead. This is displayed in the deprecation notice."
|
|
173
|
+
},
|
|
174
|
+
"minVersion": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "Minimum rpk version required for this command (e.g., 'v25.3.0')"
|
|
177
|
+
},
|
|
178
|
+
"platforms": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"description": "Platforms where this command is available. If not specified, assumed available on all platforms.",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": ["linux", "darwin", "windows"]
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"prerequisites": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"description": "Prerequisites or requirements before using this command",
|
|
189
|
+
"items": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"seeAlso": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"description": "Related commands or documentation pages. Can be strings (always shown) or objects with cloudOnly/selfHostedOnly properties for platform-specific links.",
|
|
196
|
+
"items": {
|
|
197
|
+
"oneOf": [
|
|
198
|
+
{
|
|
199
|
+
"type": "string",
|
|
200
|
+
"description": "xref link or command name (shown on all platforms)"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"type": "object",
|
|
204
|
+
"description": "Conditional see-also item shown only on specific platforms",
|
|
205
|
+
"properties": {
|
|
206
|
+
"content": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"description": "The xref link or command name"
|
|
209
|
+
},
|
|
210
|
+
"cloudOnly": {
|
|
211
|
+
"type": "boolean",
|
|
212
|
+
"description": "If true, only shown in cloud docs (wrapped with ifdef::env-cloud[])"
|
|
213
|
+
},
|
|
214
|
+
"selfHostedOnly": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"description": "If true, only shown in self-hosted docs (wrapped with ifndef::env-cloud[])"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"required": ["content"],
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"oneOf": [
|
|
222
|
+
{
|
|
223
|
+
"required": ["cloudOnly"],
|
|
224
|
+
"not": { "required": ["selfHostedOnly"] }
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"required": ["selfHostedOnly"],
|
|
228
|
+
"not": { "required": ["cloudOnly"] }
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"aliases": {
|
|
236
|
+
"type": "array",
|
|
237
|
+
"description": "Override or add command aliases",
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"excludeAliases": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"description": "List of alias names to exclude from documentation (e.g., intentional misspellings for autocorrect)",
|
|
245
|
+
"items": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"aliasNotes": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "A note to display after the aliases section explaining non-obvious aliases (e.g., autocorrect aliases)"
|
|
252
|
+
},
|
|
253
|
+
"content": {
|
|
254
|
+
"type": "array",
|
|
255
|
+
"description": "Unified content additions. Use this for all custom content (sections, cloud-only, self-hosted, admonitions, includes). Each item has: type, position, and type-specific fields.",
|
|
256
|
+
"items": {
|
|
257
|
+
"$ref": "#/$defs/contentItem"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"pageAliases": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"description": "Comma-separated list of page aliases for backwards compatibility. Preserves old URLs when commands are renamed. Example: 'reference:rpk/old-name.adoc, features:guide.adoc'"
|
|
263
|
+
},
|
|
264
|
+
"pageAttributes": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"description": "Custom page attributes to add to the header (e.g., page-topic-type, learning-objective-*)",
|
|
267
|
+
"additionalProperties": {
|
|
268
|
+
"type": "string"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"cloudOnly": {
|
|
272
|
+
"type": "boolean",
|
|
273
|
+
"description": "If true, this command only appears in cloud documentation (entire page wrapped in ifdef::env-cloud[])"
|
|
274
|
+
},
|
|
275
|
+
"selfHostedOnly": {
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"description": "If true, this command only appears in self-hosted documentation (entire page wrapped in ifndef::env-cloud[])"
|
|
278
|
+
},
|
|
279
|
+
"_note": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "Internal note for writers. Not used in documentation generation. Use for explaining override rationale or tracking issues."
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"additionalProperties": false
|
|
285
|
+
},
|
|
286
|
+
"flagOverrides": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"description": "Flag-specific overrides, keyed by flag name (without dashes)",
|
|
289
|
+
"additionalProperties": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"properties": {
|
|
292
|
+
"description": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"description": "Override the flag description"
|
|
295
|
+
},
|
|
296
|
+
"type": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"description": "Override the flag type display"
|
|
299
|
+
},
|
|
300
|
+
"deprecated": {
|
|
301
|
+
"type": "boolean",
|
|
302
|
+
"description": "Mark this flag as deprecated"
|
|
303
|
+
},
|
|
304
|
+
"deprecatedMessage": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"description": "Custom deprecation message for the flag"
|
|
307
|
+
},
|
|
308
|
+
"required": {
|
|
309
|
+
"type": "boolean",
|
|
310
|
+
"description": "Override whether the flag is marked as required"
|
|
311
|
+
},
|
|
312
|
+
"default": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "Override the displayed default value"
|
|
315
|
+
},
|
|
316
|
+
"validValues": {
|
|
317
|
+
"type": "array",
|
|
318
|
+
"description": "List of valid values for this flag (shown in docs)",
|
|
319
|
+
"items": {
|
|
320
|
+
"type": "string"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"cloudOnly": {
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"description": "Flag only available in cloud environment"
|
|
326
|
+
},
|
|
327
|
+
"selfHostedOnly": {
|
|
328
|
+
"type": "boolean",
|
|
329
|
+
"description": "Flag only available in self-hosted environment"
|
|
330
|
+
},
|
|
331
|
+
"introducedInVersion": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"description": "Version when this flag was introduced (e.g., 'v26.2.0'). Auto-populated by diff when new flags are detected."
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"contentItem": {
|
|
339
|
+
"type": "object",
|
|
340
|
+
"description": "A content item to add to the documentation. The 'type' field determines what kind of content and which additional fields are required.",
|
|
341
|
+
"oneOf": [
|
|
342
|
+
{
|
|
343
|
+
"$ref": "#/$defs/contentItemSection"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"$ref": "#/$defs/contentItemExample"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"$ref": "#/$defs/contentItemExamples"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"$ref": "#/$defs/contentItemCloudOnly"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"$ref": "#/$defs/contentItemSelfHosted"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"$ref": "#/$defs/contentItemNote"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"$ref": "#/$defs/contentItemWarning"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"$ref": "#/$defs/contentItemTip"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"$ref": "#/$defs/contentItemCaution"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"$ref": "#/$defs/contentItemImportant"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"$ref": "#/$defs/contentItemInclude"
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
"contentPosition": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"description": "Where to insert this content in the document",
|
|
380
|
+
"enum": [
|
|
381
|
+
"after_header",
|
|
382
|
+
"after_description",
|
|
383
|
+
"after_usage",
|
|
384
|
+
"after_aliases",
|
|
385
|
+
"after_flags",
|
|
386
|
+
"after_modifiers",
|
|
387
|
+
"after_examples",
|
|
388
|
+
"before_see_also",
|
|
389
|
+
"end"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"contentItemSection": {
|
|
393
|
+
"type": "object",
|
|
394
|
+
"description": "A custom section with optional title. Supports subsections and parent sections with dynamic heading levels. If 'id' matches a source section (e.g., 'EXAMPLES', 'FIELDS'), you can: (1) use 'exclude: true' to remove it, or (2) provide 'content' to replace its content.",
|
|
395
|
+
"properties": {
|
|
396
|
+
"type": {
|
|
397
|
+
"const": "section"
|
|
398
|
+
},
|
|
399
|
+
"id": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"description": "Unique identifier for this section. If it matches a source section ID (e.g., 'EXAMPLES', 'FIELDS'), you can exclude or replace that section."
|
|
402
|
+
},
|
|
403
|
+
"title": {
|
|
404
|
+
"type": ["string", "null"],
|
|
405
|
+
"description": "Section title (e.g., 'Examples', 'Concept'). Use null for content without a section header."
|
|
406
|
+
},
|
|
407
|
+
"position": {
|
|
408
|
+
"$ref": "#/$defs/contentPosition"
|
|
409
|
+
},
|
|
410
|
+
"content": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"description": "Section content in AsciiDoc format. Omit if using subsections."
|
|
413
|
+
},
|
|
414
|
+
"subsections": {
|
|
415
|
+
"type": "array",
|
|
416
|
+
"description": "Array of nested subsections. Template automatically adjusts heading levels (=== for subsections, ==== for sub-subsections, etc.)",
|
|
417
|
+
"items": {
|
|
418
|
+
"$ref": "#/$defs/subsection"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"parent": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"description": "ID or lowercase title of an existing rpk section to nest this section inside. Template automatically adjusts heading levels. Example: 'flags' nests this section inside the Flags section."
|
|
424
|
+
},
|
|
425
|
+
"exclude": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"description": "If true, exclude a section from the rpk source output (use when overriding with custom content). The generator checks all case variations of the ID."
|
|
428
|
+
},
|
|
429
|
+
"headingLevel": {
|
|
430
|
+
"type": "integer",
|
|
431
|
+
"description": "Override the automatic heading level (2 for ==, 3 for ===, etc.). Use sparingly - template usually determines this automatically.",
|
|
432
|
+
"minimum": 2,
|
|
433
|
+
"maximum": 6
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"required": ["type"],
|
|
437
|
+
"additionalProperties": false,
|
|
438
|
+
"anyOf": [
|
|
439
|
+
{
|
|
440
|
+
"required": ["position"],
|
|
441
|
+
"description": "Normal section with position"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"required": ["exclude"],
|
|
445
|
+
"properties": {
|
|
446
|
+
"exclude": { "const": true }
|
|
447
|
+
},
|
|
448
|
+
"description": "Exclude-only section doesn't need position"
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
"contentItemCloudOnly": {
|
|
453
|
+
"type": "object",
|
|
454
|
+
"description": "Content shown only in cloud docs (wrapped in ifdef::env-cloud[])",
|
|
455
|
+
"properties": {
|
|
456
|
+
"type": {
|
|
457
|
+
"const": "cloud-only"
|
|
458
|
+
},
|
|
459
|
+
"position": {
|
|
460
|
+
"$ref": "#/$defs/contentPosition"
|
|
461
|
+
},
|
|
462
|
+
"content": {
|
|
463
|
+
"type": "string",
|
|
464
|
+
"description": "Content in AsciiDoc format"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"required": ["type", "position", "content"],
|
|
468
|
+
"additionalProperties": false
|
|
469
|
+
},
|
|
470
|
+
"contentItemSelfHosted": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"description": "Content shown only in self-hosted docs (wrapped in ifndef::env-cloud[])",
|
|
473
|
+
"properties": {
|
|
474
|
+
"type": {
|
|
475
|
+
"const": "self-hosted"
|
|
476
|
+
},
|
|
477
|
+
"position": {
|
|
478
|
+
"$ref": "#/$defs/contentPosition"
|
|
479
|
+
},
|
|
480
|
+
"content": {
|
|
481
|
+
"type": "string",
|
|
482
|
+
"description": "Content in AsciiDoc format"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"required": ["type", "position", "content"],
|
|
486
|
+
"additionalProperties": false
|
|
487
|
+
},
|
|
488
|
+
"contentItemNote": {
|
|
489
|
+
"type": "object",
|
|
490
|
+
"description": "A NOTE admonition. Use plain text only - template automatically wraps in NOTE: or [NOTE]====...==== depending on complexity.",
|
|
491
|
+
"properties": {
|
|
492
|
+
"type": {
|
|
493
|
+
"const": "note"
|
|
494
|
+
},
|
|
495
|
+
"position": {
|
|
496
|
+
"$ref": "#/$defs/contentPosition"
|
|
497
|
+
},
|
|
498
|
+
"content": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"description": "Note content. Plain text with inline code/xrefs. Template detects complexity (includes, multiple paragraphs) and uses block format automatically."
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"required": ["type", "position", "content"],
|
|
504
|
+
"additionalProperties": false
|
|
505
|
+
},
|
|
506
|
+
"contentItemWarning": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"description": "A WARNING admonition. Use plain text only - template automatically wraps in WARNING: or [WARNING]====...==== depending on complexity.",
|
|
509
|
+
"properties": {
|
|
510
|
+
"type": {
|
|
511
|
+
"const": "warning"
|
|
512
|
+
},
|
|
513
|
+
"position": {
|
|
514
|
+
"$ref": "#/$defs/contentPosition"
|
|
515
|
+
},
|
|
516
|
+
"content": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"description": "Warning content. Plain text with inline code/xrefs. Template detects complexity (includes, multiple paragraphs) and uses block format automatically."
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"required": ["type", "position", "content"],
|
|
522
|
+
"additionalProperties": false
|
|
523
|
+
},
|
|
524
|
+
"contentItemTip": {
|
|
525
|
+
"type": "object",
|
|
526
|
+
"description": "A TIP admonition. Use plain text only - template automatically wraps in TIP: or [TIP]====...==== depending on complexity.",
|
|
527
|
+
"properties": {
|
|
528
|
+
"type": {
|
|
529
|
+
"const": "tip"
|
|
530
|
+
},
|
|
531
|
+
"position": {
|
|
532
|
+
"$ref": "#/$defs/contentPosition"
|
|
533
|
+
},
|
|
534
|
+
"content": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"description": "Tip content. Plain text with inline code/xrefs. Template detects complexity (includes, multiple paragraphs) and uses block format automatically."
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"required": ["type", "position", "content"],
|
|
540
|
+
"additionalProperties": false
|
|
541
|
+
},
|
|
542
|
+
"contentItemCaution": {
|
|
543
|
+
"type": "object",
|
|
544
|
+
"description": "A CAUTION admonition. Use plain text only - template automatically wraps in CAUTION: or [CAUTION]====...==== depending on complexity.",
|
|
545
|
+
"properties": {
|
|
546
|
+
"type": {
|
|
547
|
+
"const": "caution"
|
|
548
|
+
},
|
|
549
|
+
"position": {
|
|
550
|
+
"$ref": "#/$defs/contentPosition"
|
|
551
|
+
},
|
|
552
|
+
"content": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"description": "Caution content. Plain text with inline code/xrefs. Template detects complexity (includes, multiple paragraphs) and uses block format automatically."
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"required": ["type", "position", "content"],
|
|
558
|
+
"additionalProperties": false
|
|
559
|
+
},
|
|
560
|
+
"contentItemImportant": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"description": "An IMPORTANT admonition. Use plain text only - template automatically wraps in IMPORTANT: or [IMPORTANT]====...==== depending on complexity.",
|
|
563
|
+
"properties": {
|
|
564
|
+
"type": {
|
|
565
|
+
"const": "important"
|
|
566
|
+
},
|
|
567
|
+
"position": {
|
|
568
|
+
"$ref": "#/$defs/contentPosition"
|
|
569
|
+
},
|
|
570
|
+
"content": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"description": "Important content. Plain text with inline code/xrefs. Template detects complexity (includes, multiple paragraphs) and uses block format automatically."
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"required": ["type", "position", "content"],
|
|
576
|
+
"additionalProperties": false
|
|
577
|
+
},
|
|
578
|
+
"contentItemInclude": {
|
|
579
|
+
"type": "object",
|
|
580
|
+
"description": "An include directive to add a partial or shared content",
|
|
581
|
+
"properties": {
|
|
582
|
+
"type": {
|
|
583
|
+
"const": "include"
|
|
584
|
+
},
|
|
585
|
+
"position": {
|
|
586
|
+
"$ref": "#/$defs/contentPosition"
|
|
587
|
+
},
|
|
588
|
+
"path": {
|
|
589
|
+
"type": "string",
|
|
590
|
+
"description": "Include path (e.g., 'shared:partial$warning-delete-records.adoc')"
|
|
591
|
+
},
|
|
592
|
+
"paths": {
|
|
593
|
+
"type": "array",
|
|
594
|
+
"description": "Multiple include paths",
|
|
595
|
+
"items": {
|
|
596
|
+
"type": "string"
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
"required": ["type", "position"],
|
|
601
|
+
"additionalProperties": false
|
|
602
|
+
},
|
|
603
|
+
"contentItemExample": {
|
|
604
|
+
"type": "object",
|
|
605
|
+
"description": "A single structured example. Writers provide plain text; template generates AsciiDoc code block automatically.",
|
|
606
|
+
"properties": {
|
|
607
|
+
"type": {
|
|
608
|
+
"const": "example"
|
|
609
|
+
},
|
|
610
|
+
"position": {
|
|
611
|
+
"$ref": "#/$defs/contentPosition"
|
|
612
|
+
},
|
|
613
|
+
"description": {
|
|
614
|
+
"type": "string",
|
|
615
|
+
"description": "Optional description shown before the code block (plain text, inline code allowed)"
|
|
616
|
+
},
|
|
617
|
+
"code": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"description": "The code content. Template wraps in [,language]\\n----\\n...\\n----"
|
|
620
|
+
},
|
|
621
|
+
"language": {
|
|
622
|
+
"type": "string",
|
|
623
|
+
"description": "Code language (e.g., 'bash', 'json', 'yaml', 'text'). Defaults to 'bash'.",
|
|
624
|
+
"default": "bash"
|
|
625
|
+
},
|
|
626
|
+
"attributes": {
|
|
627
|
+
"type": "object",
|
|
628
|
+
"description": "Optional AsciiDoc block attributes (e.g., {\"role\": \"no-copy\"})",
|
|
629
|
+
"properties": {
|
|
630
|
+
"role": {
|
|
631
|
+
"type": "string"
|
|
632
|
+
},
|
|
633
|
+
"subs": {
|
|
634
|
+
"type": "string"
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"additionalProperties": true
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"required": ["type", "position", "code"],
|
|
641
|
+
"additionalProperties": false
|
|
642
|
+
},
|
|
643
|
+
"contentItemExamples": {
|
|
644
|
+
"type": "object",
|
|
645
|
+
"description": "Multiple structured examples with optional section title. Template generates proper AsciiDoc section with code blocks.",
|
|
646
|
+
"properties": {
|
|
647
|
+
"type": {
|
|
648
|
+
"const": "examples"
|
|
649
|
+
},
|
|
650
|
+
"position": {
|
|
651
|
+
"$ref": "#/$defs/contentPosition"
|
|
652
|
+
},
|
|
653
|
+
"title": {
|
|
654
|
+
"type": "string",
|
|
655
|
+
"description": "Section title (e.g., 'Examples'). Defaults to 'Examples'.",
|
|
656
|
+
"default": "Examples"
|
|
657
|
+
},
|
|
658
|
+
"items": {
|
|
659
|
+
"type": "array",
|
|
660
|
+
"description": "Array of example items",
|
|
661
|
+
"items": {
|
|
662
|
+
"$ref": "#/$defs/exampleItem"
|
|
663
|
+
},
|
|
664
|
+
"minItems": 1
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
"required": ["type", "position", "items"],
|
|
668
|
+
"additionalProperties": false
|
|
669
|
+
},
|
|
670
|
+
"exampleItem": {
|
|
671
|
+
"type": "object",
|
|
672
|
+
"description": "A single example with description, code, and optional output",
|
|
673
|
+
"properties": {
|
|
674
|
+
"description": {
|
|
675
|
+
"type": "string",
|
|
676
|
+
"description": "Optional description for this example"
|
|
677
|
+
},
|
|
678
|
+
"code": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"description": "The code content"
|
|
681
|
+
},
|
|
682
|
+
"language": {
|
|
683
|
+
"type": "string",
|
|
684
|
+
"description": "Code language. Defaults to 'bash'.",
|
|
685
|
+
"default": "bash"
|
|
686
|
+
},
|
|
687
|
+
"output": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"description": "Optional expected output from running the command"
|
|
690
|
+
},
|
|
691
|
+
"outputLanguage": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"description": "Output block language. Defaults to 'bash'.",
|
|
694
|
+
"default": "bash"
|
|
695
|
+
},
|
|
696
|
+
"attributes": {
|
|
697
|
+
"type": "object",
|
|
698
|
+
"description": "Optional AsciiDoc block attributes",
|
|
699
|
+
"additionalProperties": true
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"required": ["code"],
|
|
703
|
+
"additionalProperties": false
|
|
704
|
+
},
|
|
705
|
+
"subsection": {
|
|
706
|
+
"type": "object",
|
|
707
|
+
"description": "A subsection within a parent section. Template automatically determines heading level based on nesting depth. Use 'content' for AsciiDoc text or 'items' for structured examples.",
|
|
708
|
+
"properties": {
|
|
709
|
+
"title": {
|
|
710
|
+
"type": "string",
|
|
711
|
+
"description": "Subsection title"
|
|
712
|
+
},
|
|
713
|
+
"id": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"description": "Optional ID for this subsection (used for anchors)"
|
|
716
|
+
},
|
|
717
|
+
"content": {
|
|
718
|
+
"type": "string",
|
|
719
|
+
"description": "Subsection content in AsciiDoc format"
|
|
720
|
+
},
|
|
721
|
+
"items": {
|
|
722
|
+
"type": "array",
|
|
723
|
+
"description": "Structured examples with description, code, and optional output",
|
|
724
|
+
"items": {
|
|
725
|
+
"$ref": "#/$defs/exampleItem"
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"subsections": {
|
|
729
|
+
"type": "array",
|
|
730
|
+
"description": "Nested subsections (can be nested arbitrarily deep)",
|
|
731
|
+
"items": {
|
|
732
|
+
"$ref": "#/$defs/subsection"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"required": ["title"],
|
|
737
|
+
"anyOf": [
|
|
738
|
+
{ "required": ["content"] },
|
|
739
|
+
{ "required": ["items"] }
|
|
740
|
+
],
|
|
741
|
+
"additionalProperties": false
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|