ajantha-bhat commented on code in PR #15180:
URL: https://github.com/apache/iceberg/pull/15180#discussion_r3025533345
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -613,6 +613,90 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/functions:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+
+ get:
+ tags:
+ - Catalog API
+ summary: List all functions underneath a given namespace
+ description: Return all function names under this namespace
+ operationId: listFunctions
+ parameters:
+ - $ref: '#/components/parameters/page-token'
+ - $ref: '#/components/parameters/page-size'
+ responses:
+ 200:
+ $ref: '#/components/responses/ListFunctionsResponse'
+ 400:
+ $ref: '#/components/responses/BadRequestErrorResponse'
+ 401:
+ $ref: '#/components/responses/UnauthorizedResponse'
+ 403:
+ $ref: '#/components/responses/ForbiddenResponse'
+ 404:
+ description: Not Found - The namespace specified does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IcebergErrorResponse'
+ examples:
+ NamespaceNotFound:
+ $ref: '#/components/examples/NoSuchNamespaceError'
+ 419:
+ $ref: '#/components/responses/AuthenticationTimeoutResponse'
+ 503:
+ $ref: '#/components/responses/ServiceUnavailableResponse'
+ 5XX:
+ $ref: '#/components/responses/ServerErrorResponse'
+
+ /v1/{prefix}/namespaces/{namespace}/functions/{function}:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+ - $ref: '#/components/parameters/function'
+
+ get:
+ tags:
+ - Catalog API
+ summary: Load a function from the catalog
+ description:
+ Load a function from the catalog.
+
+
+ The response contains the function's full UDF metadata JSON, matching
the function metadata JSON file.
Review Comment:
can be more descriptive like "all overloaded definitions are included in a
single response"
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -613,6 +613,90 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/functions:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+
+ get:
+ tags:
+ - Catalog API
+ summary: List all functions underneath a given namespace
+ description: Return all function names under this namespace
Review Comment:
nit:
```suggestion
description: Return all function identifiers under this namespace
```
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -613,6 +613,90 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/functions:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+
+ get:
+ tags:
+ - Catalog API
+ summary: List all functions underneath a given namespace
+ description: Return all function names under this namespace
+ operationId: listFunctions
+ parameters:
+ - $ref: '#/components/parameters/page-token'
+ - $ref: '#/components/parameters/page-size'
+ responses:
+ 200:
+ $ref: '#/components/responses/ListFunctionsResponse'
+ 400:
+ $ref: '#/components/responses/BadRequestErrorResponse'
+ 401:
+ $ref: '#/components/responses/UnauthorizedResponse'
+ 403:
+ $ref: '#/components/responses/ForbiddenResponse'
+ 404:
+ description: Not Found - The namespace specified does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IcebergErrorResponse'
+ examples:
+ NamespaceNotFound:
+ $ref: '#/components/examples/NoSuchNamespaceError'
+ 419:
+ $ref: '#/components/responses/AuthenticationTimeoutResponse'
+ 503:
+ $ref: '#/components/responses/ServiceUnavailableResponse'
+ 5XX:
+ $ref: '#/components/responses/ServerErrorResponse'
+
+ /v1/{prefix}/namespaces/{namespace}/functions/{function}:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+ - $ref: '#/components/parameters/function'
+
+ get:
+ tags:
+ - Catalog API
+ summary: Load a function from the catalog
+ description:
+ Load a function from the catalog.
+
+
+ The response contains the function's full UDF metadata JSON, matching
the function metadata JSON file.
+
+
Review Comment:
can remove extra blank line.
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -613,6 +613,90 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/functions:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+
+ get:
+ tags:
+ - Catalog API
+ summary: List all functions underneath a given namespace
+ description: Return all function names under this namespace
+ operationId: listFunctions
+ parameters:
+ - $ref: '#/components/parameters/page-token'
+ - $ref: '#/components/parameters/page-size'
+ responses:
+ 200:
+ $ref: '#/components/responses/ListFunctionsResponse'
+ 400:
+ $ref: '#/components/responses/BadRequestErrorResponse'
+ 401:
+ $ref: '#/components/responses/UnauthorizedResponse'
+ 403:
+ $ref: '#/components/responses/ForbiddenResponse'
+ 404:
+ description: Not Found - The namespace specified does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IcebergErrorResponse'
+ examples:
+ NamespaceNotFound:
+ $ref: '#/components/examples/NoSuchNamespaceError'
+ 419:
+ $ref: '#/components/responses/AuthenticationTimeoutResponse'
+ 503:
+ $ref: '#/components/responses/ServiceUnavailableResponse'
+ 5XX:
+ $ref: '#/components/responses/ServerErrorResponse'
+
+ /v1/{prefix}/namespaces/{namespace}/functions/{function}:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+ - $ref: '#/components/parameters/function'
+
+ get:
+ tags:
+ - Catalog API
+ summary: Load a function from the catalog
+ description:
+ Load a function from the catalog.
+
Review Comment:
can remove extra blank line.
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4833,6 +5221,13 @@ components:
ListTablesResponseEmpty:
$ref: '#/components/examples/ListTablesEmptyExample'
+ ListFunctionsResponse:
+ description: A list of function identifiers
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListFunctionsResponse'
+
Review Comment:
we can add examples similar to `ListTablesResponse` and
`ListNamespacesResponse`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]