diff --git a/lib/travis/api/v3/service_index.rb b/lib/travis/api/v3/service_index.rb index cca15311..79e3f3e3 100644 --- a/lib/travis/api/v3/service_index.rb +++ b/lib/travis/api/v3/service_index.rb @@ -24,7 +24,7 @@ module Travis::API::V3 def render_json resources = { } - routes.resources.each do |resource| + routes.resources.sort_by(&:identifier).each do |resource| data = resources[resource.identifier] ||= { :@type => :resource, :actions => {} } if renderer = Renderer[resource.identifier, false] and renderer.respond_to? :representations data[:representations] = renderer.representations