flag the following apis as beta
adds support for flagging individual endpoints, not just resources, as beta. test plan: generate the api docs and verify that the tagged endpoints have a beta message. Change-Id: Iba815db309ee71482e1f471eaf613527cd7114ec Reviewed-on: https://gerrit.instructure.com/11585 Reviewed-by: Simon Williams <simon@instructure.com> Tested-by: Jenkins <jenkins@instructure.com>
This commit is contained in:
parent
e2704f1ace
commit
acd7bbab97
|
@ -17,6 +17,7 @@
|
|||
#
|
||||
|
||||
# @API Collections
|
||||
# @beta
|
||||
#
|
||||
# Collections contain Collection Items, which are links to content. There are
|
||||
# different types of items for links to different types of data.
|
||||
|
|
|
@ -406,6 +406,7 @@ class GroupsController < ApplicationController
|
|||
end
|
||||
|
||||
# @API Follow a group
|
||||
# @beta
|
||||
#
|
||||
# Follow this group. If the current user is already following the
|
||||
# group, nothing happens. The user must have permissions to view the
|
||||
|
@ -439,6 +440,7 @@ class GroupsController < ApplicationController
|
|||
end
|
||||
|
||||
# @API Un-follow a group
|
||||
# @beta
|
||||
#
|
||||
# Stop following this group. If the current user is not already
|
||||
# following the group, nothing happens.
|
||||
|
|
|
@ -893,20 +893,19 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#@API Delete a user.
|
||||
# @API Delete a user
|
||||
#
|
||||
# Delete a user record from Canvas.
|
||||
#
|
||||
# WARNING: This API will allow a user to delete themselves. If you do this,
|
||||
# you won't be able to make API calls or log into Canvas.
|
||||
#
|
||||
# @example_request
|
||||
#
|
||||
# curl https://<canvas>/api/v1/users/5 \
|
||||
# -H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
||||
# -X DELETE
|
||||
# curl https://<canvas>/api/v1/users/5 \
|
||||
# -H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
||||
# -X DELETE
|
||||
#
|
||||
# @example_response
|
||||
#
|
||||
# {
|
||||
# "id":133,
|
||||
# "login_id":"bieber@example.com",
|
||||
|
@ -1075,6 +1074,7 @@ class UsersController < ApplicationController
|
|||
include Api::V1::UserFollow
|
||||
|
||||
# @API Follow a user
|
||||
# @beta
|
||||
#
|
||||
# Follow this user. If the current user is already following the
|
||||
# target user, nothing happens. The target user must have a public profile in
|
||||
|
@ -1110,6 +1110,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
# @API Un-follow a user
|
||||
# @beta
|
||||
#
|
||||
# Stop following this user. If the current user is not already
|
||||
# following the target user, nothing happens.
|
||||
|
|
|
@ -43,6 +43,7 @@ h3.beta {
|
|||
background-color: #E5E8FF;
|
||||
text-align: center;
|
||||
padding: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
|
@ -94,7 +95,7 @@ h3.beta {
|
|||
.syntaxhighlighter .line code { white-space: nowrap; }
|
||||
.syntaxhighlighter { overflow: auto; }
|
||||
|
||||
.method_details h3 {
|
||||
.method_details h3.endpoint {
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
font-family: Monaco, Consolas, Courier, monospace;
|
||||
|
|
|
@ -7,5 +7,8 @@
|
|||
<span class='defined-in'><a href="https://github.com/instructure/canvas-lms/blob/master/<%= @controller_path %>"><%= "#{@route.requirements[:controller].camelize}Controller\##{@route.requirements[:action]}" %></a></span>
|
||||
<% end %>
|
||||
</h2>
|
||||
<% if @beta %>
|
||||
<h3 class='beta'>BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.</h3>
|
||||
<% end %>
|
||||
<%= yieldall %>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% @routes.each do |route| %>
|
||||
<% route_path = route.segments.inject("") { |str,s| str << s.to_s }.sub(/\(\.:format\)\?/, '').sub(/\/$/, '')
|
||||
next if route_path =~ /\.json$/ %>
|
||||
<h3>
|
||||
<h3 class='endpoint'>
|
||||
<%= route.conditions[:method].to_s.upcase %> <%= route_path %>
|
||||
</h3>
|
||||
<% end %>
|
||||
|
|
|
@ -26,6 +26,7 @@ def header
|
|||
@subtopic = (object.tag('subtopic') || object.parent.tag('API')).text
|
||||
route = @routes.first
|
||||
@method_link = "method.#{route.requirements[:controller]}.#{route.requirements[:action]}"
|
||||
@beta = object.tag('beta') || object.parent.tag('beta')
|
||||
erb(:header)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue