Table of Contents

Class UserAgentDocumentFilter

Namespace
Codebelt.Extensions.Swashbuckle.AspNetCore
Assembly
Codebelt.Extensions.Swashbuckle.AspNetCore.dll

Provides a User-Agent field to the generated OpenApiDocument.

public class UserAgentDocumentFilter : DocumentFilter<UserAgentDocumentOptions>, IDocumentFilter, IConfigurable<UserAgentDocumentOptions>
Inheritance
UserAgentDocumentFilter
Implements
Inherited Members

Remarks

Constructors

UserAgentDocumentFilter(UserAgentDocumentOptions)

Initializes a new instance of the UserAgentDocumentFilter class.

public UserAgentDocumentFilter(UserAgentDocumentOptions options)

Parameters

options UserAgentDocumentOptions

The configured options of this instance.

Methods

Apply(OpenApiDocument, DocumentFilterContext)

Applies post-processing to the swaggerDoc.

public override void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)

Parameters

swaggerDoc OpenApiDocument

The OpenApiDocument to modify.

context DocumentFilterContext

The DocumentFilterContext that provides additional context.

Remarks

Once an OpenApiDocument has been generated you have full control to modify the document however you see fit.

See Also