class Amber::Controller::SchemaParamsWrapper

Overview

Wrapper class that provides backward compatibility between Schema API and the existing Amber::Validators::Params interface

Defined in:

amber/controller/schema_integration.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(validated_data : Hash(String, JSON::Any), raw_params : Amber::Router::Params) #

[View source]

Macro Detail

macro method_missing(call) #

Forward missing methods to raw params for full compatibility


[View source]

Instance Method Detail

def [](key : String | Symbol) #

Delegate array-like access to validated data first, then raw params


[View source]
def []?(key : String | Symbol) #

[View source]
def has_key?(key : String | Symbol) : Bool #

Check if key exists in either validated data or raw params


[View source]
def raw_params : Amber::Router::Params #

[View source]
def to_h #

Convert to hash combining validated and raw data


[View source]
def to_unsafe_h #

Access to raw unvalidated params


[View source]
def validated_data : Hash(String, JSON::Any) #

[View source]
def validation(&) #

Provide access to validation methods for migration


[View source]