Implement API v2 version index response

pull/1859/head
Hagen Schink 10 years ago
parent 0aa12a5353
commit 3b0f2020d8
  1. 16
      app/views/api/v2/versions/_version.api.rabl

@ -26,4 +26,18 @@
# See doc/COPYRIGHT.rdoc for more details. # See doc/COPYRIGHT.rdoc for more details.
#++ #++
object @version object @version
attributes :id, :name attributes :id,
:name,
:description,
:status
node :defining_project_id do |version|
version.project_id
end
node :start_date, if: lambda { |version| version.start_date.present? } { |version| version.start_date.iso8601 }
node :effective_date, if: lambda { |version| version.effective_date.present? } { |version| version.effective_date.iso8601 }
node :applies_to_project_ids do |version|
version.shared_with
end

Loading…
Cancel
Save