Incant. Web. API. QueryRequest
(incant v0.1.0)
Copy Markdown
Typed request contract for standalone Incant resource queries.
The standalone HTTP API decodes JSON bodies into this struct at the HTTP boundary before dispatching to the queried resource. Library/embedded consumers do not interact with this module.
Summary
Functions
Decodes a JSON string into this struct.
Decodes a JSON string into this struct, raising on failure.
Dumps this struct into JSON-shaped data, respecting JSON field names.
Builds this struct from a decoded JSON map.
Builds this struct from a decoded JSON map, raising on failure.
Returns a JSON Schema-compatible schema map.
Returns a JSON Schema-compatible schema map.
Converts this struct into a JSON-shaped map.
Types
@type t() :: %Incant.Web.API.QueryRequest{ context: map(), table: Incant.Service.Index.table_state() }
Functions
@spec cast(map()) :: {:ok, t()} | {:error, {:invalid_request, Exception.t()}}
@spec cast_table(map()) :: {:ok, Incant.Service.Index.table_state()} | {:error, {:invalid_request, Exception.t()}}
Decodes a JSON string into this struct.
Decodes a JSON string into this struct, raising on failure.
Dumps this struct into JSON-shaped data, respecting JSON field names.
Builds this struct from a decoded JSON map.
Builds this struct from a decoded JSON map, raising on failure.
Returns a JSON Schema-compatible schema map.
Returns a JSON Schema-compatible schema map.
Converts this struct into a JSON-shaped map.