oaspec/codegen/client_security

Values

pub fn capitalize_first(value: String) -> String

Capitalize the first letter of a string (for HTTP scheme prefix).

pub fn generate_security_or_chain(
  sb: string_tree.StringTree,
  ctx: context.Context,
  alternatives: List(spec.SecurityRequirement),
  base_indent: Int,
) -> string_tree.StringTree

Generate a chain of OR alternatives for security requirements. Each alternative is tried in order; the first one with all credentials present is applied. If none match, req is returned unchanged.

pub fn maybe_percent_encode(
  value_expr: String,
  param: spec.Parameter(spec.Resolved),
) -> String

Wrap a value expression with uri.percent_encode or not, based on allowReserved. When allowReserved is true, reserved characters are sent as-is per OpenAPI spec.

Search Document