psiby commented on code in PR #23268:
URL: https://github.com/apache/kafka/pull/23268#discussion_r4246856017


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/CreateConnectorRequest.java:
##########
@@ -21,18 +21,54 @@
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
 
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
 public record CreateConnectorRequest(
     @JsonProperty("name") String name,
     @JsonProperty("config") Map<String, String> config,
-    @JsonProperty("initial_state") InitialState initialState
+    @JsonProperty("initial_state") InitialState initialState,
+    @JsonProperty("initial_offsets") List<ConnectorOffset> initialOffsets
 ) {
+    /**
+     * Canonical constructor, declared explicitly and annotated so that 
Jackson unambiguously uses it as the creator
+     * rather than having to choose between this and the convenience 
constructor below.
+     */
+    @JsonCreator
+    public CreateConnectorRequest(

Review Comment:
   OK! Removed both of the explicit constructors in #23783 so only the record's 
own constructor is left. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to