Skip to content

Commit 12fc533

Browse files
authored
Merge branch 'master' into feature/allow-custom-logger
2 parents cab3b5c + 33ac937 commit 12fc533

File tree

19 files changed

+450
-18
lines changed

19 files changed

+450
-18
lines changed

.github/workflows/generate-code.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Generate code and open pull request
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56
push:
67
branches:
78
- master
@@ -30,7 +31,13 @@ jobs:
3031
diff=$(git --no-pager diff --name-only HEAD)
3132
echo "DIFF_IS_EMPTY=$([[ -z "$diff" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV
3233
echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
33-
- if: ${{ env.DIFF_IS_EMPTY != 'true' }}
34+
## Run if diff exists and pull request, and make CI status failure
35+
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
36+
run: |
37+
echo "There are changes in the generated codes. Please run 'generate-code.py' and commit the changes." >&2
38+
exit 1
39+
## Run if diff exists and event is not pull request, and make PR
40+
- if: ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
3441
run: |
3542
git config user.name github-actions
3643
git config user.email [email protected]

.github/workflows/publish.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Publish package to the Maven Central Repository
33
on:
44
release:
55
types: [ published ]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'The version to release'
10+
required: true
611

712
jobs:
813
publish:
@@ -26,17 +31,26 @@ jobs:
2631
run: |
2732
echo "Version=${{ github.event.release.tag_name }}"
2833
29-
- name: Publish package
34+
- name: Build package
3035
run: |
3136
./gradlew build
3237
38+
- name: Set version
39+
run: |
40+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
41+
VERSION=${{ github.event.inputs.version }}
42+
else
43+
VERSION=${{ github.event.release.tag_name }}
44+
fi
45+
echo "VERSION=$VERSION" >> $GITHUB_ENV
46+
3347
- name: Publish package
3448
run: |
3549
./gradlew --no-daemon --stacktrace --max-workers=1 --info publish closeAndReleaseStagingRepository
3650
env:
37-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
38-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
39-
SDK_VERSION: ${{ github.event.release.tag_name }}
51+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME_Y }}
52+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_Y }}
53+
SDK_VERSION: ${{ env.VERSION }}
4054
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }}
4155
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
4256
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }}

