v3: in service index, sort resources alphabetically
This commit is contained in:
parent
ee03ebfbe5
commit
2610c03801
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user