ExJsonschema.CompilationError (ExJsonschema v0.1.17)

View Source

Represents an error that occurred during JSON Schema compilation.

This struct provides detailed information about what went wrong during schema compilation, including the error type, message, and any additional context.

Summary

Functions

Creates a CompilationError from a draft detection error.

Creates a CompilationError from a map returned by the NIF.

Creates a CompilationError from an options validation error.

Creates a CompilationError from a validation error during compilation.

Types

t()

@type t() :: %ExJsonschema.CompilationError{
  details: String.t() | nil,
  message: String.t(),
  type:
    :json_parse_error
    | :schema_validation_error
    | :compilation_error
    | :options_error
    | :detection_error
    | :validation_error
}

Functions

from_detection_error(reason)

@spec from_detection_error(String.t()) :: t()

Creates a CompilationError from a draft detection error.

from_map(map)

@spec from_map(map()) :: t()

Creates a CompilationError from a map returned by the NIF.

from_options_error(reason)

@spec from_options_error(String.t()) :: t()

Creates a CompilationError from an options validation error.

from_validation_error(reason)

@spec from_validation_error(String.t()) :: t()

Creates a CompilationError from a validation error during compilation.