From e7ecd0a75e859859729e9b5e60f163033dd20945 Mon Sep 17 00:00:00 2001 From: nanato12 Date: Sun, 26 Jan 2025 08:46:21 +0900 Subject: [PATCH] update: openapi --- docs/DefaultApi.md | 2 + line_works/openapi/talk/api/default_api.py | 3 + .../talk/models/send_message_request.py | 9 +- openapi/talk.yml | 86 +------------------ 4 files changed, 7 insertions(+), 93 deletions(-) diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index b6c2cf9..fe63e7b 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -81,6 +81,8 @@ No authorization required Send Message +Send Message. + ### Example diff --git a/line_works/openapi/talk/api/default_api.py b/line_works/openapi/talk/api/default_api.py index 14008d3..ceb1fd2 100644 --- a/line_works/openapi/talk/api/default_api.py +++ b/line_works/openapi/talk/api/default_api.py @@ -321,6 +321,7 @@ def send_message( ) -> SendMessageResponse: """Send Message + Send Message. :param cookie: cookie :type cookie: str @@ -391,6 +392,7 @@ def send_message_with_http_info( ) -> ApiResponse[SendMessageResponse]: """Send Message + Send Message. :param cookie: cookie :type cookie: str @@ -461,6 +463,7 @@ def send_message_without_preload_content( ) -> RESTResponseType: """Send Message + Send Message. :param cookie: cookie :type cookie: str diff --git a/line_works/openapi/talk/models/send_message_request.py b/line_works/openapi/talk/models/send_message_request.py index 6c60066..41ff898 100644 --- a/line_works/openapi/talk/models/send_message_request.py +++ b/line_works/openapi/talk/models/send_message_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from line_works.openapi.talk.models.caller import Caller from typing import Optional, Set @@ -36,13 +36,6 @@ class SendMessageRequest(BaseModel): type: StrictInt __properties: ClassVar[List[str]] = ["serviceId", "channelNo", "tempMessageId", "caller", "extras", "content", "type"] - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set([1, 18]): - raise ValueError("must be one of enum values (1, 18)") - return value - model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/openapi/talk.yml b/openapi/talk.yml index 3c1697b..3ce8eb6 100644 --- a/openapi/talk.yml +++ b/openapi/talk.yml @@ -1,6 +1,4 @@ openapi: 3.1.0 -x-stoplight: - id: yqpvor4nca3xa info: title: LINE WORKS Talk API version: '1.0' @@ -42,12 +40,11 @@ paths: description: '' parameters: - $ref: '#/components/parameters/Cookie' + description: Send Message. components: schemas: Name: type: object - x-stoplight: - id: msr07ec2ry46f x-examples: Example 1: firstName: \u3044\u3064 @@ -367,48 +364,30 @@ components: title: '' Caller: title: Caller - x-stoplight: - id: jhc0gwoqs78ne type: object properties: domainId: type: integer - x-stoplight: - id: 3k93aquy36yuf userNo: type: integer - x-stoplight: - id: 22zv3bm1dizgv required: - domainId - userNo Sticker: title: Sticker - x-stoplight: - id: s7k29eleyplvg type: object description: sticker model properties: pkgVer: type: string - x-stoplight: - id: ndbojnl6d82rx pkgId: type: string - x-stoplight: - id: c8jicid398fb2 stkType: type: string - x-stoplight: - id: qus5jgkox4nul stkId: type: string - x-stoplight: - id: db0qmahf4taqc stkOpt: type: string - x-stoplight: - id: pn4dldxagpmdc required: - pkgVer - pkgId @@ -417,70 +396,38 @@ components: - stkOpt SentMessage: title: SentMessage - x-stoplight: - id: rl894wsrkndxs type: object properties: messageId: type: integer - x-stoplight: - id: b3vq3fv6uzzt3 channelNo: type: integer - x-stoplight: - id: 4ipvjs5nw1jrq writerId: type: string - x-stoplight: - id: fa21q7rigddv6 userNo: type: integer - x-stoplight: - id: ff6r9feqscmil botNo: type: integer - x-stoplight: - id: y9cqpowtfimo9 messageNo: type: integer - x-stoplight: - id: bs184jdfxfi4i content: type: string - x-stoplight: - id: idaq2bs51kwqm memberCount: type: integer - x-stoplight: - id: 65dahzr0ra1oh messageTypeCode: type: integer - x-stoplight: - id: 3k1kvq7fbrgbe messageStatusType: type: string - x-stoplight: - id: dhbjsrgd4xu65 messageStatusTypeCode: type: integer - x-stoplight: - id: 3834dqptotlox extras: type: string - x-stoplight: - id: k6oildongqwnu tid: type: integer - x-stoplight: - id: 39iepmgaxj1yf createTime: type: integer - x-stoplight: - id: 1xoykipvi3liu updateTime: type: integer - x-stoplight: - id: p4pg5ut7hur5j required: - messageId - channelNo @@ -498,78 +445,47 @@ components: - updateTime BaseResponse: title: BaseResponse - x-stoplight: - id: ii6vmg4x8dxf0 type: object properties: code: type: integer - x-stoplight: - id: q5jy0wxywqci6 message: type: string - x-stoplight: - id: vuutgbon5vsn4 required: - code - message SendMessageRequest: title: SendMessageRequest - x-stoplight: - id: qcu3gzjnr4evu type: object properties: serviceId: type: string - x-stoplight: - id: jzeecvllwehco default: works channelNo: type: integer - x-stoplight: - id: lvukdrhur6rjp tempMessageId: type: integer - x-stoplight: - id: ozwjefhf02jro default: 733428260 caller: $ref: '#/components/schemas/Caller' - x-stoplight: - id: 6s718xzgww20j extras: type: string - x-stoplight: - id: iu6o1hofbpx80 content: type: string - x-stoplight: - id: ym795mp0jnx2l type: type: integer - x-stoplight: - id: 8d9k9z02kj9u1 - enum: - - 1 - - 18 required: - channelNo - caller - type SendMessageResponse: title: SendMessageResponse - x-stoplight: - id: lom8lh6zjh88y allOf: - $ref: '#/components/schemas/BaseResponse' - type: object - x-stoplight: - id: yz8zdxhbu4wgq properties: result: $ref: '#/components/schemas/SentMessage' - x-stoplight: - id: fkb3ovg4vm89i required: - result responses: {}