Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions messaging-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ paths:
responses:
"200":
description: "OK"
content:
"application/json":
schema:
"$ref": "#/components/schemas/ReplyMessageResponse"
"400":
description: "Bad request"
content:
Expand Down Expand Up @@ -230,6 +234,10 @@ paths:
responses:
"200":
description: "OK"
content:
"application/json":
schema:
"$ref": "#/components/schemas/PushMessageResponse"
"400":
description: "Bad Request"
content:
Expand Down Expand Up @@ -283,6 +291,10 @@ paths:
responses:
"200":
description: "OK"
content:
"application/json":
schema:
"$ref": "#/components/schemas/MulticastResponse"
"400":
description: "Bad Request"
content:
Expand Down Expand Up @@ -336,6 +348,10 @@ paths:
responses:
"202":
description: "Accepted"
content:
"application/json":
schema:
"$ref": "#/components/schemas/NarrowcastResponse"
"400":
description: "Bad Request"
content:
Expand Down Expand Up @@ -415,6 +431,10 @@ paths:
responses:
"200":
description: "OK"
content:
"application/json":
schema:
"$ref": "#/components/schemas/BroadcastResponse"
"400":
description: "Bad Request"
content:
Expand Down Expand Up @@ -1929,6 +1949,32 @@ components:
"$ref": "#/components/schemas/Message"
notificationDisabled:
"$ref": "#/components/schemas/NotificationDisabled"
ReplyMessageResponse:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-reply-message-response
required:
- sentMessages
type: object
properties:
sentMessages:
description: "Array of sent messages."
maxItems: 5
minItems: 1
type: array
items:
"$ref": "#/components/schemas/SentMessage"
SentMessage:
required:
- id
type: object
properties:
id:
type: string
description: "ID of the sent message."
quoteToken:
type: string
description: |+
Quote token of the message. Only included when a message object that can be specified as a quote target was sent as a push or reply message.
PushMessageRequest:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-push-message
Expand Down Expand Up @@ -1963,6 +2009,20 @@ components:
`true`: The user doesn’t receive a push notification when a message is sent.
`false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device).
The default value is false.
PushMessageResponse:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-push-message-response
required:
- sentMessages
type: object
properties:
sentMessages:
description: "Array of sent messages."
maxItems: 5
minItems: 1
type: array
items:
"$ref": "#/components/schemas/SentMessage"
MulticastRequest:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-multicast-message
Expand Down Expand Up @@ -1996,6 +2056,10 @@ components:
maxLength: 30
minLength: 1
pattern: "^[a-zA-Z0-9_]{1,30}$"
MulticastResponse:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-multicast-response
type: object
NarrowcastRequest:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message
Expand All @@ -2018,6 +2082,10 @@ components:
"$ref": "#/components/schemas/Limit"
notificationDisabled:
"$ref": "#/components/schemas/NotificationDisabled"
NarrowcastResponse:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-response
type: object
Recipient:
type: object
description: "Recipient"
Expand Down Expand Up @@ -2560,6 +2628,10 @@ components:
description: "List of Message objects."
notificationDisabled:
"$ref": "#/components/schemas/NotificationDisabled"
BroadcastResponse:
externalDocs:
url: https://developers.line.biz/en/reference/messaging-api/#send-broadcast-response
type: object

# Quota
MessageQuotaResponse:
Expand Down Expand Up @@ -3345,6 +3417,9 @@ components:
type: array
items:
"$ref": "#/components/schemas/Emoji"
quoteToken:
type: string
description: "Quote token of the message you want to quote."
Emoji:
type: object
properties:
Expand All @@ -3365,6 +3440,9 @@ components:
type: string
stickerId:
type: string
quoteToken:
type: string
description: "Quote token of the message you want to quote."
ImageMessage:
type: object
allOf:
Expand Down Expand Up @@ -4311,6 +4389,13 @@ components:
items:
$ref: "#/components/schemas/ErrorDetail"
description: "An array of error details. If the array is empty, this property will not be included in the response."
sentMessages:
description: "Array of sent messages."
maxItems: 5
minItems: 1
type: array
items:
"$ref": "#/components/schemas/SentMessage"
ErrorDetail:
type: object
properties:
Expand Down
27 changes: 27 additions & 0 deletions webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ components:
required:
- id
- text
- quoteToken
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Webhook event doesn't always contain quoteToken according to its description, so they are not required?

Copy link
Contributor

@Yang-33 Yang-33 Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... quoteToken in webhook always exists in 4 types of event. Description in webhook.yml may be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed wrong descriptions.

properties:
id:
type: string
Expand All @@ -256,6 +257,13 @@ components:
$ref: "#/components/schemas/Emoji"
mention:
$ref: "#/components/schemas/Mention"
quoteToken:
type: string
description: |+
Quote token to quote this message.
quotedMessageId:
type: string
description: "Message ID of a quoted message. Only included when the received message quotes a past message."
Emoji:
required:
- index
Expand Down Expand Up @@ -331,6 +339,7 @@ components:
required:
- id
- contentProvider
- quoteToken
properties:
id:
type: string
Expand All @@ -339,6 +348,10 @@ components:
$ref: "#/components/schemas/ContentProvider"
imageSet:
$ref: "#/components/schemas/ImageSet"
quoteToken:
type: string
description: |+
Quote token to quote this message.
ImageSet:
type: object
properties:
Expand All @@ -359,6 +372,7 @@ components:
required:
- id
- contentProvider
- quoteToken
description: "Message object which contains the video content sent from the source. The preview image is displayed in the chat and the video is played when the image is tapped."
properties:
id:
Expand All @@ -370,6 +384,10 @@ components:
description: "Length of video file (milliseconds)"
contentProvider:
$ref: "#/components/schemas/ContentProvider"
quoteToken:
type: string
description: |+
Quote token to quote this message.
AudioMessageContent:
allOf:
- $ref: "#/components/schemas/MessageContent"
Expand Down Expand Up @@ -445,6 +463,7 @@ components:
- packageId
- stickerId
- stickerResourceType
- quoteToken
description: "Message object which contains the sticker data sent from the source."
properties:
id:
Expand Down Expand Up @@ -485,6 +504,14 @@ components:
Any text entered by the user. This property is only included for message stickers.
Max character limit: 100
maxLength: 100
quoteToken:
type: string
description: |+
Quote token to quote this message.
quotedMessageId:
type: string
description: |+
Message ID of a quoted message. Only included when the received message quotes a past message.

# https://developers.line.biz/en/reference/messaging-api/#unsend-event
UnsendEvent:
Expand Down