Rename type for rows and cells serializers [SCI-2614][SCI-2616][SCI-2617]

This commit is contained in:
Oleksii Kriuchykhin 2018-08-08 17:15:08 +02:00
parent 6c59e1e159
commit 5efcacbf3d
3 changed files with 4 additions and 4 deletions

View file

@ -3,10 +3,9 @@
module Api
module V1
class InventoryCellSerializer < ActiveModel::Serializer
attribute :id
type :inventory_cells
attributes :id, :data_type, :data
attribute :repository_column_id, key: :column_id
attribute :data_type
attribute :data
def data_type
type_id = RepositoryColumn

View file

@ -3,6 +3,7 @@
module Api
module V1
class InventoryItemSerializer < ActiveModel::Serializer
type :inventory_items
attributes :id, :name
has_many :repository_cells, key: :inventory_cells,
serializer: InventoryCellSerializer,

View file

@ -4,7 +4,7 @@ module Api
module V1
class RepositoryListValueSerializer < ActiveModel::Serializer
attribute :formatted, key: :value
attribute :repository_list_item_id, key: :list_item_id
attribute :repository_list_item_id, key: :inventory_list_item_id
end
end
end