API Reference ex_params_schema v#0.1.1

Copy Markdown View Source

Modules

A DSL for validating string-heavy params received by LiveViews, Phoenix controllers, JSON APIs, and similar sources, and casting them into typed structs.

Casts input values to the DSL's built-in types.

Generates structs and related functions at compile time from fields declared with use ExParamsSchema.

Normalizes and validates field definitions written in the DSL and map forms.

An internal struct that represents a normalized field definition.

Builds the typespec AST for generated structs from normalized fields.

Associates params schemas with supported callbacks and casts received values.

Expands ExParamsSchema.Handler annotations into callback implementations.

Casts and validates parameters against compiled schemas.

Represents a compiled schema containing normalized fields, JSON Schema, and validation data.

Casts field defaults and validates them against the generated JSON Schema.

Carries the resolved JSON Schema and traversal state while normalizing defaults.

Maps JSON Schema error paths to schema error definitions.

Provides pure functions for converting and matching JSON Pointers and field paths.

Builds JSON Schema Draft 7 documents from normalized fields.

Manages default values and normalization rules for schema-level options.

Converts cast values into JSON-compatible values for JSON Schema validation.

Converts JSON Schema validation results into ExParamsSchema error formats.

Specifies how to use custom types as ExParamsSchema fields.

Represents validation errors returned by parse_detailed/1 and parse_detailed/2.

Recursively casts scalar values, arrays, and objects according to normalized type definitions.