hensei-api/app/blueprints/api/v1/raid_group_blueprint.rb
Justin Edmund 76f3b85613 Update raid blueprints
- Show flat representation of raid group in RaidBlueprint's nested view
- Show nested representation of raid in RaidGroupBlueprint's full view
2025-02-09 18:04:43 -08:00

23 lines
472 B
Ruby

# frozen_string_literal: true
module Api
module V1
class RaidGroupBlueprint < ApiBlueprint
view :flat do
field :name do |group|
{
en: group.name_en,
ja: group.name_jp
}
end
fields :difficulty, :order, :section, :extra, :guidebooks, :hl
end
view :full do
include_view :flat
association :raids, blueprint: RaidBlueprint, view: :nested
end
end
end
end