Skip to content

Commit 9cf4c66

Browse files
committed
Update method returning value comment
1 parent 8bf84aa commit 9cf4c66

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

modules/swagger-codegen/src/main/resources/ruby/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module {{moduleName}}
1212
{{#allParams}}{{#required}} # @param {{paramName}} {{description}}
1313
{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
1414
{{#allParams}}{{^required}} # @option opts [{{dataType}}] :{{paramName}} {{description}}
15-
{{/required}}{{/allParams}} # @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
15+
{{/required}}{{/allParams}} # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}]
1616
def self.{{nickname}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
1717
{{#allParams}}{{#required}}
1818
# verify the required parameter '{{paramName}}' is set

samples/client/petstore/ruby/lib/swagger_client/api/pet_api.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class PetApi
99
#
1010
# @param [Hash] opts the optional parameters
1111
# @option opts [Pet] :body Pet object that needs to be added to the store
12-
# @return void
12+
# @return [nil]
1313
def self.update_pet(opts = {})
1414

1515

@@ -45,7 +45,7 @@ def self.update_pet(opts = {})
4545
#
4646
# @param [Hash] opts the optional parameters
4747
# @option opts [Pet] :body Pet object that needs to be added to the store
48-
# @return void
48+
# @return [nil]
4949
def self.add_pet(opts = {})
5050

5151

@@ -81,7 +81,7 @@ def self.add_pet(opts = {})
8181
# Multiple status values can be provided with comma seperated strings
8282
# @param [Hash] opts the optional parameters
8383
# @option opts [array[string]] :status Status values that need to be considered for filter
84-
# @return array[Pet]
84+
# @return [array[Pet]]
8585
def self.find_pets_by_status(opts = {})
8686

8787

@@ -118,7 +118,7 @@ def self.find_pets_by_status(opts = {})
118118
# Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
119119
# @param [Hash] opts the optional parameters
120120
# @option opts [array[string]] :tags Tags to filter by
121-
# @return array[Pet]
121+
# @return [array[Pet]]
122122
def self.find_pets_by_tags(opts = {})
123123

124124

@@ -155,7 +155,7 @@ def self.find_pets_by_tags(opts = {})
155155
# Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
156156
# @param pet_id ID of pet that needs to be fetched
157157
# @param [Hash] opts the optional parameters
158-
# @return Pet
158+
# @return [Pet]
159159
def self.get_pet_by_id(pet_id, opts = {})
160160

161161
# verify the required parameter 'pet_id' is set
@@ -196,7 +196,7 @@ def self.get_pet_by_id(pet_id, opts = {})
196196
# @param [Hash] opts the optional parameters
197197
# @option opts [string] :name Updated name of the pet
198198
# @option opts [string] :status Updated status of the pet
199-
# @return void
199+
# @return [nil]
200200
def self.update_pet_with_form(pet_id, opts = {})
201201

202202
# verify the required parameter 'pet_id' is set
@@ -238,7 +238,7 @@ def self.update_pet_with_form(pet_id, opts = {})
238238
# @param pet_id Pet id to delete
239239
# @param [Hash] opts the optional parameters
240240
# @option opts [string] :api_key
241-
# @return void
241+
# @return [nil]
242242
def self.delete_pet(pet_id, opts = {})
243243

244244
# verify the required parameter 'pet_id' is set
@@ -280,7 +280,7 @@ def self.delete_pet(pet_id, opts = {})
280280
# @param [Hash] opts the optional parameters
281281
# @option opts [string] :additional_metadata Additional data to pass to server
282282
# @option opts [file] :file file to upload
283-
# @return void
283+
# @return [nil]
284284
def self.upload_file(pet_id, opts = {})
285285

286286
# verify the required parameter 'pet_id' is set

samples/client/petstore/ruby/lib/swagger_client/api/store_api.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StoreApi
88
# Returns pet inventories by status
99
# Returns a map of status codes to quantities
1010
# @param [Hash] opts the optional parameters
11-
# @return map[string,int]
11+
# @return [map[string,int]]
1212
def self.get_inventory(opts = {})
1313

1414

@@ -44,7 +44,7 @@ def self.get_inventory(opts = {})
4444
#
4545
# @param [Hash] opts the optional parameters
4646
# @option opts [Order] :body order placed for purchasing the pet
47-
# @return Order
47+
# @return [Order]
4848
def self.place_order(opts = {})
4949

5050

@@ -80,7 +80,7 @@ def self.place_order(opts = {})
8080
# For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
8181
# @param order_id ID of pet that needs to be fetched
8282
# @param [Hash] opts the optional parameters
83-
# @return Order
83+
# @return [Order]
8484
def self.get_order_by_id(order_id, opts = {})
8585

8686
# verify the required parameter 'order_id' is set
@@ -119,7 +119,7 @@ def self.get_order_by_id(order_id, opts = {})
119119
# For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
120120
# @param order_id ID of the order that needs to be deleted
121121
# @param [Hash] opts the optional parameters
122-
# @return void
122+
# @return [nil]
123123
def self.delete_order(order_id, opts = {})
124124

125125
# verify the required parameter 'order_id' is set

samples/client/petstore/ruby/lib/swagger_client/api/user_api.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class UserApi
99
# This can only be done by the logged in user.
1010
# @param [Hash] opts the optional parameters
1111
# @option opts [User] :body Created user object
12-
# @return void
12+
# @return [nil]
1313
def self.create_user(opts = {})
1414

1515

@@ -45,7 +45,7 @@ def self.create_user(opts = {})
4545
#
4646
# @param [Hash] opts the optional parameters
4747
# @option opts [array[User]] :body List of user object
48-
# @return void
48+
# @return [nil]
4949
def self.create_users_with_array_input(opts = {})
5050

5151

@@ -81,7 +81,7 @@ def self.create_users_with_array_input(opts = {})
8181
#
8282
# @param [Hash] opts the optional parameters
8383
# @option opts [array[User]] :body List of user object
84-
# @return void
84+
# @return [nil]
8585
def self.create_users_with_list_input(opts = {})
8686

8787

@@ -118,7 +118,7 @@ def self.create_users_with_list_input(opts = {})
118118
# @param [Hash] opts the optional parameters
119119
# @option opts [string] :username The user name for login
120120
# @option opts [string] :password The password for login in clear text
121-
# @return string
121+
# @return [string]
122122
def self.login_user(opts = {})
123123

124124

@@ -155,7 +155,7 @@ def self.login_user(opts = {})
155155
# Logs out current logged in user session
156156
#
157157
# @param [Hash] opts the optional parameters
158-
# @return void
158+
# @return [nil]
159159
def self.logout_user(opts = {})
160160

161161

@@ -191,7 +191,7 @@ def self.logout_user(opts = {})
191191
#
192192
# @param username The name that needs to be fetched. Use user1 for testing.
193193
# @param [Hash] opts the optional parameters
194-
# @return User
194+
# @return [User]
195195
def self.get_user_by_name(username, opts = {})
196196

197197
# verify the required parameter 'username' is set
@@ -231,7 +231,7 @@ def self.get_user_by_name(username, opts = {})
231231
# @param username name that need to be deleted
232232
# @param [Hash] opts the optional parameters
233233
# @option opts [User] :body Updated user object
234-
# @return void
234+
# @return [nil]
235235
def self.update_user(username, opts = {})
236236

237237
# verify the required parameter 'username' is set
@@ -270,7 +270,7 @@ def self.update_user(username, opts = {})
270270
# This can only be done by the logged in user.
271271
# @param username The name that needs to be deleted
272272
# @param [Hash] opts the optional parameters
273-
# @return void
273+
# @return [nil]
274274
def self.delete_user(username, opts = {})
275275

276276
# verify the required parameter 'username' is set

0 commit comments

Comments
 (0)