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. String? flow,
  8. String? authorizationUrl,
  9. Map<String, String>? scopes,
})

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 Authorization scheme to be used in
  /// the Authorization header.
  String? scheme,

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

  /// The flow used by the OAuth2 security scheme.
  String? flow,

  /// The authorization URL to be used for this flow.
  String? authorizationUrl,

  /// The available scopes for the OAuth2 flow.
  Map<String, String>? scopes,
}) = _SecurityScheme;