Sha256: 281c480b928a56d40d4af909790f476e92afbc98c337980fecc017faa3a29d1d

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

# frozen_string_literal: true

class UserEntity < Grape::Entity
  format_with :iso_timestamp, &:iso8601

  expose :username
  expose :name do
    expose :first_name, as: :first, documentation: { type: String, desc: "User's last name" }
    expose :last_name, as: :last, documentation: { type: String, desc: "User's last name" }
  end
  expose :joined_at, format_with: :iso_timestamp
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-grape-entity-0.1.0 spec/support/user_entity.rb