-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Layout/InitialIndentation-20240212233131 (#915)
* 🚓 regenerate rubocop todo * 🚓 Layout/InitialIndentation * 🚓 regenerate rubocop todo --------- Co-authored-by: Rubocop Challenger <[email protected]> Co-authored-by: Mathieu Jobin <[email protected]>
- Loading branch information
1 parent
5ba0423
commit 26a2807
Showing
3 changed files
with
38 additions
and
45 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
module ExtendingConcern | ||
extend Apipie::DSL::Concern | ||
module ExtendingConcern | ||
extend Apipie::DSL::Concern | ||
|
||
update_api(:create) do | ||
param :user, Hash do | ||
param :from_concern, String, :desc => 'param from concern', :allow_nil => false | ||
end | ||
meta metadata: 'data' | ||
update_api(:create) do | ||
param :user, Hash do | ||
param :from_concern, String, :desc => 'param from concern', :allow_nil => false | ||
end | ||
meta metadata: 'data' | ||
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 |
---|---|---|
@@ -1,39 +1,39 @@ | ||
module SampleController | ||
extend Apipie::DSL::Concern | ||
module SampleController | ||
extend Apipie::DSL::Concern | ||
|
||
api! | ||
def index | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
api! | ||
def index | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
|
||
api :GET, '/:resource_id/:id' | ||
param :id, String | ||
def show | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
api :GET, '/:resource_id/:id' | ||
param :id, String | ||
def show | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
|
||
def_param_group :concern do | ||
param :concern, Hash, :required => true, :action_aware => true do | ||
param :name, String, "Name of a :concern" | ||
param :concern_type, String | ||
end | ||
def_param_group :concern do | ||
param :concern, Hash, :required => true, :action_aware => true do | ||
param :name, String, "Name of a :concern" | ||
param :concern_type, String | ||
end | ||
end | ||
|
||
api :POST, '/:resource_id', "Create a :concern" | ||
param_group :concern | ||
def create | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
api :POST, '/:resource_id', "Create a :concern" | ||
param_group :concern | ||
def create | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
|
||
api :PUT, '/:resource_id/:id' | ||
param :id, String | ||
param_group :concern | ||
def update | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
api :PUT, '/:resource_id/:id' | ||
param :id, String | ||
param_group :concern | ||
def update | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
|
||
api :GET, '/:resource_id/:custom_subst' | ||
def custom | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
api :GET, '/:resource_id/:custom_subst' | ||
def custom | ||
render :plain => "OK #{params.inspect}" | ||
end | ||
end |