struct Athena::Routing::Action::View

Overview

Stores runtime configuration data from the ART::View annotation about how to render the output of the related action.

This includes the action's HTTP::Status and any serialization related configuration options.

Defined in:

athena.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(status : HTTP::Status | Nil = nil, emit_nil : Bool = false, serialization_groups : Array(String) | Nil = nil, validation_groups : Array(String) | Nil = nil) #

[View source]

Instance Method Detail

def emit_nil : Bool #

If nil values should be serialized.


[View source]
def has_custom_status? : Bool #

Returns true if the action related to self defined a custom status via the ART::View annotation, otherwise false.


[View source]
def serialization_groups : Array(String) | Nil #

The serialization groups to use for this route as part of ASR::ExclusionStrategies::Groups.


[View source]
def status : HTTP::Status #

The HTTP::Status this action should return. Defaults to HTTP::Status::OK (200).


[View source]
def validation_groups : Array(String) | Nil #

[View source]