View Source OpenApiSpex.Cast.Error (open_api_spex v3.18.3)

OpenApiSpex Cast Error

Link to this section Summary

Link to this section Types

@type all_of_error() :: {:all_of, [String.t()]}
@type any_of_error() :: {:any_of, [String.t()]}
@type exclusive_max_error() :: {:exclusive_max, non_neg_integer(), non_neg_integer()}
@type exclusive_min_error() :: {:exclusive_min, non_neg_integer(), non_neg_integer()}
Link to this type

invalid_discriminator_value_error()

View Source
@type invalid_discriminator_value_error() ::
  {:invalid_discriminator_value, String.t() | atom()}
@type invalid_enum_error() :: {:invalid_enum}
Link to this type

invalid_format_error()

View Source
@type invalid_format_error() :: {:invalid_format, any()}
Link to this type

invalid_header_error()

View Source
@type invalid_header_error() :: {:invalid_header, String.t() | atom()}
Link to this type

invalid_schema_error()

View Source
@type invalid_schema_error() :: {:invalid_schema_type}
@type invalid_type_error() :: {:invalid_type, String.t() | atom()}
@type max_items_error() :: {:max_items, non_neg_integer(), non_neg_integer()}
@type max_length_error() :: {:max_length, non_neg_integer()}
Link to this type

max_properties_error()

View Source
@type max_properties_error() ::
  {:max_properties, non_neg_integer(), non_neg_integer()}
@type maximum_error() :: {:maximum, integer() | float(), integer() | float()}
@type min_items_error() :: {:min_items, non_neg_integer(), non_neg_integer()}
@type min_length_error() :: {:min_length, non_neg_integer()}
Link to this type

min_properties_error()

View Source
@type min_properties_error() ::
  {:min_properties, non_neg_integer(), non_neg_integer()}
@type minimum_error() :: {:minimum, integer() | float(), integer() | float()}
@type missing_field_error() :: {:missing_field, String.t() | atom()}
Link to this type

missing_header_error()

View Source
@type missing_header_error() :: {:missing_header, String.t() | atom()}
@type multiple_of_error() :: {:multiple_of, non_neg_integer(), non_neg_integer()}
Link to this type

no_value_for_discriminator_error()

View Source
@type no_value_for_discriminator_error() ::
  {:no_value_for_discriminator, String.t() | atom()}
@type null_value_error() :: {:null_value}
@type one_of_error() :: {:one_of, [String.t()]}
@type reason() ::
  :all_of
  | :any_of
  | :invalid_schema_type
  | :exclusive_max
  | :exclusive_min
  | :invalid_discriminator_value
  | :invalid_enum
  | :invalid_format
  | :invalid_type
  | :max_items
  | :max_length
  | :max_properties
  | :maximum
  | :min_items
  | :min_length
  | :minimum
  | :missing_field
  | :missing_header
  | :invalid_header
  | :multiple_of
  | :no_value_for_discriminator
  | :null_value
  | :one_of
  | :unexpected_field
  | :unique_items
@type t() :: %OpenApiSpex.Cast.Error{
  format: String.t(),
  length: non_neg_integer(),
  meta: map(),
  name: String.t(),
  path: [String.t()],
  reason: reason(),
  type: term(),
  value: any()
}
Link to this type

unexpected_field_error()

View Source
@type unexpected_field_error() :: {:unexpected_field, String.t() | atom()}
@type unique_items_error() :: {:unique_items}

Link to this section Functions

@spec message(t()) :: String.t()
Link to this function

message_with_path(error)

View Source
@spec new(map(), args()) :: %OpenApiSpex.Cast.Error{
  format: term(),
  length: term(),
  meta: term(),
  name: term(),
  path: term(),
  reason: term(),
  type: term(),
  value: term()
}