abstract struct Meilisearch::Crystal::Resource

Overview

Base value type for stable Meilisearch response schemas.

Included Modules

Direct Known Subclasses

Defined in:

meilisearch/crystal/resource.cr

Constructors

Macro Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Macro Detail

macro define(name, &block) #

Declares a named resource without repeating the base type and JSON mixin.


[View source]
macro field(declaration) #

Defines a required JSON field and maps snake_case Crystal names to the lower-camel-case keys used by Meilisearch.


[View source]
macro field!(declaration) #

Defines a field that may be absent in JSON but exposes a non-nil bang accessor. Accessing a missing value raises the library's MissingValue.


[View source]
macro field?(declaration) #

Defines a boolean JSON field with an idiomatic predicate getter.


[View source]