You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/08/09 07:48:10 UTC
[GitHub] [inlong] gong opened a new pull request, #5426: [INLONG-5424][Manager] Fix json serialization for Authentication when get inlongGroupInfo
gong opened a new pull request, #5426:
URL: https://github.com/apache/inlong/pull/5426
### Prepare a Pull Request
- [INLONG-5424][Manager] Fix json serialization for Authentication when get inlongGroupInfo
- Fixes #5424
### Motivation
Fix json serialization for Authentication when get inlongGroupInfo
### Modifications
* modify UT for inlong-manager/manager-client/src/test/java/org/apache/inlong/manager/client/api/inner/ClientFactoryTest.java, you can reproduce problem if you modify this UT
* Add annation for Authentication
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] gong commented on a diff in pull request #5426: [INLONG-5424][Manager] Fix json serialization for Authentication when get inlongGroupInfo
Posted by GitBox <gi...@apache.org>.
gong commented on code in PR #5426:
URL: https://github.com/apache/inlong/pull/5426#discussion_r941104462
##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/auth/Authentication.java:
##########
@@ -17,11 +17,20 @@
package org.apache.inlong.manager.common.auth;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Locale;
import java.util.Map;
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, visible = true, property = "type")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = DefaultAuthentication.class, name = DefaultAuthentication.DEFAULT),
Review Comment:
modify JosonUtils
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] healchow merged pull request #5426: [INLONG-5424][Manager] Fix JSON serialization error for Authentication when getting inlongGroupInfo
Posted by GitBox <gi...@apache.org>.
healchow merged PR #5426:
URL: https://github.com/apache/inlong/pull/5426
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] healchow commented on a diff in pull request #5426: [INLONG-5424][Manager] Fix json serialization for Authentication when get inlongGroupInfo
Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5426:
URL: https://github.com/apache/inlong/pull/5426#discussion_r941083421
##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/auth/Authentication.java:
##########
@@ -17,11 +17,20 @@
package org.apache.inlong.manager.common.auth;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Locale;
import java.util.Map;
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, visible = true, property = "type")
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = DefaultAuthentication.class, name = DefaultAuthentication.DEFAULT),
Review Comment:
It is recommended to specify its specific type through `@JsonTypeDefine` on the subclass, without adding all subclasses on the parent class - refer to the advice of the open-closed principle.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org