aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/api
diff options
context:
space:
mode:
authorjpl2017-02-28 19:20:03 +0100
committerjpl2017-02-28 19:20:03 +0100
commit886088ed4944865689debc8d821ce04753650e81 (patch)
treeebca5f86daa65f3076dcfa7bc645232597fed387 /app/views/api
parent070c93312ab8db54d6b5e5babbf5ea433ebd6f33 (diff)
downloadchouette-core-886088ed4944865689debc8d821ce04753650e81.tar.bz2
Refs #2648: jp_collection refacto, to allow adding a jp from scratch
Diffstat (limited to 'app/views/api')
-rw-r--r--app/views/api/v1/stop_areas/short_description.rabl3
-rw-r--r--app/views/api/v1/stop_areas/show.rabl4
2 files changed, 3 insertions, 4 deletions
diff --git a/app/views/api/v1/stop_areas/short_description.rabl b/app/views/api/v1/stop_areas/short_description.rabl
index fb0213510..7d571b0a2 100644
--- a/app/views/api/v1/stop_areas/short_description.rabl
+++ b/app/views/api/v1/stop_areas/short_description.rabl
@@ -1,10 +1,9 @@
object @stop_area
extends "api/v1/trident_objects/short_description"
-[ :id, :name, :area_type, :longitude, :latitude, :long_lat_type].each do |attr|
+[:id, :name, :city_name, :zip_code, :area_type, :longitude, :latitude, :long_lat_type].each do |attr|
attributes attr, :unless => lambda { |m| m.send( attr).nil?}
end
node(:parent_object_id) do |stop_area|
stop_area.parent.objectid
end unless root_object.parent.nil?
-
diff --git a/app/views/api/v1/stop_areas/show.rabl b/app/views/api/v1/stop_areas/show.rabl
index 1a0acecc5..3d4e5ba55 100644
--- a/app/views/api/v1/stop_areas/show.rabl
+++ b/app/views/api/v1/stop_areas/show.rabl
@@ -1,7 +1,7 @@
object @stop_area
extends "api/v1/trident_objects/show"
-[ :name, :area_type,:nearest_topic_name, :fare_code, :registration_number,
+[:name, :area_type, :nearest_topic_name, :fare_code, :registration_number,
:longitude, :latitude, :long_lat_type,
:country_code, :street_name, :projection_x, :projection_y, :projection, :comment
].each do |attr|
@@ -10,7 +10,7 @@ end
node(:routing_stop_area_object_ids) do |stop_area|
stop_area.routing_stops.map(&:objectid)
-end unless root_object.routing_stops.empty?
+end unless root_object.routing_stops.empty?
node(:routing_line_object_ids) do |stop_area|
stop_area.routing_lines.map(&:objectid)