Skip to content

Commit c31ded6

Browse files
committed
generate link for namespaces correctly
1 parent 364e336 commit c31ded6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,18 @@ export function getFilenameForApiItem(apiItem: ApiItem): string {
9696
multipleEntryPoints = true;
9797
}
9898
break;
99+
case ApiItemKind.Namespace:
100+
baseName += '.' + qualifiedName;
101+
break;
102+
// append the file name with the first letter of the ApiItemKind to avoid name collision.
103+
// Sometimes we could have a class/interface and an entry point that have the same name.
104+
// This happened in the admin SDK where the App interface and the app namespace write to the same file.
99105
case ApiItemKind.Class:
106+
baseName += '.' + qualifiedName + '_c';
107+
break;
100108
case ApiItemKind.Interface:
101-
baseName += '.' + qualifiedName;
109+
baseName += '.' + qualifiedName + '_i';
110+
break;
102111
}
103112
}
104113
return baseName + '.md';

0 commit comments

Comments
 (0)