Share via


OpenApiSecurityRequirement Class

Definition

Security Requirement Object. Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.

public class OpenApiSecurityRequirement : System.Collections.Generic.Dictionary<Microsoft.OpenApi.Models.OpenApiSecurityScheme,System.Collections.Generic.IList<string>>, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
type OpenApiSecurityRequirement = class
    inherit Dictionary<OpenApiSecurityScheme, IList<string>>
    interface IOpenApiSerializable
    interface IOpenApiElement
Public Class OpenApiSecurityRequirement
Inherits Dictionary(Of OpenApiSecurityScheme, IList(Of String))
Implements IOpenApiSerializable
Inheritance
OpenApiSecurityRequirement
Implements

Constructors

OpenApiSecurityRequirement()

Initializes the OpenApiSecurityRequirement class. This constructor ensures that only Reference.Id is considered when two dictionary keys of type OpenApiSecurityScheme are compared.

Methods

SerializeAsV2(IOpenApiWriter)

Serialize OpenApiSecurityRequirement to Open Api v2.0

SerializeAsV3(IOpenApiWriter)

Serialize OpenApiSecurityRequirement to Open Api v3.0

Extension Methods

Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

Applies to