wombatu-kun commented on code in PR #17966:
URL: https://github.com/apache/iceberg/pull/17966#discussion_r3948105715


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -704,6 +757,67 @@ paths:
         5XX:
           $ref: '#/components/responses/ServerErrorResponse'
 
+    delete:
+      tags:
+        - Catalog API
+      summary: Drop a function from the catalog
+      description:
+        Remove a function from the catalog.
+
+        All definitions of the function are removed.
+
+      operationId: dropFunction
+      parameters:
+        - $ref: '#/components/parameters/idempotency-key'
+      responses:
+        204:
+          description: Success, no content
+        400:
+          $ref: '#/components/responses/BadRequestErrorResponse'
+        401:
+          $ref: '#/components/responses/UnauthorizedResponse'
+        403:
+          $ref: '#/components/responses/ForbiddenResponse'
+        404:
+          description:
+            Not Found - NoSuchFunctionException, function to drop does not 
exist
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/IcebergErrorResponse'
+              examples:
+                FunctionToDeleteDoesNotExist:
+                  $ref: '#/components/examples/NoSuchFunctionError'
+        419:
+          $ref: '#/components/responses/AuthenticationTimeoutResponse'
+        503:
+          $ref: '#/components/responses/ServiceUnavailableResponse'
+        5XX:
+          $ref: '#/components/responses/ServerErrorResponse'
+
+    head:
+      tags:
+        - Catalog API
+      summary: Check if a function exists
+      description:
+        Check if a function exists within a given namespace. This request does 
not return a response body.
+      operationId: functionExists
+      responses:
+        204:
+          description: Success, no content
+        400:
+          description: Bad Request

Review Comment:
   `functionExists` declares no 403 while `listFunctions`, `loadFunction`, 
`createFunction` and `dropFunction` all do, and it leaves 400/401/404 as bare 
descriptions while `$ref`-ing the JSON-bodied 419/503/5XX responses in the same 
block. Mirror `tableExists`: `$ref` `BadRequestErrorResponse`, 
`UnauthorizedResponse` and `ForbiddenResponse`, and return 
`IcebergErrorResponse` with the `NoSuchFunctionError` example on 404.



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

Reply via email to