abstract class Amber::Schema::ValidatedRequest

Overview

Base class for validated requests Subclasses should define specific typed properties

Defined in:

amber/schema/result.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(validated_data : Hash(String, JSON::Any)) #

Initialize with validated data


[View source]

Class Method Detail

def self.from_raw_data(data : Hash(String, JSON::Any)) : Success(self) | Failure(self) #

Factory method to create from raw data


[View source]

Instance Method Detail

def to_h : Hash(String, JSON::Any) #

Convert to hash


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

Access to raw validated data


[View source]