annotation Athena::Routing::View

Overview

Configures how the endpoint should be rendered.

See ART::Action::ViewContext.

Fields

Example

@[ART::Post(path: "/publish/:id")]
@[ART::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