:title string :description, optional: true array :subtask, each: :hash, optional: true do string :title end endend class Boundary::Serializers::TaskSerializer include ActiveSerializer::ObjectSerializer serialization_rules do attributes :id, :title, :description, :status resources :subtasks do attributes :title end endend