mchades commented on code in PR #14815:
URL: https://github.com/apache/gravitino/pull/14815#discussion_r4523360458
##########
docs/open-api/functions.yaml:
##########
@@ -477,7 +477,7 @@ components:
description: The name of the function. Cannot be empty.
functionType:
type: string
- description: The type of the function
+ description: The type of the function. Values are case-insensitive.
Review Comment:
Minor: the description says values are case-insensitive, but the enum still
permits only uppercase values. For example, `scalar` and `ScAlAr` pass the
server's case-insensitive enum deserialization but fail this schema. Please
align the schema with the documented behavior, for example by replacing the
restrictive enum with a case-insensitive pattern for the supported names. The
enum restriction predates this PR, so this is a follow-up improvement rather
than a new regression.
##########
docs/open-api/functions.yaml:
##########
@@ -530,15 +530,15 @@ components:
type: object
required:
- "@type"
+ - newComment
properties:
"@type":
type: string
enum:
- "updateComment"
newComment:
type: string
- description: The new comment of the function. Can be null to clear
the comment.
- nullable: true
+ description: The new comment of the function. Cannot be null or
blank.
Review Comment:
[P2] Please enforce the non-blank requirement in both `newComment` and
`PythonImpl.handler`. `required` and `type: string` reject missing/null values,
but I verified that `""` and `" "` still pass these schemas, while the
implementation rejects them through `StringUtils.isNotBlank`. Add a
non-whitespace constraint such as `pattern: '\S'` to both fields; `minLength:
1` alone would still allow whitespace-only values.
--
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]