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


##########
docs/open-api/domains.yaml:
##########
@@ -835,12 +832,7 @@ components:
         name:
           type: string
           minLength: 1
-        value:
-          type: string
-          nullable: true
-          minLength: 1
-          maxLength: 256
-          description: Exact assignment value; null binds any effective 
assignment of the tag.
+          description: The name of the backing tag.

Review Comment:
   Both the create and update schemas still accept `backingTag.value` because 
OpenAPI 3.0 defaults `additionalProperties` to `true`. The server returns HTTP 
400 for the same payloads, as covered by 
`TestDomainOperations.testInvalidBodies`. Please close both backing-tag request 
objects, keeping `create` available on POST and explicit `null` on PUT.



##########
docs/manage-domains-in-gravitino.md:
##########
@@ -656,7 +655,7 @@ effective again, so this does not necessarily remove 
inherited Domain membership
 ```shell
 curl --fail-with-body -u anonymous:dummy -X POST -H 'Accept: 
application/vnd.gravitino.v2+json' \
   -H 'Content-Type: application/vnd.gravitino.v2+json' \
-  -d 
'{"tagsToAdd":[],"tagsToRemove":[{"name":"department","value":"finance"}]}' \
+  -d '{"tagsToAdd":[],"tagsToRemove":[{"name":"finance"}]}' \

Review Comment:
   In the v2 tag API, omitting `value` removes only a valueless assignment. An 
asset tagged `department=finance` keeps that assignment and remains in the 
domain after this kind of request. Please use the v1 name-based removal in the 
REST, Java, and Python examples to clear all direct assignments of the tag.



##########
docs/manage-domains-in-gravitino.md:
##########
@@ -605,12 +603,13 @@ unbound = domain.update_backing_tag(None)
 
 Members are managed through the existing tag API. There is no separate Domain 
add/remove-member
 endpoint. In the assignment examples, `model` is a loaded model named 
`models.sales.forecast` and
-`department` is an existing tag allowing `finance`. See [tag 
operations](./manage-tags-in-gravitino.md)
+`finance` is the backing tag of the Finance domain. See [tag 
operations](./manage-tags-in-gravitino.md)
 for creating constrained tags and assigning them to catalogs or schemas.
 
 ### Assign a Backing Tag to an Object
 
-Assign the Finance backing-tag value to the model using normal tag 
permissions. The same API
+Assign the Finance backing tag to the model using normal tag permissions. 
Assign it without a value;

Review Comment:
   A backing tag with an allowed-values list still requires an allowed value 
when assigned to an object. Following this instruction for such a tag returns 
HTTP 400. Please qualify the valueless example here and the assignment guidance 
in `docs/domains.md`. The assignment follows the tag's constraint, and domain 
membership uses the tag's presence.



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