module

Radarr

Constants

VERSION = "0.1.2"

Macros

def_string_enum(name, members)

Defines a string-valued enum whose JSON representation is the exact camelCase value declared in ext/schema.json.

Crystal's default Enum#to_json emits snake_case member names, which the Radarr API rejects on writes. This macro overrides serialization so writes emit the schema's literal values while reads stay lenient (the built-in case/underscore-insensitive parse is used as a fallback).

Source

Nested types