annotation Athena::Routing::Annotations::View

Overview

Configures how the endpoint should be rendered.

See ART::Action::ViewContext.

Fields

Example

@[ARTA::Post(path: "/publish/:id")]
@[ARTA::View(status: :accepted, serialization_groups: ["default", "detailed"])]
def publish(id : Int32) : Article
  article = Article.find id
  article.published = true
  article
end

See the external documentation for more information.

Defined in:

annotations.cr