mchades commented on code in PR #13863:
URL: https://github.com/apache/gravitino/pull/13863#discussion_r4282541765


##########
common/src/main/java/org/apache/gravitino/dto/responses/TagNameListResponse.java:
##########
@@ -0,0 +1,58 @@
+/*
+ * 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.gravitino.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/** Represents a response for a list of tag names. */
+@ToString
+@EqualsAndHashCode(callSuper = true)
+public class TagNameListResponse extends NameListResponse {
+
+  @JsonProperty("hasInaccessibleTags")
+  private final boolean hasInaccessibleTags;
+
+  /**
+   * Creates a new TagNameListResponse.
+   *
+   * @param names The list of accessible tag names.
+   * @param hasInaccessibleTags Whether inaccessible tags were omitted from 
the response.
+   */
+  public TagNameListResponse(String[] names, boolean hasInaccessibleTags) {
+    super(names);
+    this.hasInaccessibleTags = hasInaccessibleTags;
+  }
+
+  /** Constructor used by Jackson deserializer. */
+  public TagNameListResponse() {
+    super();
+    this.hasInaccessibleTags = false;
+  }
+
+  /**
+   * Returns whether inaccessible tags were omitted from the response.
+   *
+   * @return true if at least one inaccessible tag was omitted, false otherwise
+   */
+  public boolean hasInaccessibleTags() {

Review Comment:
   The public Java `SupportsTags`/`SupportsPolicies` methods and Python tag 
methods still return only arrays/lists, so SDK callers still cannot distinguish 
no associations from all-inaccessible associations. The new tests read the DTOs 
through `RESTClient` directly. Please add backward-compatible public APIs 
exposing the visible items and the corresponding flag, with tests through those 
APIs.



##########
docs/open-api/tags.yaml:
##########
@@ -781,6 +781,18 @@ components:
         selector:
           $ref: "./policies.yaml#/components/schemas/PolicyAssociationSelector"
 
+    TagNameListResponse:
+      allOf:
+        - $ref: "./openapi.yaml#/components/schemas/NameListResponse"
+        - type: object
+          required:
+            - names
+            - hasInaccessibleTags
+          properties:
+            hasInaccessibleTags:
+              type: boolean
+              description: Whether one or more inaccessible tags were omitted 
from the response

Review Comment:
   Please also update `docs/manage-tags-in-gravitino.md` and 
`docs/manage-policies-in-gravitino.md`. OpenAPI now describes the fields, but 
the user guides do not explain them. Document the four list/flag combinations, 
include an all-inaccessible response example, explain inherited associations, 
and show how users can read the indicators through the supported APIs.



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