class Athena::Routing::Action::ViewContext
- Athena::Routing::Action::ViewContext
- Reference
- Object
Overview
Stores runtime configuration data from the ARTA::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:
action.crConstructors
Instance Method Summary
-
#emit_nil : Bool
Returns
trueifnilvalues should be serialized. -
#emit_nil=(emit_nil : Bool)
Returns
trueifnilvalues should be serialized. -
#has_custom_status? : Bool
Returns
trueif the action related toselfdefined a custom status via theARTA::Viewannotation, otherwisefalse. -
#serialization_groups : Array(String) | Nil
Returns the groups that should be used for serialization as part of
ASR::ExclusionStrategies::Groups. -
#serialization_groups=(serialization_groups : Array(String) | Nil)
Returns the groups that should be used for serialization as part of
ASR::ExclusionStrategies::Groups. -
#status : HTTP::Status
Returns the
HTTP::Statusthis action should return. -
#status=(status : HTTP::Status)
Returns the
HTTP::Statusthis action should return. -
#validation_groups : Array(String) | Nil
Returns the groups that should be used to validate any objects related to this route.
-
#validation_groups=(validation_groups : Array(String) | Nil)
Returns the groups that should be used to validate any objects related to this route.
-
#version : String | Nil
Returns the serialization version to use for this route as part of
ASR::ExclusionStrategies::Version. -
#version=(version : String | Nil)
Returns the serialization version to use for this route as part of
ASR::ExclusionStrategies::Version.
Constructor Detail
Instance Method Detail
Returns true if the action related to self defined a custom status via the ARTA::View annotation, otherwise false.
Returns the groups that should be used for serialization as part of ASR::ExclusionStrategies::Groups.
Returns the groups that should be used for serialization as part of ASR::ExclusionStrategies::Groups.
Returns the HTTP::Status this action should return. Defaults to HTTP::Status::OK (200).
Returns the HTTP::Status this action should return. Defaults to HTTP::Status::OK (200).
Returns the groups that should be used to validate any objects related to this route.
See AVD::Constraint@validation-groups.
Returns the groups that should be used to validate any objects related to this route.
See AVD::Constraint@validation-groups.
Returns the serialization version to use for this route as part of ASR::ExclusionStrategies::Version.
Can be set as part of an ART::Events::Action event listener based on the resolved version of the request.
Returns the serialization version to use for this route as part of ASR::ExclusionStrategies::Version.
Can be set as part of an ART::Events::Action event listener based on the resolved version of the request.