SecurityScheme constructor

  1. @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
const SecurityScheme({
  1. required String type,
  2. String? description,
  3. String? name,
  4. @JsonKey.new(name: 'in') ParameterLocation? location,
  5. String? scheme,
  6. String? bearerFormat,
  7. OAuthFlows? flows,
  8. String? openIdConnectUrl,
  9. @JsonKey.new(includeIfNull: false, includeFromJson: false, includeToJson: false) Map<String, dynamic>? extensions,
})

Creates a SecurityScheme object.

Implementation

@JsonSerializable(includeIfNull: false, explicitToJson: true)
const factory SecurityScheme({
  /// The type of the security scheme.
  required String type,

  /// A short description of the security scheme.
  String? description,

  /// The name of the header, query, or cookie parameter to be used.
  String? name,

  /// The location of the API key.
  @JsonKey(name: 'in') ParameterLocation? location,

  /// The name of the HTTP Authentication scheme.
  String? scheme,

  /// A hint to the client to identify the bearer token format.
  String? bearerFormat,

  /// Configuration information for the flow types supported.
  OAuthFlows? flows,

  /// Well-known URL to discover the OpenID Connect provider metadata.
  String? openIdConnectUrl,

  /// Vendor extensions (keys like `x-*`).
  @JsonKey(includeIfNull: false, includeFromJson: false, includeToJson: false)
  Map<String, dynamic>? extensions,
}) = _SecurityScheme;