open_api_spex v3.4.0 OpenApiSpex.Cast.Error View Source

Link to this section Summary

Link to this section Types

Link to this type

all_of_error() View Source
all_of_error() :: {:all_of, [String.t()]}

Link to this type

any_of_error() View Source
any_of_error() :: {:any_of, [String.t()]}

Link to this type

exclusive_max_error() View Source
exclusive_max_error() :: {:exclusive_max, non_neg_integer(), non_neg_integer()}

Link to this type

exclusive_min_error() View Source
exclusive_min_error() :: {:exclusive_min, non_neg_integer(), non_neg_integer()}

Link to this type

invalid_discriminator_value_error() View Source
invalid_discriminator_value_error() ::
  {:invalid_discriminator_value, String.t() | atom()}

Link to this type

invalid_enum_error() View Source
invalid_enum_error() :: {:invalid_enum}

Link to this type

invalid_format_error() View Source
invalid_format_error() :: {:invalid_format, any()}

Link to this type

invalid_schema_error() View Source
invalid_schema_error() :: {:invalid_schema_type}

Link to this type

invalid_type_error() View Source
invalid_type_error() :: {:invalid_type, String.t() | atom()}

Link to this type

max_items_error() View Source
max_items_error() :: {:max_items, non_neg_integer(), non_neg_integer()}

Link to this type

max_length_error() View Source
max_length_error() :: {:max_length, non_neg_integer()}

Link to this type

max_properties_error() View Source
max_properties_error() ::
  {:max_properties, non_neg_integer(), non_neg_integer()}

Link to this type

maximum_error() View Source
maximum_error() :: {:maximum, integer(), integer()}

Link to this type

min_items_error() View Source
min_items_error() :: {:min_items, non_neg_integer(), non_neg_integer()}

Link to this type

min_length_error() View Source
min_length_error() :: {:min_length, non_neg_integer()}

Link to this type

minimum_error() View Source
minimum_error() :: {:minimum, integer(), integer()}

Link to this type

missing_field_error() View Source
missing_field_error() :: {:missing_field, String.t() | atom()}

Link to this type

multiple_of_error() View Source
multiple_of_error() :: {:multiple_of, non_neg_integer(), non_neg_integer()}

Link to this type

no_value_for_discriminator_error() View Source
no_value_for_discriminator_error() ::
  {:no_value_for_discriminator, String.t() | atom()}

Link to this type

null_value_error() View Source
null_value_error() :: {:null_value}

Link to this type

one_of_error() View Source
one_of_error() :: {:one_of, [String.t()]}

Link to this type

reason() View Source
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
  | :multiple_of
  | :no_value_for_discriminator
  | :null_value
  | :one_of
  | :unexpected_field
  | :unique_items

Link to this type

t() View Source
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
unexpected_field_error() :: {:unexpected_field, String.t() | atom()}

Link to this type

unique_items_error() View Source
unique_items_error() :: {:unique_items}

Link to this section Functions

Link to this function

message(error) View Source
message(t()) :: String.t()

Link to this function

message_with_path(error) View Source

Link to this function

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