@@ -27,7 +27,7 @@ Class:: `${type.className}`
27
27
<#if sourcedType.groupId?has_content && sourcedType.artifactId?has_content >
28
28
Provider:: `${sourcedType.groupId} :${sourcedType.artifactId} `
29
29
30
- </#if >${(type.description.text)! }
30
+ </#if >${(type.description.text)!'N/A' }
31
31
32
32
[#${type.className?replace('.', '_') } -XML-snippet]
33
33
== XML snippet
@@ -48,16 +48,16 @@ ${indent}${attr.name}="${attr.defaultValue!}"${attr?is_last?then(has_elements?th
48
48
</#list >
49
49
<#if has_elements >
50
50
<#list type.elements as element >
51
- <#assign multiplicitySuffix = (element.multiplicity == '*')?then('<!-- multiple occurrences allowed -- >','')/>
52
- <#assign elementName = 'a-' + element.type?keep_after_last('.') + '-implementation'/ >
53
51
<#if lookup[element.type ]??>
54
52
<#assign element_type = lookup[element.type ].type/>
55
53
<#-- @ftlvariable name="element_type" type="org.apache.logging.log4j.docgen.model.AbstractType" -->
56
54
<#if element_type.name?? && !element_type.implementations?has_content >
57
- <#assign elementName = element_type.name/ >
55
+ <#-- @ftlvariable name="element_type" type="org.apache.logging.log4j.docgen.model.PluginType" -->
56
+ <${element_type.name} />
57
+ <#else >
58
+ <a- ${element.type?keep_after_last( ' .' )}-implementation /><#if element.multiplicity == '*' ><!-- multiple occurrences allowed --> </#if >
58
59
</#if >
59
60
</#if >
60
- <${elementName} />${multiplicitySuffix}
61
61
</#list >
62
62
</${type.name} >
63
63
</#if >
@@ -68,18 +68,17 @@ ${indent}${attr.name}="${attr.defaultValue!}"${attr?is_last?then(has_elements?th
68
68
[#${type.className?replace('.', '_') } -attributes]
69
69
== Attributes
70
70
71
- Optional attributes are denoted by `?`-suffixed types .
71
+ Required attributes are in **bold face** .
72
72
73
73
[cols="1m,1m,1m,5"]
74
74
|===
75
75
|Name|Type|Default|Description
76
76
77
77
<#list type.attributes?sort_by('name') as attr >
78
- <#assign requirementSuffix = attr.required?then('', '?')/ >
79
- |${attr.name}
80
- |xref:../../scalars.adoc#${attr.type?replace('.', '_') } [${attr.type?contains('.')?then(attr.type?keep_after_last('.'), attr.type) } ]${requirementSuffix}
78
+ |${attr.required?then('**', '') }${attr.name}${attr.required?then('**', '') }
79
+ |xref:../../scalars.adoc#${attr.type?replace('.', '_') } [${attr.type?contains('.')?then(attr.type?keep_after_last('.'), attr.type) } ]
81
80
|${attr.defaultValue! }
82
- a|${(attr.description.text)! }
81
+ a|${(attr.description.text)!'N/A' }
83
82
84
83
</#list >
85
84
|===
@@ -89,41 +88,19 @@ a|${(attr.description.text)!}
89
88
[#${type.className?replace('.', '_') } -components]
90
89
== Nested components
91
90
92
- Optional components are denoted by `?`-suffixed types .
91
+ Required components are in **bold face** .
93
92
94
93
[cols="1m,1m,5"]
95
94
|===
96
95
|Tag|Type|Description
97
96
98
97
<#list type.elements?sort_by('type') as element >
99
- <#assign requirementSuffix = element.required?then('', '?')/ >
100
- <#assign descriptionCell = (element.description.text)!/ >
101
- <#assign elementName = element.type?contains('.')?then(element.type?keep_after_last('.'), element.type)/ >
102
98
<#if lookup[element.type ]??>
103
- <#assign elementSourcedType = lookup[element.type ]/>
104
- <#assign elementType = elementSourcedType.type/ >
105
- <#assign tagCell = elementType.name!/ >
106
- <#switch elementType.class.simpleName >
107
- <#case 'PluginType' >
108
- <#case 'AbstractType' >
109
- |${tagCell}
110
- |xref:../../${elementSourcedType.groupId} /${elementSourcedType.artifactId} /${element.type} .adoc[${elementName} ]${requirementSuffix}
111
- a|${descriptionCell}
112
- <#break >
113
- <#case 'ScalarType' >
114
- |${tagCell}
115
- |xref:../scalars.adoc#${element.type?replace('.', '_') } [${elementName} ]${requirementSuffix}
116
- a|${descriptionCell}
117
- <#break >
118
- <#default >
119
- <#stop 'Unknown type `' + element.type + '` modelled in class `' + elementType.class.name + '`'/ >
120
- </#switch >
121
- <#else >
122
- |
123
- |${elementName}${requirementSuffix}
124
- a|${descriptionCell}
125
- </#if >
99
+ |${element.required?then('**', '') + (lookup[element.type].type.name!'N/A') + element.required?then('**', '') }
100
+ |xref:${element.type} .adoc[${element.type?contains('.')?then(element.type?keep_after_last('.'), element.type) } ]
101
+ a|${(element.description.text)!'N/A' }
126
102
103
+ </#if >
127
104
</#list >
128
105
|===
129
106
</#if >
@@ -133,7 +110,6 @@ a|${descriptionCell}
133
110
== Known implementations
134
111
135
112
<#list type.implementations as impl >
136
- <#assign implSourcedType = lookup[impl ]/>
137
- * xref:../../${implSourcedType.groupId} /${implSourcedType.artifactId} /${impl} .adoc[${impl?contains('.')?then(impl?keep_after_last('.'), impl) } ]
113
+ * xref:${impl} .adoc[${impl?contains('.')?then(impl?keep_after_last('.'), impl) } ]
138
114
</#list >
139
115
</#if >
0 commit comments