ข้ามไปยังเนื้อหา

Class XmlCommentsDocumentTransformer

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.AspNetCore.Transformers
Assembly: Cephalon.AspNetCore.dll

Enriches generated OpenAPI schemas with XML documentation comments discovered from loaded assemblies.

public sealed class XmlCommentsDocumentTransformer : IOpenApiDocumentTransformer

objectXmlCommentsDocumentTransformer

IOpenApiDocumentTransformer

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

This transformer keeps OpenAPI descriptions aligned with the XML comments written on public contracts, including summaries, remarks, and examples when available.

XmlCommentsDocumentTransformer(string[]?)

Section titled “ XmlCommentsDocumentTransformer(string[]?)”

Enriches generated OpenAPI schemas with XML documentation comments discovered from loaded assemblies.

public XmlCommentsDocumentTransformer(string[]? xmlFiles = null)

xmlFiles string[]?

Optional explicit XML documentation files to scan. When omitted, the transformer searches the current application assemblies and base directory for generated XML documentation files.

This transformer keeps OpenAPI descriptions aligned with the XML comments written on public contracts, including summaries, remarks, and examples when available.

TransformAsync(OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken)

Section titled “ TransformAsync(OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken)”

Applies XML comment data to the OpenAPI document schemas produced for the current request.

public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken)

document OpenApiDocument

The OpenAPI document being transformed.

context OpenApiDocumentTransformerContext

The transformation context for the current document generation.

cancellationToken CancellationToken

A token that can cancel document transformation.

Task

A task that completes when the transformation has finished.