View Source Lightning.Credentials.Schema (Lightning v2.10.4)

Structure that can parse JsonSchemas (using ExJsonSchema) and validate changesets for a given schema.

Summary

Types

@type t() :: %Lightning.Credentials.Schema{
  fields: [String.t()],
  name: String.t() | nil,
  root: ExJsonSchema.Schema.Root.t(),
  types: Ecto.Changeset.types()
}

Functions

@spec new(
  json_schema :: %{required(String.t()) => any()} | binary(),
  name :: String.t() | nil
) :: t()
Link to this function

properties(schema, field)

View Source
Link to this function

required?(schema, field)

View Source
Link to this function

validate(changeset, schema)

View Source
@spec validate(changeset :: Ecto.Changeset.t(), schema :: t()) :: Ecto.Changeset.t()