Skip to content
Vladislav Trotsenko edited this page Apr 10, 2020 · 17 revisions
Macros Description
Macro::AddContractError Provides to set custom error into ctx['contract.name']
Macro::Assign Provides to assign into context value from other context/context chains
Macro::Decorate Provides to decorate model with specified decorator. Supports object or collection as model
Macro::Model Provides to assign model into context. Supports assign by relation chain, relation find_by
Macro::ModelDelete Provides to delete last model in chain
Macro::ModelDestroy Provides to destroy last model in chain
Macro::Inject Provides to set dependency injection in operations
Macro::LinksBuilder Provides to proxy resource path to Service::JsonApi::Paginator and sets composed links into context
Macro::Renderer Provides to render operation result with specified serializer with strict following Jsonapi specification
Macro::Contract::Schema Provides to use Dry::Validation.Schema as operation contract
Macro::Semantic Provides to set value of semantic marker (semantic_success or semantic_failure) into context
Macro::AddContractError Provides to set custom error to namespaced contract)
Clone this wiki locally