yard-api 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -3
  3. data/config/yard_api.yml +10 -1
  4. data/lib/yard-api/options.rb +8 -0
  5. data/lib/yard-api/tags/argument_tag.rb +0 -10
  6. data/lib/yard-api/tags.rb +0 -1
  7. data/lib/yard-api/templates/helpers/base_helper.rb +16 -1
  8. data/lib/yard-api/templates/helpers/html_helper.rb +7 -0
  9. data/lib/yard-api/templates/helpers/route_helper.rb +8 -0
  10. data/lib/yard-api/verifier.rb +5 -6
  11. data/lib/yard-api/version.rb +1 -1
  12. data/tasks/yard_api.rake +1 -0
  13. data/templates/api/appendix/json/setup.rb +1 -22
  14. data/templates/api/fulldoc/html/css/common.css +155 -102
  15. data/templates/api/fulldoc/html/css/highlight.css +125 -42
  16. data/templates/api/{layout/html/scripts.erb → fulldoc/html/js/app.js} +24 -20
  17. data/templates/api/fulldoc/html/js/highlight/styles/mono-blue.css +125 -42
  18. data/templates/api/fulldoc/html/setup.rb +1 -1
  19. data/templates/api/fulldoc/json/setup.rb +4 -8
  20. data/templates/api/layout/html/_dynamic_styles.erb +36 -11
  21. data/templates/api/layout/html/layout.erb +3 -2
  22. data/templates/api/layout/html/setup.rb +9 -2
  23. data/templates/api/layout/html/sidebar.erb +5 -4
  24. data/templates/api/layout/json/setup.rb +0 -3
  25. data/templates/api/method_details/html/header.erb +14 -3
  26. data/templates/api/method_details/html/method_signature.erb +10 -2
  27. data/templates/api/method_details/html/setup.rb +10 -15
  28. data/templates/api/tags/html/_example_code_block.erb +44 -1
  29. data/templates/api/tags/html/argument/_list.erb +20 -15
  30. data/templates/api/tags/html/argument/_table.erb +1 -1
  31. data/templates/api/tags/html/argument.erb +2 -2
  32. data/templates/api/tags/html/example_request.erb +3 -3
  33. data/templates/api/tags/html/example_response.erb +2 -2
  34. data/templates/api/topic/html/method_details_list.erb +4 -4
  35. data/templates/api/topic/html/topic_doc.erb +5 -5
  36. metadata +3 -6
  37. data/templates/api/docstring/json/setup.rb +0 -4
  38. data/templates/api/fulldoc/html/js/highlight.zip +0 -0
  39. data/templates/api/topic/json/setup.rb +0 -25
@@ -1,70 +1,153 @@
1
1
  /*
2
- Five-color theme from a single blue hue.
2
+
3
+ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
4
+
3
5
  */
6
+
4
7
  .hljs {
5
8
  display: block;
6
9
  overflow-x: auto;
7
10
  padding: 0.5em;
8
- background: #eaeef3;
11
+ background: #f0f0f0;
9
12
  -webkit-text-size-adjust: none;
10
13
  }
11
14
 
12
15
  .hljs,
