Skip to content

Commit c2d5b7c

Browse files
authored
build: some public API docs missing descriptions (#22482)
Fixes that some inherited class members didn't have descriptions in the generated docs. The problem seems to be that we were using the `description` field, whereas the text was in the `content` field. I don't have the context behind why we were using `description`, but the field doesn't exist in Dgeni's typings and `content` seems to work in all the cases I tried.
1 parent 278f2ab commit c2d5b7c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

tools/dgeni/common/dgeni-definitions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export interface CategorizedClassDoc extends ClassExportDoc, CategorizedClassLik
4040

4141
/** Extended Dgeni property-member document that includes extracted Angular metadata. */
4242
export interface CategorizedPropertyMemberDoc extends PropertyMemberDoc, DeprecationInfo {
43-
description: string;
4443
isDirectiveInput: boolean;
4544
isDirectiveOutput: boolean;
4645
directiveInputAlias: string;

tools/dgeni/templates/method.template.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
</th>
1919
</tr>
2020
</thead>
21-
{%- if method.description -%}
21+
{%- if method.content -%}
2222
<tr class="docs-api-method-description-row">
2323
<td colspan="2" class="docs-api-method-description-cell">
24-
{$ method.description | marked | safe $}
24+
{$ method.content | marked | safe $}
2525
</td>
2626
</tr>
2727
{%- endif -%}
@@ -45,7 +45,7 @@
4545
</td>
4646
<td class="docs-api-method-parameter-description-cell">
4747
<p class="docs-api-method-parameter-description">
48-
{$ parameter.description | marked | safe $}
48+
{$ parameter.content | marked | safe $}
4949
</p>
5050
</td>
5151
</tr>

tools/dgeni/templates/property.template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
<div class="docs-api-deprecated-marker" {$ macros.deprecationTitle(property) $}>
2525
Deprecated
2626
</div>
27-
{%- endif -%}
27+
{%- endif -%}
2828

2929
<p class="docs-api-property-name">
3030
<code>{$ property.name $}: {$ property.type $}</code>
3131
</p>
3232
</td>
33-
<td class="docs-api-property-description">{$ property.description | marked | safe $}</td>
33+
<td class="docs-api-property-description">{$ property.content | marked | safe $}</td>
3434
</tr>

0 commit comments

Comments
 (0)