mxnzx commented on PR #8131: URL: https://github.com/apache/gravitino/pull/8131#issuecomment-3193565724
While working on deduplicating tags by name (preferring direct > inherited), I’d like to keep REST responses consistent. My proposal is to always populate the inherited field in outgoing DTOs as true or false (never empty), treating Optional.empty() as direct = false when emitting: ```java // Normalize for REST output boolean isInherited = tag.inherited().orElse(false); // empty -> false (direct) TagDTO dto = DTOConverters.toDTO(tag, Optional.of(isInherited)); ``` Would this normalization be acceptable across the API? Or are there cases where we should preserve Optional.empty() in responses? Related: for getTagForObject (single tag fetch), do you prefer returning inherited=false for direct tags to align with listTagsInfo and client expectations? Thanks! -- 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]
