Skip to content

Commit ba382d0

Browse files
github-actions[bot]github-actions
andauthored
Add type as required property in source object of webhook (#572)
line/line-openapi#103 In the Messaging API webhook, we use `discriminator` to differentiate classes based on the value of `type`. During the development of bot SDK for Ruby v2, it seems that only `Source` does not have `type` marked as required. This is simply a mistake. The type should always be included to distinguish the kind of JSON, and there should not be any instances where it is absent. Co-authored-by: github-actions <[email protected]>
1 parent d566673 commit ba382d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

line-openapi

linebot/webhook/model_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func setDiscriminatorPropertySource(r SourceInterface) SourceInterface {
8888
type Source struct {
8989
// source type
9090

91-
Type string `json:"type,omitempty"`
91+
Type string `json:"type"`
9292
}
9393

9494
func UnmarshalSource(data []byte) (SourceInterface, error) {

0 commit comments

Comments
 (0)