13
- .hljs-list .hljs-built_in {
14
- color: #00193a;
16
+ .hljs-subst,
17
+ .hljs-tag .hljs-title,
18
+ .nginx .hljs-title {
19
+ color: black;
15
20
  }
16
21
 
17
- .hljs-keyword,
22
+ .hljs-string,
18
23
  .hljs-title,
19
- .hljs-important,
20
- .hljs-request,
21
- .hljs-header,
22
- .hljs-javadoctag {
23
- font-weight: bold;
24
+ .hljs-constant,
25
+ .hljs-parent,
26
+ .hljs-tag .hljs-value,
27
+ .hljs-rules .hljs-value,
28
+ .hljs-preprocessor,
29
+ .hljs-pragma,
30
+ .haml .hljs-symbol,
31
+ .ruby .hljs-symbol,
32
+ .ruby .hljs-symbol .hljs-string,
33
+ .hljs-template_tag,
34
+ .django .hljs-variable,
35
+ .smalltalk .hljs-class,
36
+ .hljs-addition,
37
+ .hljs-flow,
38
+ .hljs-stream,
39
+ .bash .hljs-variable,
40
+ .apache .hljs-tag,
41
+ .apache .hljs-cbracket,
42
+ .tex .hljs-command,
43
+ .tex .hljs-special,
44
+ .erlang_repl .hljs-function_or_atom,
45
+ .asciidoc .hljs-header,
46
+ .markdown .hljs-header,
47
+ .coffeescript .hljs-attribute {
48
+ color: #800;
24
49
  }
25
50
 
51
+ .smartquote,
26
52
  .hljs-comment,
53
+ .hljs-annotation,
54
+ .hljs-template_comment,
55
+ .diff .hljs-header,
27
56
  .hljs-chunk,
28
- .hljs-template_comment {
29
- color: #738191;
57
+ .asciidoc .hljs-blockquote,
58
+ .markdown .hljs-blockquote {
59
+ color: #888;
30
60
  }
31
61
 
32
- .hljs-string,
33
- .hljs-title,
34
- .hljs-parent,
35
- .hljs-built_in,
62
+ .hljs-number,
63
+ .hljs-date,
64
+ .hljs-regexp,
36
65
  .hljs-literal,
37
- .hljs-filename,
38
- .hljs-value,
39
- .hljs-addition,
40
- .hljs-tag,
41
- .hljs-argument,
42
- .hljs-link_label,
43
- .hljs-blockquote,
44
- .hljs-header {
45
- color: #0048ab;
66
+ .hljs-hexcolor,
67
+ .smalltalk .hljs-symbol,
68
+ .smalltalk .hljs-char,
69
+ .go .hljs-constant,
70
+ .hljs-change,
71
+ .lasso .hljs-variable,
72
+ .makefile .hljs-variable,
73
+ .asciidoc .hljs-bullet,
74
+ .markdown .hljs-bullet,
75
+ .asciidoc .hljs-link_url,
76
+ .markdown .hljs-link_url {
77
+ color: #080;
46
78
  }
47
79
 
80
+ .hljs-label,
81
+ .hljs-javadoc,
82
+ .ruby .hljs-string,
48
83
  .hljs-decorator,
49
- .hljs-prompt,
50
- .hljs-yardoctag,
51
- .hljs-subst,
52
- .hljs-symbol,
53
- .hljs-doctype,
54
- .hljs-regexp,
55
- .hljs-preprocessor,
56
- .hljs-pragma,
57
- .hljs-pi,
58
- .hljs-attribute,
84
+ .hljs-filter .hljs-argument,
85
+ .hljs-localvars,
86
+ .hljs-array,
59
87
  .hljs-attr_selector,
60
- .hljs-javadoc,
61
- .hljs-xmlDocTag,
88
+ .hljs-important,
89
+ .hljs-pseudo,
90
+ .hljs-pi,
91
+ .haml .hljs-bullet,
92
+ .hljs-doctype,
62
93
  .hljs-deletion,
94
+ .hljs-envvar,
63
95
  .hljs-shebang,
64
- .hljs-string .hljs-variable,
65
- .hljs-link_url,
66
- .hljs-bullet,
67
- .hljs-sqbracket,
96
+ .apache .hljs-sqbracket,
97
+ .nginx .hljs-built_in,
98
+ .tex .hljs-formula,
99
+ .erlang_repl .hljs-reserved,
100
+ .hljs-prompt,
101
+ .asciidoc .hljs-link_label,
102
+ .markdown .hljs-link_label,
103
+ .vhdl .hljs-attribute,
104
+ .clojure .hljs-attribute,
105
+ .asciidoc .hljs-attribute,
106
+ .lasso .hljs-attribute,
107
+ .coffeescript .hljs-property,
68
108
  .hljs-phony {
69
- color: #4c81c9;
109
+ color: #88f;
110
+ }
111
+
112
+ .hljs-keyword,
113
+ .hljs-id,
114
+ .hljs-title,
115
+ .hljs-built_in,
116
+ .css .hljs-tag,
117
+ .hljs-javadoctag,
118
+ .hljs-phpdoc,
119
+ .hljs-dartdoc,
120
+ .hljs-yardoctag,
121
+ .smalltalk .hljs-class,
122
+ .hljs-winutils,
123
+ .bash .hljs-variable,
124
+ .apache .hljs-tag,
125
+ .hljs-type,
126
+ .hljs-typename,
127
+ .tex .hljs-command,
128
+ .asciidoc .hljs-strong,
129
+ .markdown .hljs-strong,
130
+ .hljs-request,
131
+ .hljs-status {
132
+ font-weight: bold;
133
+ }
134
+
135
+ .asciidoc .hljs-emphasis,
136
+ .markdown .hljs-emphasis {
137
+ font-style: italic;
138
+ }
139
+
140
+ .nginx .hljs-built_in {
141
+ font-weight: normal;
142
+ }
143
+
144
+ .coffeescript .javascript,
145
+ .javascript .xml,
146
+ .lasso .markup,
147
+ .tex .hljs-formula,
148
+ .xml .javascript,
149
+ .xml .vbscript,
150
+ .xml .css,
151
+ .xml .hljs-cdata {
152
+ opacity: 0.5;
70
153
  }
@@ -1,5 +1,5 @@
1
- <script type="text/javascript">
2
- $('h2.api_method_name').each(function(i, el) {
1
+ $(function() {
2
+ $('.method-details__name').each(function(i, el) {
3
3
  var subtopic = $(el).data('subtopic');
4
4
  var $a = $(el).find('a');
5
5
  var anchorText = $.trim($a[0].innerHTML);
@@ -16,23 +16,6 @@
16
16
  $('<li>').append($link).appendTo($row);
17
17
  });
18
18
 
19
- // Highlight the current page in the sidebar
20
- $(function() {
21
- var currentPage = location.pathname.match(/\/([^\/]+)$/)[1];
22
- var $page = $('#sidebar [href="' + currentPage + '"]');
23
-
24
- if (!currentPage) {
25
- return;
26
- }
27
-
28
- // if ($page.length === 0) {
29
- // $page = $('#sidebar a[href=""]');
30
- // }
31
-
32
- // $page.addClass('active');
33
- console.log('Highlighting current page:', $page, currentPage);
34
- });
35
-
36
19
  $('#content pre').each(function(i, block) {
37
20
  var code;
38
21
  var $block = $(block);
@@ -49,4 +32,25 @@
49
32
 
50
33
  hljs.highlightBlock(block);
51
34
  });
52
- </script>
35
+
36
+ // Make it so that clicking one of these "tabs" for every @example_request
37
+ // dialect switch to that dialect's example. For example: switching between
38
+ // the generated JSON and cURL examples when those anchors are clicked.
39
+ $('.example-codeblocks__tabs').each(function() {
40
+ var $examples = $(this).siblings('.example-codeblocks__example');
41
+
42
+ $(this).find('a').each(function(index) {
43
+ var $example = $examples.eq(index);
44
+
45
+ $(this).on('click', function() {
46
+ $examples.hide().removeClass('active');
47
+ $example.show().addClass('active');
48
+
49
+ $(this).siblings('a.active').removeClass('active');
50
+ $(this).addClass('active');
51
+ });
52
+ });
53
+
54
+ $(this).find('a:first').click();
55
+ });
56
+ });
@@ -1,70 +1,153 @@
1
1
  /*
2
- Five-color theme from a single blue hue.
2
+
3
+ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
4
+
3
5
  */
6
+
4
7
  .hljs {
5
8
  display: block;
6
9
  overflow-x: auto;
7
10
  padding: 0.5em;
8
- background: #eaeef3;
11
+ background: #f0f0f0;
9
12
  -webkit-text-size-adjust: none;
10
13
  }
11
14
 
12
15
  .hljs,
13
- .hljs-list .hljs-built_in {
14
- color: #00193a;
16
+ .hljs-subst,
17
+ .hljs-tag .hljs-title,
18
+ .nginx .hljs-title {
19
+ color: black;
15
20
  }
16
21
 
17
- .hljs-keyword,
22
+ .hljs-string,
18
23
  .hljs-title,
19
- .hljs-important,
20
- .hljs-request,
21
- .hljs-header,
22
- .hljs-javadoctag {
23
- font-weight: bold;
24
+ .hljs-constant,
25
+ .hljs-parent,
26
+ .hljs-tag .hljs-value,
27
+ .hljs-rules .hljs-value,
28
+ .hljs-preprocessor,
29
+ .hljs-pragma,
30
+ .haml .hljs-symbol,
31
+ .ruby .hljs-symbol,
32
+ .ruby .hljs-symbol .hljs-string,
33
+ .hljs-template_tag,
34
+ .django .hljs-variable,
35
+ .smalltalk .hljs-class,
36
+ .hljs-addition,
37
+ .hljs-flow,
38
+ .hljs-stream,
39
+ .bash .hljs-variable,
40
+ .apache .hljs-tag,
41
+ .apache .hljs-cbracket,
42
+ .tex .hljs-command,
43
+ .tex .hljs-special,
44
+ .erlang_repl .hljs-function_or_atom,
45
+ .asciidoc .hljs-header,
46
+ .markdown .hljs-header,
47
+ .coffeescript .hljs-attribute {
48
+ color: #800;
24
49
  }
25
50
 
51
+ .smartquote,
26
52
  .hljs-comment,
53
+ .hljs-annotation,
54
+ .hljs-template_comment,
55
+ .diff .hljs-header,
27
56
  .hljs-chunk,
28
- .hljs-template_comment {
29
- color: #738191;
57
+ .asciidoc .hljs-blockquote,
58
+ .markdown .hljs-blockquote {
59
+ color: #888;
30
60
  }
31
61
 
32
- .hljs-string,
33
- .hljs-title,
34
- .hljs-parent,
35
- .hljs-built_in,
62
+ .hljs-number,
63
+ .hljs-date,
64
+ .hljs-regexp,
36
65
  .hljs-literal,
37
- .hljs-filename,
38
- .hljs-value,
39
- .hljs-addition,
40
- .hljs-tag,
41
- .hljs-argument,
42
- .hljs-link_label,
43
- .hljs-blockquote,
44
- .hljs-header {
45
- color: #0048ab;
66
+ .hljs-hexcolor,
67
+ .smalltalk .hljs-symbol,
68
+ .smalltalk .hljs-char,
69
+ .go .hljs-constant,
70
+ .hljs-change,
71
+ .lasso .hljs-variable,
72
+ .makefile .hljs-variable,
73
+ .asciidoc .hljs-bullet,
74
+ .markdown .hljs-bullet,
75
+ .asciidoc .hljs-link_url,
76
+ .markdown .hljs-link_url {
77
+ color: #080;
46
78
  }
47
79
 
80
+ .hljs-label,
81
+ .hljs-javadoc,
82
+ .ruby .hljs-string,
48
83
  .hljs-decorator,
49
- .hljs-prompt,
50
- .hljs-yardoctag,
51
- .hljs-subst,
52
- .hljs-symbol,
53
- .hljs-doctype,
54
- .hljs-regexp,
55
- .hljs-preprocessor,
56
- .hljs-pragma,
57
- .hljs-pi,
58
- .hljs-attribute,
84
+ .hljs-filter .hljs-argument,
85
+ .hljs-localvars,
86
+ .hljs-array,
59
87
  .hljs-attr_selector,
60
- .hljs-javadoc,
61
- .hljs-xmlDocTag,
88
+ .hljs-important,
89
+ .hljs-pseudo,
90
+ .hljs-pi,
91
+ .haml .hljs-bullet,
92
+ .hljs-doctype,
62
93
  .hljs-deletion,
94
+ .hljs-envvar,
63
95
  .hljs-shebang,
64
- .hljs-string .hljs-variable,
65
- .hljs-link_url,
66
- .hljs-bullet,
67
- .hljs-sqbracket,
96
+ .apache .hljs-sqbracket,
97
+ .nginx .hljs-built_in,
98
+ .tex .hljs-formula,
99
+ .erlang_repl .hljs-reserved,
100
+ .hljs-prompt,
101
+ .asciidoc .hljs-link_label,
102
+ .markdown .hljs-link_label,
103
+ .vhdl .hljs-attribute,
104
+ .clojure .hljs-attribute,
105
+ .asciidoc .hljs-attribute,
106
+ .lasso .hljs-attribute,
107
+ .coffeescript .hljs-property,
68
108
  .hljs-phony {
69
- color: #4c81c9;
109
+ color: #88f;
110
+ }
111
+
112
+ .hljs-keyword,
113
+ .hljs-id,
114
+ .hljs-title,
115
+ .hljs-built_in,
116
+ .css .hljs-tag,
117
+ .hljs-javadoctag,
118
+ .hljs-phpdoc,
119
+ .hljs-dartdoc,
120
+ .hljs-yardoctag,
121
+ .smalltalk .hljs-class,
122
+ .hljs-winutils,
123
+ .bash .hljs-variable,
124
+ .apache .hljs-tag,
125
+ .hljs-type,
126
+ .hljs-typename,
127
+ .tex .hljs-command,
128
+ .asciidoc .hljs-strong,
129
+ .markdown .hljs-strong,
130
+ .hljs-request,
131
+ .hljs-status {
132
+ font-weight: bold;
133
+ }
134
+
135
+ .asciidoc .hljs-emphasis,
136
+ .markdown .hljs-emphasis {
137
+ font-style: italic;
138
+ }
139
+
140
+ .nginx .hljs-built_in {
141
+ font-weight: normal;
142
+ }
143
+
144
+ .coffeescript .javascript,
145
+ .javascript .xml,
146
+ .lasso .markup,
147
+ .tex .hljs-formula,
148
+ .xml .javascript,
149
+ .xml .vbscript,
150
+ .xml .css,
151
+ .xml .hljs-cdata {
152
+ opacity: 0.5;
70
153
  }
@@ -15,7 +15,7 @@ def init
15
15
  return serialize_onefile_index
16
16
  end
17
17
 
18
- serialize_index
18
+ serialize_index if File.exists?(api_options['readme'])
19
19
  serialize_static_pages
20
20
  serialize_resource_index if api_options['resource_index']
21
21
 
@@ -26,13 +26,13 @@ def serialize_resource(resource, controllers)
26
26
  end
27
27
 
28
28
  def method_details_list(controllers)
29
- @meths = controllers.map do |controller|
29
+ meths = controllers.map do |controller|
30
30
  controller.meths(:inherited => false, :included => false)
31
31
  end.flatten
32
32
 
33
- @meths = run_verifier(@meths)
33
+ meths = run_verifier(meths)
34
34
 
35
- @meths.map do |object, i|
35
+ meths.map do |object, i|
36
36
  dump_object(object).tap do |object_info|
37
37
  object_info[:tags] = dump_object_tags(object)
38
38
  end
@@ -94,10 +94,6 @@ def get_route(object)
94
94
  route = routes.first
95
95
 
96
96
  if route.present?
97
- # controller_path = "app/controllers/#{route.requirements[:controller]}_controller.rb"
98
- # controller_path = nil unless File.file?(Rails.root+controller_path)
99
-
100
- route_path = route.path.spec.to_s.gsub("(.:format)", "")
101
97
  verb = if route.verb.source =~ /\^?(\w*)\$/
102
98
  $1.upcase
103
99
  else
@@ -105,7 +101,7 @@ def get_route(object)
105
101
  end
106
102
 
107
103
  {
108
- path: route_path,
104
+ path: route.path.spec.to_s.gsub("(.:format)", ""),
109
105
  verb: verb
110
106
  }
111
107
  end
@@ -1,16 +1,41 @@
1
- <style>
2
- body {
3
- padding-left: <%= api_options.sidebar_width + api_options.spacer %>px;
4
- padding-right: <%= api_options.spacer %>px;
5
- }
6
-
7
- #sidebar {
8
- width: <%= api_options.sidebar_width %>px;
9
- }
1
+ <%
2
+ content_width = api_options.content_width.to_i
3
+ content_width = 720 if content_width <= 0
4
+ sidebar_width = api_options.sidebar_width.to_i || 240
5
+ sidebar_width = 240 if sidebar_width <= 0
6
+ %>
10
7
 
11
- <% if api_options.content_width.to_i > 0 %>
8
+ <style>
9
+ <% if api_options.centered %>
10
+ body {
11
+ margin: 0 auto;
12
+ width: <%= content_width %>px;
13
+ }
14
+
15
+ #sidebar {
16
+ margin-left: -<%= sidebar_width %>px;
17
+ width: <%= sidebar_width %>px;
18
+ left: auto;
19
+ }
20
+
12
21
  #content {
13
- max-width: <%= api_options.content_width %>px;
22
+ padding-left: 3em;
14
23
  }
24
+ <% else %>
25
+ body {
26
+ padding-left: <%= sidebar_width + api_options.spacer %>px;
27
+ padding-right: <%= api_options.spacer %>px;
28
+ }
29
+
30
+ #sidebar {
31
+ width: <%= sidebar_width %>px;
32
+ }
33
+
34
+ <% if content_width > 0 %>
35
+ #content {
36
+ max-width: <%= content_width %>px;
37
+ }
38
+ <% end %>
39
+
15
40
  <% end %>
16
41
  </style>
@@ -29,8 +29,9 @@
29
29
  <div id="content"><%= yieldall %></div>
30
30
  <% end %>
31
31
 
32
- <%= erb(:footer) %>
33
- <%= erb(:scripts) %>
32
+ <% if api_options.show_footer %>
33
+ <%= erb(:footer) %>
34
+ <% end %>
34
35
 
35
36
  <% inline_javascripts.each do |script| %>
36
37
  <%= erb(script) %>
@@ -32,6 +32,7 @@ def javascripts
32
32
  %w[
33
33
  js/jquery-1.11.1.min.js
34
34
  js/highlight/highlight.pack.js
35
+ js/app.js
35
36
  ]
36
37
  end
37
38
 
@@ -44,9 +45,15 @@ def contents
44
45
  end
45
46
 
46
47
  def index
47
- legitimate_objects = @objects.reject {|o| o.root? || !is_class?(o) || !o.meths.find { |m| !m.tags('API').empty? } }
48
+ legitimate_objects = @objects.reject do |object|
49
+ object.root? ||
50
+ !is_class?(object) ||
51
+ !object.meths.find { |m| !m.tags('API').empty? }
52
+ end
48
53
 
49
- @resources = legitimate_objects.sort_by {|o| o.tags('API').first.text }
54
+ @resources = legitimate_objects.sort_by do |object|
55
+ object.tags('API').first.text
56
+ end
50
57
 
51
58
  erb(:index)
52
59
  end
@@ -4,17 +4,18 @@
4
4
  <%= api_options['version'] %>
5
5
  </h1>
6
6
 
7
- <h2 class='first'>Pages</h2>
7
+ <h2 class="sidebar__heading">API</h2>
8
8
 
9
9
  <nav id="static_pages">
10
- <%= sidebar_link('Home', 'index.html') %>
10
+ <%= sidebar_link(api_options.readme_page_title, 'index.html') %>
11
11
  <% static_pages.each do |page| %>
12
12
  <%= sidebar_link(page[:title], page[:filename]) %>
13
13
  <% end %>
14
14
  </nav>
15
15
 
16
- <h2>Resources</h2>
17
- <nav id="api_resources">
16
+ <h2 class="sidebar__heading">Resources</h2>
17
+
18
+ <nav>
18
19
  <% if api_options['resource_index'] %>
19
20
  <%= sidebar_link('All Resources', 'all_resources.html') %>
20
21
  <% end %>
@@ -1,7 +1,4 @@
1
1
  def init
2
- puts "> LAYOUT"
3
- # puts options[:object]
4
-
5
2
  if options[:controllers]
6
3
  sections :layout, [T('topic'), T('appendix')]
7
4
  else
@@ -1,18 +1,29 @@
1
- <div class='method_details'>
1
+ <div class='method-details'>
2
2
  <h2
3
- class='api_method_name'
3
+ class='method-details__name'
4
4
  name='<%= @props[:method_link] %>'
5
5
  data-subtopic='<%= @props[:subtopic] %>'
6
6
  >
7
7
  <a
8
8
  name='<%= @props[:method_link] %>'
9
9
  href='#<%= @props[:method_link] %>'
10
+ class='method-details__name-link'
10
11
  >
11
12
  <%= object.tag('API').text %>
12
13
  </a>
13
14
 
15
+ <% if object.has_tag?('beta') && api_options["use_beta_flag"] %>
16
+ <span
17
+ class="method-details__beta-flag"
18
+ title="This API endpoint is not finalized, and there could be
19
+ breaking changes before its final release."
20
+ >
21
+ BETA
22
+ </span>
23
+ <% end %>
24
+
14
25
  <% if @props[:path] && !api_options.github_url.to_s.empty? %>
15
- <span class='defined-in'>
26
+ <span class='method-details__defined-in'>
16
27
  <a href="<%= api_options.github_url %>/blob/<%= api_options.github_branch %>/<%= @props[:path] %>">
17
28
  <%= "#{@props[:controller]}Controller\##{@props[:action]}" %>
18
29
  </a>
@@ -6,8 +6,16 @@
6
6
  end.join('/')
7
7
  %>
8
8
 
9
- <h3 class='endpoint'>
9
+ <div class='endpoint__path'>
10
10
  <span class="verb <%= route[:verb].downcase %>"><%= route[:verb] %></span>
11
11
  <%= formatted_route_path %>
12
- </h3>
12
+ </div>
13
+
14
+ <% if object.has_tag?('beta') && api_options["use_beta_banner"] %>
15
+ <p class='endpoint__beta-banner'>
16
+ BETA: This API endpoint is not finalized, and there could be breaking
17
+ changes before its final release.
18
+ </p>
19
+ <% end %>
13
20
  <% end %>
21
+