forked from richhollis/swagger-docs-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a0493a
commit a37d8f2
Showing
7 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class GroupsController < ApplicationController | ||
|
||
swagger_controller :groups, "Groups" | ||
|
||
swagger_api :index do | ||
summary "Fetches all group memberships" | ||
param :path, :id, :integer, :required, "Group ID" | ||
response :unauthorized | ||
response :not_acceptable | ||
end | ||
|
||
def index | ||
render :json => {result:"Success"}, :status => 200 | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class PropertiesController < ApplicationController | ||
|
||
swagger_controller :properties, "Properties" | ||
|
||
swagger_api :show do | ||
summary "Fetches all properties" | ||
param :path, :id, :integer, :required, "Property ID" | ||
response :unauthorized | ||
response :not_acceptable | ||
end | ||
|
||
def show | ||
render :json => {result:"Success"}, :status => 200 | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class UsersController < ApplicationController | ||
|
||
swagger_controller :users, "Users" | ||
|
||
swagger_api :index do | ||
summary "Fetches all users" | ||
response :unauthorized | ||
response :not_acceptable | ||
end | ||
|
||
def index | ||
render :json => {result:"Success"}, :status => 200 | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Swagger::Docs::Config.register_apis({ | ||
"1.0" => {:controller_base_path => "", :api_file_path => "public"} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters