Class HtmlDocumentationExporter
- Namespace
- Sisk.Documenting.Html
- Assembly
- Sisk.Documenting.Html.dll
Represents a class for exporting API documentation to HTML format.
public class HtmlDocumentationExporter : IApiDocumentationExporter
- Inheritance
-
HtmlDocumentationExporter
- Implements
- Inherited Members
Constructors
- HtmlDocumentationExporter()
Creates an new instance of the HtmlDocumentationExporter class.
Properties
- 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.
- 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.
- 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.
- FormatRequiredText
Gets or sets the format string for required text.
- 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.
- 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
- 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.
- 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.
- GetRouteMethodHexColor(RouteMethod)
Gets the hex color code associated with the specified route method.
- 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.