From bf3507a459db0305d1b49b67a637b624f57d174a Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Wed, 2 Apr 2025 12:31:43 -0700 Subject: [PATCH] Add api-documenter.json settings to allow customizing/eliminating various output notices, as well as disabling the "breadcrumb" generation --- .../src/documenters/IConfigFile.ts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/apps/api-documenter/src/documenters/IConfigFile.ts b/apps/api-documenter/src/documenters/IConfigFile.ts index 5f617a33276..3916ea50611 100644 --- a/apps/api-documenter/src/documenters/IConfigFile.ts +++ b/apps/api-documenter/src/documenters/IConfigFile.ts @@ -68,6 +68,63 @@ export interface IConfigPlugin { enabledFeatureNames: string[]; } +/** + * Options specific to the Markdown `outputTarget`. + */ +export interface IMarkdownDocumenterOptions { + /** + * Whether each file should include a "breadcrumb" with hierarchical navigation links. + * + * For example: + * + * ``` + * Home > my-package > MyClass > myMember + * ``` + */ + includeBreadcrumb?: boolean; +} + +/** + * Customize the text used in various generated notices. An empty string eliminates the notice entirely. + */ +export interface ICustomStrings { + /** + * Default string: + * `"\n\n"` + */ + doNotEditBanner?: string | ''; + + /** + * Default string: + * `"Warning: This API is now obsolete. "` + */ + deprecatedBlockWarning?: string | ''; + + /** + * Default string: + * ``` + * "This API is provided as an alpha preview for developers and may change + * based on feedback that we receive. Do not use this API in a production environment." + * ``` + */ + alphaWarning?: string | ''; + + /** + * Default string: + * ``` + * "This API is provided as a beta preview for developers and may change + * based on feedback that we receive. Do not use this API in a production environment." + * ``` + */ + betaWarning?: string | ''; + + /** + * Default string: + * `"(Some inherited members may not be shown because they are not represented in the documentation.)"` + */ + maybeIncompleteResult?: string | ''; +} + /** * This interface represents the api-documenter.json file format. */ @@ -108,4 +165,14 @@ export interface IConfigFile { * Specifies whether inherited members should also be shown on an API item's page. */ showInheritedMembers?: boolean; + + /** + * Options specific to the Markdown `outputTarget`. + */ + markdownDocumenterOptions: IMarkdownDocumenterOptions; + + /** + * Customize the text used in various generated notices. An empty string eliminates the notice entirely. + */ + customStrings: ICustomStrings; }