OpenApiDocDescriptor.AddTag method

Adds a tag if it doesn’t exist and returns the existing or newly created tag.

public OpenApiTag AddTag(string name, string? description = null, string? summary = null, 
    string? parent = null, string? kind = null, OpenApiExternalDocs? externalDocs = null, 
    IDictionary? extensions = null)
parameter description
name The name of the tag.
description Optional description of the tag.
summary Optional summary of the tag.
parent Optional parent tag name.
kind Optional kind of the tag.
externalDocs Optional external documentation for the tag.
extensions Optional OpenAPI extensions for the tag.

Return Value

The existing or newly created OpenApiTag.

See Also