diff --git a/README.rst b/README.rst index aad752cc..ea838d36 100644 --- a/README.rst +++ b/README.rst @@ -136,6 +136,9 @@ app_info meta Hash or array with custom metadata. +deprecated + Boolean value indicating if the resource is marked as deprecated. (Default false) + Example: ~~~~~~~~ @@ -154,6 +157,7 @@ Example: error 500, "Server crashed for some <%= reason %>", :meta => {:anything => "you can think of"} error :unprocessable_entity, "Could not save the entity." meta :author => {:name => 'John', :surname => 'Doe'} + deprecated false description <<-EOS == Long description Example resource for rest api documentation diff --git a/app/views/apipie/apipies/index.html.erb b/app/views/apipie/apipies/index.html.erb index 5f29bf2c..76a4fa2d 100644 --- a/app/views/apipie/apipies/index.html.erb +++ b/app/views/apipie/apipies/index.html.erb @@ -16,7 +16,11 @@

<%= api[:name] %> -
+ + <% if api[:deprecated] %> + DEPRECATED + <% end %> +
<%= api[:short_description] %>

diff --git a/app/views/apipie/apipies/resource.html.erb b/app/views/apipie/apipies/resource.html.erb index 11fbff72..ffd91274 100644 --- a/app/views/apipie/apipies/resource.html.erb +++ b/app/views/apipie/apipies/resource.html.erb @@ -13,6 +13,9 @@