From 0bc86d0638a52ff906ac1c771e95a423343e4a3b Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 14 Apr 2021 21:46:39 +0200 Subject: [PATCH] build: some public API docs missing descriptions 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. --- tools/dgeni/common/dgeni-definitions.ts | 1 - tools/dgeni/templates/method.template.html | 6 +++--- tools/dgeni/templates/property.template.html | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/dgeni/common/dgeni-definitions.ts b/tools/dgeni/common/dgeni-definitions.ts index 1009b7e2a2bc..d8e0884e4d93 100644 --- a/tools/dgeni/common/dgeni-definitions.ts +++ b/tools/dgeni/common/dgeni-definitions.ts @@ -40,7 +40,6 @@ export interface CategorizedClassDoc extends ClassExportDoc, CategorizedClassLik /** Extended Dgeni property-member document that includes extracted Angular metadata. */ export interface CategorizedPropertyMemberDoc extends PropertyMemberDoc, DeprecationInfo { - description: string; isDirectiveInput: boolean; isDirectiveOutput: boolean; directiveInputAlias: string; diff --git a/tools/dgeni/templates/method.template.html b/tools/dgeni/templates/method.template.html index 0f85d98455a3..cd2a9667f287 100644 --- a/tools/dgeni/templates/method.template.html +++ b/tools/dgeni/templates/method.template.html @@ -18,10 +18,10 @@ - {%- if method.description -%} + {%- if method.content -%} - {$ method.description | marked | safe $} + {$ method.content | marked | safe $} {%- endif -%} @@ -45,7 +45,7 @@

- {$ parameter.description | marked | safe $} + {$ parameter.content | marked | safe $}

diff --git a/tools/dgeni/templates/property.template.html b/tools/dgeni/templates/property.template.html index d0ca188d8519..d205b7ab7b28 100644 --- a/tools/dgeni/templates/property.template.html +++ b/tools/dgeni/templates/property.template.html @@ -24,11 +24,11 @@
Deprecated
- {%- endif -%} + {%- endif -%}

{$ property.name $}: {$ property.type $}

- {$ property.description | marked | safe $} + {$ property.content | marked | safe $}