From: David Lutterkort <[email protected]>
---
server/lib/sinatra/rabbit.rb | 1 +
server/views/docs/operation.html.haml | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/server/lib/sinatra/rabbit.rb b/server/lib/sinatra/rabbit.rb
index f8d9e3d..a465ed6 100644
--- a/server/lib/sinatra/rabbit.rb
+++ b/server/lib/sinatra/rabbit.rb
@@ -74,6 +74,7 @@ module Sinatra
coll, oper = @collection, self
::Sinatra::Application.get("/api/docs/#{@collection.name}/#{@name}") do
@collection, @operation = coll, oper
+ @features = driver.features_for_operation(coll.name, oper.name)
respond_to do |format|
format.html { haml :'docs/operation' }
format.xml { haml :'docs/operation' }
diff --git a/server/views/docs/operation.html.haml
b/server/views/docs/operation.html.haml
index b7c3538..927b331 100644
--- a/server/views/docs/operation.html.haml
+++ b/server/views/docs/operation.html.haml
@@ -25,5 +25,19 @@
%em #{p.name}
%td{:style => "width:10em"} #{p.type}
%td #{p.klass}
- %td{:style => "width:10em"} #{p.options.join(',')}
+ %td{:style => "width:10em"} #{p.options.join(', ')}
%td #{p.description}
+ - @features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
+ %tr
+ %th{:colspan => 4}
+ Feature #{f.name}
+ %th{:colspan => 1}
+ %em= f.description
+ - f.decl.operation(@operation.name).each_param do |p|
+ %tr
+ %td{:style => "width:15em"}
+ %em #{p.name}
+ %td{:style => "width:10em"} #{p.type}
+ %td #{p.klass}
+ %td{:style => "width:10em"} #{p.options.join(', ')}
+ %td #{p.description}
--
1.7.4