Sha256: ddfc4a611da8d8aa6dbf1fa894a9f043f2a3f885524a59314075d3a0bd00154b

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 Bytes

Contents

# frozen_string_literal: true

class FooSerializer
  include FastJsonapi::ObjectSerializer

  belongs_to :bar, key: :foo_bar
  has_one :fizz, key: :foo_fizz
  has_many :buzzes, key: :foo_buzzes

  attribute :xyz

  def self.additional_schema
    {
      data: {
        example: {
          attributes: {
            xyz: 'foobar'
          }
        }
      }
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grape_fast_jsonapi-0.2.6 spec/support/serializers/foo_serializer.rb