Class
HtmlDocumentationExporter
Represents a class for exporting API documentation to HTML format.
public class HtmlDocumentationExporter : IApiDocumentationExporterInheritance #
object ← HtmlDocumentationExporter
Implements #
IApiDocumentationExporter
Inherited Members #
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors #
| Name | Description |
|---|---|
| HtmlDocumentationExporter() | Creates an new instance of the HtmlDocumentationExporter class. |
Properties #
| Name | Description |
|---|---|
| Footer | Gets or sets an optional object to append after the generated contents, right at the end of the <main> tag of the generated page. |
| FormatBackToEndpoints | Gets or sets the format string for the link that returns from an endpoint page to the endpoint listing. |
| FormatEndpointHeaders | Gets or sets the format string for endpoint headers. |
| FormatEndpointParameters | Gets or sets the format string for endpoint request parameters. |
| FormatEndpointPathParameters | Gets or sets the format string for endpoint path parameters. |
| FormatEndpointQueryParameters | Gets or sets the format string for endpoint query parameters. |
| FormatEndpointRequestExamples | Gets or sets the format string for endpoint request examples. |
| FormatEndpointResponses | Gets or sets the format string for endpoint responses. |
| FormatMainTitleServiceVersion | Gets or sets the format string for the main title service version. |
| FormatNavApiReference | Gets or sets the format string for the navigation section title for API Reference. |
| FormatParameterExamples | Gets or sets the heading displayed above the situational examples for a request parameter. |
| FormatRequiredText | Gets or sets the format string for required text. |
| FormatShowLess | Gets or sets the label of the button that collapses an expanded request or response example description. |
| FormatShowMore | Gets or sets the label of the button that expands a long request or response example description. |
| FormatTabExample | Gets or sets the format string for the “Example” tab label. |
| FormatTabSchema | Gets or sets the format string for the “Schema” tab label. |
| Head | Gets or sets an optional object to append inside the <head> tag of the generated page. |
| Header | Gets or sets an optional object to append after the main title, at the beginning of the <main> tag of the generated page. |
| IncludeSidebar | Gets or sets whether to include the sidebar navigation. Default is true. |
| PageTitle | Gets or sets the title of the HTML page. |
| Script | Gets or sets the JavaScript script to be included in the HTML page. |
| Style | Gets or sets the CSS styles of the HTML page. |
Methods #
| Name | Description |
|---|---|
| CreateCodeBlock(string, string?) | Creates an HTML code block element from the provided code and language. |
| CreateEndpointBadge(RouteMethod, string?) | Creates an HTML badge element for an API endpoint. |
| CreateExampleSchemaTabControl(string?, string?, string?, string) | Creates a tab control with Example and Schema tabs when both are available. If only one is available, it renders just that content without tabs. |
| CreateParagraphs(string?) | Creates one or more HTML paragraph elements from the provided text. |
| Ellipsis(string?, int) | Truncates a string to the specified size, appending an ellipsis if necessary. |
| ExportDocumentationContent(ApiDocumentation) | Exports the API documentation as HTTP content. |
| ExportHtml(ApiDocumentation) | Exports the API documentation as an HTML string. |
| GetEndpointId(ApiEndpoint) | Gets the unique HTML ID of an API endpoint, derived from its method and route path. |
| GetRouteMethodHexColor(RouteMethod) | Gets the hex color code associated with the specified route method. |
| IncludePrismJs() | Includes the Prism.js syntax-highlighter library by appending its JavaScript and CSS to the current Script and Style properties. |
| TransformId(string) | Transforms an unsafe ID into a safe and valid HTML ID. |
| WriteEndpointDescription(ApiEndpoint) | Writes the description of an API endpoint. |
| WriteMainTitle(ApiDocumentation) | Writes the main title of the API documentation. |
| WriteSidebarNavigation(ApiDocumentation) | Writes the sidebar navigation for the API documentation. |
| WriteThemeSwitcher() | Writes the color theme switcher, which lets the reader choose between the system, light and dark themes. |