Skip to content

Commit ab66b98

Browse files
github-actions[bot]github-actions
andauthored
Add required: true for setRichMenuImage to fix sdk parameters (#793)
line/line-openapi#123 Currently `setRichMenuImage`'s body is optional, but to set richmenu image, image data itself is required of course. This change fixes it. Co-authored-by: github-actions <github-actions@github.com>
1 parent fe8c43f commit ab66b98

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

lib/line/bot/v2/messaging_api/api/messaging_api_blob_client.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ def get_rich_menu_image(
231231
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
232232
#
233233
# @param rich_menu_id [String] The ID of the rich menu to attach the image to
234-
# @param body [File, nil]
234+
# @param body [File]
235235
# @see https://developers.line.biz/en/reference/messaging-api/#upload-rich-menu-image
236236
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
237237
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
238238
def set_rich_menu_image_with_http_info( # steep:ignore MethodBodyTypeMismatch
239239
rich_menu_id:,
240-
body: nil
240+
body:
241241
)
242242
path = "/v2/bot/richmenu/{richMenuId}/content"
243243
.gsub(/{richMenuId}/, rich_menu_id.to_s)
@@ -260,13 +260,13 @@ def set_rich_menu_image_with_http_info( # steep:ignore MethodBodyTypeMismatch
260260
# When you want to get HTTP status code or response headers, use {#set_rich_menu_image_with_http_info} instead of this.
261261
#
262262
# @param rich_menu_id [String] The ID of the rich menu to attach the image to
263-
# @param body [File, nil]
263+
# @param body [File]
264264
# @see https://developers.line.biz/en/reference/messaging-api/#upload-rich-menu-image
265265
# @return [String, nil] when HTTP status code is 200
266266
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
267267
def set_rich_menu_image(
268268
rich_menu_id:,
269-
body: nil
269+
body:
270270
)
271271
response_body, _status_code, _headers = set_rich_menu_image_with_http_info(
272272
rich_menu_id: rich_menu_id,

lib/line/bot/v2/messaging_api/api/messaging_api_client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,7 @@ def get_number_of_sent_reply_messages(
15701570
response_body
15711571
end
15721572

1573-
# Get number of sent LINE notification messages 
1573+
# Get number of sent LINE notification messages
15741574
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp</code>
15751575
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
15761576
#
@@ -1604,7 +1604,7 @@ def get_pnp_message_statistics_with_http_info( # steep:ignore MethodBodyTypeMism
16041604
end
16051605
end
16061606

1607-
# Get number of sent LINE notification messages 
1607+
# Get number of sent LINE notification messages
16081608
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp</code>
16091609
# When you want to get HTTP status code or response headers, use {#get_pnp_message_statistics_with_http_info} instead of this.
16101610
#

line-openapi

sig/line/bot/v2/messaging_api/api/messaging_api_blob_client.rbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ module Line
161161
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
162162
#
163163
# @param rich_menu_id [String] The ID of the rich menu to attach the image to
164-
# @param body [File, nil]
164+
# @param body [File]
165165
# @see https://developers.line.biz/en/reference/messaging-api/#upload-rich-menu-image
166166
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
167167
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
168168
def set_rich_menu_image_with_http_info: (
169169
rich_menu_id: String,
170-
?body: File?
170+
body: File
171171
) -> (
172172
[String?, 200, Hash[untyped, untyped]] # when HTTP status code is 200
173173
| [String?, Integer, Hash[untyped, untyped]] # otherwise
@@ -178,13 +178,13 @@ module Line
178178
# When you want to get HTTP status code or response headers, use {#set_rich_menu_image_with_http_info} instead of this.
179179
#
180180
# @param rich_menu_id [String] The ID of the rich menu to attach the image to
181-
# @param body [File, nil]
181+
# @param body [File]
182182
# @see https://developers.line.biz/en/reference/messaging-api/#upload-rich-menu-image
183183
# @return [String, nil] when HTTP status code is 200
184184
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
185185
def set_rich_menu_image: (
186186
rich_menu_id: String,
187-
?body: File?
187+
body: File
188188
) -> (
189189
String? # when HTTP status code is 200
190190
| String? # otherwise

sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ module Line
944944
| String? # otherwise
945945
)
946946

947-
# Get number of sent LINE notification messages 
947+
# Get number of sent LINE notification messages
948948
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp</code>
949949
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
950950
#
@@ -959,7 +959,7 @@ module Line
959959
| [String?, Integer, Hash[untyped, untyped]] # otherwise
960960
)
961961

962-
# Get number of sent LINE notification messages 
962+
# Get number of sent LINE notification messages
963963
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp</code>
964964
# When you want to get HTTP status code or response headers, use {#get_pnp_message_statistics_with_http_info} instead of this.
965965
#

0 commit comments

Comments
 (0)