Complete API Dossier

This commit is contained in:
Xavier J 2016-02-26 12:17:41 +01:00
parent a316165792
commit 16c72e7478
7 changed files with 115 additions and 35 deletions

View file

@ -0,0 +1,6 @@
class CerfaSerializer < ActiveModel::Serializer
attributes :content_url => :url
has_one :type_de_champ
end

View file

@ -0,0 +1,5 @@
class ChampSerializer < ActiveModel::Serializer
attributes :value
has_one :type_de_champ
end

View file

@ -4,8 +4,12 @@ class DossierSerializer < ActiveModel::Serializer
:description,
:created_at,
:updated_at,
:archived
:archived,
:mandataire_social
has_one :entreprise
has_one :etablissement
has_one :cerfa
has_many :champs
has_many :pieces_justificatives
end

View file

@ -0,0 +1,5 @@
class PieceJustificativeSerializer < ActiveModel::Serializer
attributes :content_url => :url
has_one :type_de_piece_justificative
end

View file

@ -1,7 +1,7 @@
class TypeDeChampSerializer < ActiveModel::Serializer
attributes :id,
:libelle,
:type_champ,
{:type_champ => :type},
:order_place,
:description
end