buildSrc/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ plugins {
99

1010
dependencies {
1111
// dependency for LineJavaCodegenGenerator
12-
implementation("org.openapitools:openapi-generator:7.9.0")
12+
implementation("org.openapitools:openapi-generator:7.10.0")
1313

1414
// plugins
1515
implementation("io.github.gradle-nexus:publish-plugin:2.0.0")
16-
implementation("org.openapitools:openapi-generator-gradle-plugin:7.9.0")
17-
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.25")
16+
implementation("org.openapitools:openapi-generator-gradle-plugin:7.10.0")
17+
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.26")
1818
implementation("org.springframework.boot:spring-boot-gradle-plugin:3.3.5")
1919

2020
// workaround to use libs in a precompiled script plugin.

clients/line-bot-messaging-api-client/.openapi-generator/FILES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java
33
src/main/java/com/linecorp/bot/messaging/model/Action.java
44
src/main/java/com/linecorp/bot/messaging/model/AgeDemographic.java
55
src/main/java/com/linecorp/bot/messaging/model/AgeDemographicFilter.java
6+
src/main/java/com/linecorp/bot/messaging/model/AllMentionTarget.java
67
src/main/java/com/linecorp/bot/messaging/model/AltUri.java
78
src/main/java/com/linecorp/bot/messaging/model/AppTypeDemographic.java
89
src/main/java/com/linecorp/bot/messaging/model/AppTypeDemographicFilter.java
@@ -26,6 +27,7 @@ src/main/java/com/linecorp/bot/messaging/model/CreateRichMenuAliasRequest.java
2627
src/main/java/com/linecorp/bot/messaging/model/DatetimePickerAction.java
2728
src/main/java/com/linecorp/bot/messaging/model/DemographicFilter.java
2829
src/main/java/com/linecorp/bot/messaging/model/Emoji.java
30+
src/main/java/com/linecorp/bot/messaging/model/EmojiSubstitutionObject.java
2931
src/main/java/com/linecorp/bot/messaging/model/ErrorDetail.java
3032
src/main/java/com/linecorp/bot/messaging/model/ErrorResponse.java
3133
src/main/java/com/linecorp/bot/messaging/model/Filter.java
@@ -85,6 +87,8 @@ src/main/java/com/linecorp/bot/messaging/model/MarkMessagesAsReadRequest.java
8587
src/main/java/com/linecorp/bot/messaging/model/MembersIdsResponse.java
8688
src/main/java/com/linecorp/bot/messaging/model/Membership.java
8789
src/main/java/com/linecorp/bot/messaging/model/MembershipListResponse.java
90+
src/main/java/com/linecorp/bot/messaging/model/MentionSubstitutionObject.java
91+
src/main/java/com/linecorp/bot/messaging/model/MentionTarget.java
8892
src/main/java/com/linecorp/bot/messaging/model/Message.java
8993
src/main/java/com/linecorp/bot/messaging/model/MessageAction.java
9094
src/main/java/com/linecorp/bot/messaging/model/MessageImagemapAction.java
@@ -138,16 +142,19 @@ src/main/java/com/linecorp/bot/messaging/model/SubscribedMembershipUser.java
138142
src/main/java/com/linecorp/bot/messaging/model/Subscription.java
139143
src/main/java/com/linecorp/bot/messaging/model/SubscriptionPeriodDemographic.java
140144
src/main/java/com/linecorp/bot/messaging/model/SubscriptionPeriodDemographicFilter.java
145+
src/main/java/com/linecorp/bot/messaging/model/SubstitutionObject.java
141146
src/main/java/com/linecorp/bot/messaging/model/Template.java
142147
src/main/java/com/linecorp/bot/messaging/model/TemplateImageAspectRatio.java
143148
src/main/java/com/linecorp/bot/messaging/model/TemplateImageSize.java
144149
src/main/java/com/linecorp/bot/messaging/model/TemplateMessage.java
145150
src/main/java/com/linecorp/bot/messaging/model/TestWebhookEndpointRequest.java
146151
src/main/java/com/linecorp/bot/messaging/model/TestWebhookEndpointResponse.java
147152
src/main/java/com/linecorp/bot/messaging/model/TextMessage.java
153+
src/main/java/com/linecorp/bot/messaging/model/TextMessageV2.java
148154
src/main/java/com/linecorp/bot/messaging/model/URIAction.java
149155
src/main/java/com/linecorp/bot/messaging/model/URIImagemapAction.java
150156
src/main/java/com/linecorp/bot/messaging/model/UpdateRichMenuAliasRequest.java
157+
src/main/java/com/linecorp/bot/messaging/model/UserMentionTarget.java
151158
src/main/java/com/linecorp/bot/messaging/model/UserProfileResponse.java
152159
src/main/java/com/linecorp/bot/messaging/model/ValidateMessageRequest.java
153160
src/main/java/com/linecorp/bot/messaging/model/VideoMessage.java
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
27+
import com.fasterxml.jackson.annotation.JsonTypeName;
28+
29+
/**
30+
* AllMentionTarget
31+
*
32+
* @see <a
33+
* href="https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-all">
34+
* Documentation</a>
35+
*/
36+
@JsonTypeName("all")
37+
@JsonInclude(Include.NON_NULL)
38+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
39+
public record AllMentionTarget() implements MentionTarget {
40+
41+
public static class Builder {
42+
43+
public Builder() {}
44+
45+
public AllMentionTarget build() {
46+
return new AllMentionTarget();
47+
}
48+
}
49+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
27+
import com.fasterxml.jackson.annotation.JsonProperty;
28+
import com.fasterxml.jackson.annotation.JsonTypeName;
29+
30+
/**
31+
* An object representing a emoji substitution.
32+
*
33+
* @see <a
34+
* href="https://developers.line.biz/en/reference/messaging-api/#text-message-v2-emoji-object">
35+
* Documentation</a>
36+
*/
37+
@JsonTypeName("emoji")
38+
@JsonInclude(Include.NON_NULL)
39+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
40+
public record EmojiSubstitutionObject(
41+
/** Get productId */
42+
@JsonProperty("productId") String productId,
43+
/** Get emojiId */
44+
@JsonProperty("emojiId") String emojiId)
45+
implements SubstitutionObject {
46+
47+
public static class Builder {
48+
private String productId;
49+
private String emojiId;
50+
51+
public Builder(String productId, String emojiId) {
52+
53+
this.productId = productId;
54+
55+
this.emojiId = emojiId;
56+
}
57+
58+
public EmojiSubstitutionObject build() {
59+
return new EmojiSubstitutionObject(productId, emojiId);
60+
}
61+
}
62+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
27+
import com.fasterxml.jackson.annotation.JsonProperty;
28+
import com.fasterxml.jackson.annotation.JsonTypeName;
29+
30+
/**
31+
* An object representing a mention substitution.
32+
*
33+
* @see <a
34+
* href="https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mention-object">
35+
* Documentation</a>
36+
*/
37+
@JsonTypeName("mention")
38+
@JsonInclude(Include.NON_NULL)
39+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
40+
public record MentionSubstitutionObject(
41+
/** Get mentionee */
42+
@JsonProperty("mentionee") MentionTarget mentionee) implements SubstitutionObject {
43+
44+
public static class Builder {
45+
private MentionTarget mentionee;
46+
47+
public Builder(MentionTarget mentionee) {
48+
49+
this.mentionee = mentionee;
50+
}
51+
52+
public MentionSubstitutionObject build() {
53+
return new MentionSubstitutionObject(mentionee);
54+
}
55+
}
56+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonSubTypes;
26+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
27+
28+
/** MentionTarget */
29+
@JsonSubTypes({
30+
@JsonSubTypes.Type(value = AllMentionTarget.class, name = "all"),
31+
@JsonSubTypes.Type(value = UserMentionTarget.class, name = "user"),
32+
})
33+
@JsonTypeInfo(
34+
use = JsonTypeInfo.Id.NAME,
35+
include = JsonTypeInfo.As.PROPERTY,
36+
property = "type",
37+
visible = true)
38+
public interface MentionTarget {}

clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/Message.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
@JsonSubTypes.Type(value = StickerMessage.class, name = "sticker"),
3636
@JsonSubTypes.Type(value = TemplateMessage.class, name = "template"),
3737
@JsonSubTypes.Type(value = TextMessage.class, name = "text"),
38+
@JsonSubTypes.Type(value = TextMessageV2.class, name = "textV2"),
3839
@JsonSubTypes.Type(value = VideoMessage.class, name = "video"),
3940
})
4041
@JsonTypeInfo(
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonSubTypes;
26+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
27+
28+
/** An object that defines the replacement value for a placeholder in the text. */
29+
@JsonSubTypes({
30+
@JsonSubTypes.Type(value = EmojiSubstitutionObject.class, name = "emoji"),
31+
@JsonSubTypes.Type(value = MentionSubstitutionObject.class, name = "mention"),
32+
})
33+
@JsonTypeInfo(
34+
use = JsonTypeInfo.Id.NAME,
35+
include = JsonTypeInfo.As.PROPERTY,
36+
property = "type",
37+
visible = true)
38+
public interface SubstitutionObject {}

0 commit comments

Comments
 (0)