jerryshao commented on code in PR #4108:
URL: https://github.com/apache/gravitino/pull/4108#discussion_r1677946920


##########
docs/open-api/catalogs.yaml:
##########
@@ -79,6 +79,62 @@ paths:
         "5xx":
           $ref: "./openapi.yaml#/components/responses/ServerErrorResponse"
 
+  /metalakes/{metalake}/catalogs/testConnection:
+    parameters:
+      - $ref: "./openapi.yaml#/components/parameters/metalake"
+    post:
+      tags:
+        - catalog
+      summary: Test catalog connection
+      operationId: testConnection
+      requestBody:
+        content:
+            application/json:
+                schema:
+                  $ref: "#/components/schemas/CatalogCreateRequest"
+                examples:
+                  CatalogCreate:
+                    $ref: "#/components/examples/CatalogCreate"
+      responses:
+        "200":
+          description: Test connection completed
+          content:
+              application/vnd.gravitino.v1+json:
+              schema:
+                  type: object
+                  required:
+                    - code
+                  properties:
+                    code:
+                        type: integer
+                        format: int32
+                        description: Status code of the response
+                        enum:
+                        - 0
+                    type:
+                      type: string
+                      description: Internal type definition of the exception
+                    message:
+                      type: string
+                      description: The message of the exception
+                    stack:
+                      type: array
+                      items:
+                        type: string
+                        description: The stack trace of the exception
+              examples:
+              TestConnectionSuccess:
+                value: {
+                  "code": 0
+                }
+              TestConnectionFailed:
+                $ref: "#/components/examples/CatalogAlreadyExistsException"

Review Comment:
   Did you add connection error code here?



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