xintongsong commented on code in PR #20236:
URL: https://github.com/apache/flink/pull/20236#discussion_r929490014


##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/rest/util/SqlGatewayRestAPIVersion.java:
##########
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.gateway.rest.util;
+
+import org.apache.flink.runtime.rest.versioning.RestAPIVersion;
+import org.apache.flink.table.gateway.api.endpoint.EndpointVersion;
+
+/**
+ * An enum for all versions of the Sql Gateway REST API.
+ *
+ * <p>Sql Gateway REST API versions are global and thus apply to every REST 
component.
+ *
+ * <p>Changes that must result in an API version increment include but are not 
limited to: -
+ * modification of a handler url - addition of new mandatory parameters - 
removal of a
+ * handler/request - modifications to request/response bodies (excluding 
additions)
+ */
+public enum SqlGatewayRestAPIVersion
+        implements RestAPIVersion<SqlGatewayRestAPIVersion>, EndpointVersion {
+    v1(true, true);

Review Comment:
   ```suggestion
       V1(true, true);
   ```



##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/rest/util/SqlGatewayRestOptions.java:
##########
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.gateway.rest.util;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.DelegatingConfiguration;
+import org.apache.flink.configuration.description.Description;
+
+import static org.apache.flink.configuration.ConfigOptions.key;
+import static org.apache.flink.configuration.description.TextElement.text;
+
+/** Options to configure {@link 
org.apache.flink.table.gateway.rest.SqlGatewayRestEndpoint}. */
+@PublicEvolving
+public class SqlGatewayRestOptions {

Review Comment:
   Where are these configurations used?



##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/rest/util/SqlGatewayRestAPIVersion.java:
##########
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.gateway.rest.util;
+
+import org.apache.flink.runtime.rest.versioning.RestAPIVersion;
+import org.apache.flink.table.gateway.api.endpoint.EndpointVersion;
+
+/**
+ * An enum for all versions of the Sql Gateway REST API.
+ *
+ * <p>Sql Gateway REST API versions are global and thus apply to every REST 
component.
+ *
+ * <p>Changes that must result in an API version increment include but are not 
limited to: -
+ * modification of a handler url - addition of new mandatory parameters - 
removal of a
+ * handler/request - modifications to request/response bodies (excluding 
additions)
+ */
+public enum SqlGatewayRestAPIVersion
+        implements RestAPIVersion<SqlGatewayRestAPIVersion>, EndpointVersion {
+    v1(true, true);

Review Comment:
   Do we also need a `V0` for testing purpose?



##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/taskmanager/TaskManagerStdoutFileHeaders.java:
##########
@@ -54,6 +58,11 @@ public String getTargetRestEndpointURL() {
         return URL;
     }
 
+    @Override
+    public Collection<RuntimeRestAPIVersion> getSupportedAPIVersions() {

Review Comment:
   This class should also extends `RuntimeUntypedResponseMessageHeaders`.



-- 
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