Skip to content

Commit 971b3d7

Browse files
authored
fix: Ignore unknown JSON keys in OAuthConfig (#32)
1 parent 8fa97f2 commit 971b3d7

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

api/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</parent>
4444

4545
<artifactId>coze-api</artifactId>
46-
<version>0.2.2</version>
46+
<version>0.2.3</version>
4747

4848
<scm>
4949
<connection>scm:git:git://github.com/coze-dev/coze-java.git</connection>
@@ -296,6 +296,6 @@
296296
</plugins>
297297
</build>
298298
</profile>
299-
</profiles>
299+
</profiles>
300300

301-
</project>
301+
</project>

api/src/main/java/com/coze/openapi/client/auth/OAuthConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.io.IOException;
66
import java.io.InputStream;
77

8+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
89
import com.fasterxml.jackson.annotation.JsonProperty;
910
import com.fasterxml.jackson.core.exc.StreamReadException;
1011
import com.fasterxml.jackson.databind.DatabindException;
@@ -19,6 +20,7 @@
1920
@Builder
2021
@NoArgsConstructor
2122
@AllArgsConstructor
23+
@JsonIgnoreProperties(ignoreUnknown = true)
2224
public class OAuthConfig {
2325
@JsonProperty("client_type")
2426
private String clientType;

api/src/main/java/com/coze/openapi/service/utils/UserAgentInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public Response intercept(Chain chain) throws IOException {
2424
return chain.proceed(request);
2525
}
2626

27-
public static final String VERSION = "0.2.2";
27+
public static final String VERSION = "0.2.3";
2828
private static final ObjectMapper objectMapper = new ObjectMapper();
2929

3030
/** 获取操作系统版本 */

example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<dependency>
1717
<groupId>com.coze</groupId>
1818
<artifactId>coze-api</artifactId>
19-
<version>0.2.2</version>
19+
<version>0.2.3</version>
2020
</dependency>
2121
</dependencies>
22-
</project>
22+
</project>

0 commit comments

Comments
 (0)