Skip to content

Commit 472d8ea

Browse files
github-actions[bot]github-actions
andauthored
Add required: true for setRichMenuImage to fix sdk parameters (#987)
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 561c75a commit 472d8ea

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

line-openapi

linebot/v3/messaging/api/async_messaging_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4360,7 +4360,7 @@ def get_pnp_message_statistics(self, var_date : Annotated[constr(strict=True), F
43604360
def get_pnp_message_statistics(self, var_date : Annotated[constr(strict=True), Field(..., description="Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 ")], async_req: Optional[bool]=None, **kwargs) -> Union[NumberOfMessagesResponse, Awaitable[NumberOfMessagesResponse]]: # noqa: E501
43614361
"""get_pnp_message_statistics # noqa: E501
43624362
4363-
Get number of sent LINE notification messages  # noqa: E501
4363+
Get number of sent LINE notification messages # noqa: E501
43644364
This method makes a synchronous HTTP request by default. To make an
43654365
asynchronous HTTP request, please pass async_req=True
43664366
@@ -4391,7 +4391,7 @@ def get_pnp_message_statistics(self, var_date : Annotated[constr(strict=True), F
43914391
def get_pnp_message_statistics_with_http_info(self, var_date : Annotated[constr(strict=True), Field(..., description="Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 ")], **kwargs) -> ApiResponse: # noqa: E501
43924392
"""get_pnp_message_statistics # noqa: E501
43934393
4394-
Get number of sent LINE notification messages  # noqa: E501
4394+
Get number of sent LINE notification messages # noqa: E501
43954395
This method makes a synchronous HTTP request by default. To make an
43964396
asynchronous HTTP request, please pass async_req=True
43974397

linebot/v3/messaging/api/async_messaging_api_blob.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
from pydantic.v1 import Field, StrictBytes, StrictStr
2424

25-
from typing import Optional, Union
25+
from typing import Union
2626

2727
from linebot.v3.messaging.models.get_message_content_transcoding_response import GetMessageContentTranscodingResponse
2828

@@ -697,15 +697,15 @@ def get_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr,
697697
_request_auth=_params.get('_request_auth'))
698698

699699
@overload
700-
async def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> None: # noqa: E501
700+
async def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Union[StrictBytes, StrictStr], **kwargs) -> None: # noqa: E501
701701
...
702702

703703
@overload
704-
def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Optional[Union[StrictBytes, StrictStr]] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501
704+
def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Union[StrictBytes, StrictStr], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501
705705
...
706706

707707
@validate_arguments
708-
def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Optional[Union[StrictBytes, StrictStr]] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501
708+
def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Union[StrictBytes, StrictStr], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501
709709
"""set_rich_menu_image # noqa: E501
710710
711711
Upload rich menu image # noqa: E501
@@ -717,7 +717,7 @@ def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., des
717717
718718
:param rich_menu_id: The ID of the rich menu to attach the image to (required)
719719
:type rich_menu_id: str
720-
:param body:
720+
:param body: (required)
721721
:type body: bytearray
722722
:param async_req: Whether to execute the request asynchronously.
723723
:type async_req: bool, optional
@@ -738,7 +738,7 @@ def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., des
738738
return self.set_rich_menu_image_with_http_info(rich_menu_id, body, **kwargs) # noqa: E501
739739

740740
@validate_arguments
741-
def set_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501
741+
def set_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Union[StrictBytes, StrictStr], **kwargs) -> ApiResponse: # noqa: E501
742742
"""set_rich_menu_image # noqa: E501
743743
744744
Upload rich menu image # noqa: E501
@@ -750,7 +750,7 @@ def set_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr,
750750
751751
:param rich_menu_id: The ID of the rich menu to attach the image to (required)
752752
:type rich_menu_id: str
753-
:param body:
753+
:param body: (required)
754754
:type body: bytearray
755755
:param async_req: Whether to execute the request asynchronously.
756756
:type async_req: bool, optional

linebot/v3/messaging/api/messaging_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4070,7 +4070,7 @@ def get_number_of_sent_reply_messages_with_http_info(self, var_date : Annotated[
40704070
def get_pnp_message_statistics(self, var_date : Annotated[constr(strict=True), Field(..., description="Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 ")], **kwargs) -> NumberOfMessagesResponse: # noqa: E501
40714071
"""get_pnp_message_statistics # noqa: E501
40724072
4073-
Get number of sent LINE notification messages  # noqa: E501
4073+
Get number of sent LINE notification messages # noqa: E501
40744074
This method makes a synchronous HTTP request by default. To make an
40754075
asynchronous HTTP request, please pass async_req=True
40764076
@@ -4099,7 +4099,7 @@ def get_pnp_message_statistics(self, var_date : Annotated[constr(strict=True), F
40994099
def get_pnp_message_statistics_with_http_info(self, var_date : Annotated[constr(strict=True), Field(..., description="Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 ")], **kwargs) -> ApiResponse: # noqa: E501
41004100
"""get_pnp_message_statistics # noqa: E501
41014101
4102-
Get number of sent LINE notification messages  # noqa: E501
4102+
Get number of sent LINE notification messages # noqa: E501
41034103
This method makes a synchronous HTTP request by default. To make an
41044104
asynchronous HTTP request, please pass async_req=True
41054105

linebot/v3/messaging/api/messaging_api_blob.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from pydantic.v1 import Field, StrictBytes, StrictStr
2222

23-
from typing import Optional, Union
23+
from typing import Union
2424

2525
from linebot.v3.messaging.models.get_message_content_transcoding_response import GetMessageContentTranscodingResponse
2626

@@ -655,7 +655,7 @@ def get_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr,
655655
_request_auth=_params.get('_request_auth'))
656656

657657
@validate_arguments
658-
def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> None: # noqa: E501
658+
def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Union[StrictBytes, StrictStr], **kwargs) -> None: # noqa: E501
659659
"""set_rich_menu_image # noqa: E501
660660
661661
Upload rich menu image # noqa: E501
@@ -667,7 +667,7 @@ def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., des
667667
668668
:param rich_menu_id: The ID of the rich menu to attach the image to (required)
669669
:type rich_menu_id: str
670-
:param body:
670+
:param body: (required)
671671
:type body: bytearray
672672
:param async_req: Whether to execute the request asynchronously.
673673
:type async_req: bool, optional
@@ -686,7 +686,7 @@ def set_rich_menu_image(self, rich_menu_id : Annotated[StrictStr, Field(..., des
686686
return self.set_rich_menu_image_with_http_info(rich_menu_id, body, **kwargs) # noqa: E501
687687

688688
@validate_arguments
689-
def set_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501
689+
def set_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr, Field(..., description="The ID of the rich menu to attach the image to")], body : Union[StrictBytes, StrictStr], **kwargs) -> ApiResponse: # noqa: E501
690690
"""set_rich_menu_image # noqa: E501
691691
692692
Upload rich menu image # noqa: E501
@@ -698,7 +698,7 @@ def set_rich_menu_image_with_http_info(self, rich_menu_id : Annotated[StrictStr,
698698
699699
:param rich_menu_id: The ID of the rich menu to attach the image to (required)
700700
:type rich_menu_id: str
701-
:param body:
701+
:param body: (required)
702702
:type body: bytearray
703703
:param async_req: Whether to execute the request asynchronously.
704704
:type async_req: bool, optional

linebot/v3/messaging/docs/MessagingApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ Name | Type | Description | Notes
21702170
21712171

21722172

2173-
Get number of sent LINE notification messages 
2173+
Get number of sent LINE notification messages
21742174

21752175
### Example
21762176

linebot/v3/messaging/docs/MessagingApiBlob.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Name | Type | Description | Notes
309309
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
310310

311311
# **set_rich_menu_image**
312-
> set_rich_menu_image(rich_menu_id, body=body)
312+
> set_rich_menu_image(rich_menu_id, body)
313313
314314

315315

@@ -346,10 +346,10 @@ with linebot.v3.messaging.ApiClient(configuration) as api_client:
346346
# Create an instance of the API class
347347
api_instance = linebot.v3.messaging.MessagingApiBlob(api_client)
348348
rich_menu_id = 'rich_menu_id_example' # str | The ID of the rich menu to attach the image to
349-
body = None # bytearray | (optional)
349+
body = None # bytearray |
350350

351351
try:
352-
api_instance.set_rich_menu_image(rich_menu_id, body=body)
352+
api_instance.set_rich_menu_image(rich_menu_id, body)
353353
except Exception as e:
354354
print("Exception when calling MessagingApiBlob->set_rich_menu_image: %s\n" % e)
355355
```
@@ -360,7 +360,7 @@ with linebot.v3.messaging.ApiClient(configuration) as api_client:
360360
Name | Type | Description | Notes
361361
------------- | ------------- | ------------- | -------------
362362
**rich_menu_id** | **str**| The ID of the rich menu to attach the image to |
363-
**body** | **bytearray**| | [optional]
363+
**body** | **bytearray**| |
364364

365365
### Return type
366366

0 commit comments

Comments
 (0)