aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-19 09:57:01 +0200
committerJochen Topf <jochen@topf.org>2014-09-19 09:57:01 +0200
commit393e11f721c526b46c6da3c12d6b10583b3ff959 (patch)
tree1f533ef96201ce9a3b238a825222ab8fa95b53d3
parentd3482cff9698d1e636669d7e4680b240d92fbdef (diff)
downloadtaginfo-393e11f721c526b46c6da3c12d6b10583b3ff959.tar
taginfo-393e11f721c526b46c6da3c12d6b10583b3ff959.tar.gz
Show JOSM-related API calls as deprecated.
-rw-r--r--web/lib/api/v4/josm.rb4
-rw-r--r--web/lib/api/v4/key.rb1
-rw-r--r--web/lib/api/v4/tag.rb1
-rw-r--r--web/views/taginfo/apidoc.erb16
4 files changed, 11 insertions, 11 deletions
diff --git a/web/lib/api/v4/josm.rb b/web/lib/api/v4/josm.rb
index c3b2c7e..e72e484 100644
--- a/web/lib/api/v4/josm.rb
+++ b/web/lib/api/v4/josm.rb
@@ -2,7 +2,8 @@
class Taginfo < Sinatra::Base
api(4, 'josm/style/image', {
- :description => 'Access images for map features used in JOSM.',
+ :superseded_by => '',
+ :description => 'DEPRECATED. Access images for map features used in JOSM.',
:parameters => {
:style => 'JOSM style (required).',
:image => 'Image path (required).'
@@ -21,6 +22,7 @@ class Taginfo < Sinatra::Base
end
api(4, 'josm/style/rules', {
+ :superseded_by => '',
:description => 'List rules and symbols in JOSM styles.',
:parameters => {
:style => 'JOSM style (required).',
diff --git a/web/lib/api/v4/key.rb b/web/lib/api/v4/key.rb
index 83d09fd..c88092a 100644
--- a/web/lib/api/v4/key.rb
+++ b/web/lib/api/v4/key.rb
@@ -106,6 +106,7 @@ class Taginfo < Sinatra::Base
end
api(4, 'key/josm/style/rules', {
+ :superseded_by => '',
:description => 'List rules and symbols for the given key in JOSM styles.',
:parameters => {
:style => 'JOSM style (required).',
diff --git a/web/lib/api/v4/tag.rb b/web/lib/api/v4/tag.rb
index b6fdbbe..80bdc61 100644
--- a/web/lib/api/v4/tag.rb
+++ b/web/lib/api/v4/tag.rb
@@ -126,6 +126,7 @@ class Taginfo < Sinatra::Base
end
api(4, 'tag/josm/style/rules', {
+ :superseded_by => '',
:description => 'List rules and symbols for the given tag in JOSM styles.',
:parameters => {
:style => 'JOSM style (required).',
diff --git a/web/views/taginfo/apidoc.erb b/web/views/taginfo/apidoc.erb
index 79b71d1..a6bf9d6 100644
--- a/web/views/taginfo/apidoc.erb
+++ b/web/views/taginfo/apidoc.erb
@@ -8,11 +8,9 @@
<% API.paths.keys.sort.each do |version|
if version > 0
API.paths[version].keys.sort.each do |path|
- doc = API.paths[version][path]
- if !doc.deprecated? || params[:show_deprecated] %>
- <li><a href="#<%= doc.complete_path.tr('/', '_')[1,1000] %>"><%= doc.complete_path %></a><%= doc.deprecated? ? " <span class='bad'>Deprecated. Use <a href='##{ doc.superseded_by.tr('/', '_')[1,1000] }'>#{ doc.superseded_by }</a> instead.</span>" : '' %></li>
-<% end
- end
+ doc = API.paths[version][path] %>
+ <li><a href="#<%= doc.complete_path.tr('/', '_')[1,1000] %>"><%= doc.complete_path %></a><%= doc.deprecated? ? " <span class='bad'>Deprecated</span>" : '' %></li>
+<% end
end
end %>
</ul>
@@ -21,10 +19,9 @@
if version > 0
API.paths[version].keys.sort.each do |path|
doc = API.paths[version][path]
- if !doc.deprecated? || params[:show_deprecated]
- hashpath = doc.complete_path.tr('/', '_')[1,1000] %>
+ hashpath = doc.complete_path.tr('/', '_')[1,1000] %>
<a name="<%= hashpath %>"></a>
-<h2><%= doc.complete_path %><%= doc.deprecated? ? " <span class='bad'>Deprecated. Use <a href='##{ doc.superseded_by.tr('/', '_')[1,1000] }'>#{ doc.superseded_by }</a> instead.</span>" : '' %></h2>
+<h2><%= doc.complete_path %><%= doc.deprecated? ? " <span class='bad'>Deprecated</span>" : '' %></h2>
<table class="desc">
<tr>
<th>Path:</th>
@@ -69,7 +66,6 @@
</tr>
<% end %>
</table>
-<% end
- end
+<% end
end
end %>