This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 1031a01ab6 [hotfix] RestCatalog: fix alterDatabase/alterCatalog 
request mapping definition (#5397)
1031a01ab6 is described below

commit 1031a01ab61ec6a4db6ed41fedd20c4b89635db7
Author: XiaoHongbo <[email protected]>
AuthorDate: Thu Apr 3 15:15:45 2025 +0800

    [hotfix] RestCatalog: fix alterDatabase/alterCatalog request mapping 
definition (#5397)
---
 paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java     | 2 +-
 paimon-core/src/main/java/org/apache/paimon/rest/ResourcePaths.java   | 4 ----
 paimon-open-api/rest-catalog-open-api.yaml                            | 1 -
 paimon-open-api/rest-management-api.yaml                              | 2 +-
 .../main/java/org/apache/paimon/open/api/RESTCatalogController.java   | 2 +-
 5 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java 
b/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
index 8f890445e7..bb5f3fe1a6 100644
--- a/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
+++ b/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
@@ -279,7 +279,7 @@ public class RESTCatalog implements Catalog {
             AlterDatabaseRequest request =
                     new AlterDatabaseRequest(new ArrayList<>(removeKeys), 
updateProperties);
             client.post(
-                    resourcePaths.databaseProperties(name),
+                    resourcePaths.database(name),
                     request,
                     AlterDatabaseResponse.class,
                     restAuthFunction);
diff --git 
a/paimon-core/src/main/java/org/apache/paimon/rest/ResourcePaths.java 
b/paimon-core/src/main/java/org/apache/paimon/rest/ResourcePaths.java
index 991034a276..98d6dc3259 100644
--- a/paimon-core/src/main/java/org/apache/paimon/rest/ResourcePaths.java
+++ b/paimon-core/src/main/java/org/apache/paimon/rest/ResourcePaths.java
@@ -61,10 +61,6 @@ public class ResourcePaths {
         return SLASH.join(V1, prefix, DATABASES, encodeString(databaseName));
     }
 
-    public String databaseProperties(String databaseName) {
-        return SLASH.join(V1, prefix, DATABASES, encodeString(databaseName), 
"properties");
-    }
-
     public String tables(String databaseName) {
         return SLASH.join(V1, prefix, DATABASES, encodeString(databaseName), 
TABLES);
     }
diff --git a/paimon-open-api/rest-catalog-open-api.yaml 
b/paimon-open-api/rest-catalog-open-api.yaml
index 152431c842..c6793651b4 100644
--- a/paimon-open-api/rest-catalog-open-api.yaml
+++ b/paimon-open-api/rest-catalog-open-api.yaml
@@ -172,7 +172,6 @@ paths:
           $ref: '#/components/responses/DatabaseNotExistErrorResponse'
         "500":
           $ref: '#/components/responses/ServerErrorResponse'
-  /v1/{prefix}/databases/{database}/properties:
     post:
       tags:
         - database
diff --git a/paimon-open-api/rest-management-api.yaml 
b/paimon-open-api/rest-management-api.yaml
index bbd36772bf..580f2614eb 100644
--- a/paimon-open-api/rest-management-api.yaml
+++ b/paimon-open-api/rest-management-api.yaml
@@ -115,7 +115,7 @@ paths:
           $ref: '#/components/responses/ResourceNotFoundErrorResponse'
         "500":
           $ref: '#/components/responses/ServerErrorResponse'
-    patch:
+    post:
       tags:
         - Catalogs
       operationId: alterCatalog
diff --git 
a/paimon-open-api/src/main/java/org/apache/paimon/open/api/RESTCatalogController.java
 
b/paimon-open-api/src/main/java/org/apache/paimon/open/api/RESTCatalogController.java
index 6c3043c0dc..c27bbbba0a 100644
--- 
a/paimon-open-api/src/main/java/org/apache/paimon/open/api/RESTCatalogController.java
+++ 
b/paimon-open-api/src/main/java/org/apache/paimon/open/api/RESTCatalogController.java
@@ -231,7 +231,7 @@ public class RESTCatalogController {
                 responseCode = "500",
                 content = {@Content(schema = @Schema(implementation = 
ErrorResponse.class))})
     })
-    @PostMapping("/v1/{prefix}/databases/{database}/properties")
+    @PostMapping("/v1/{prefix}/databases/{database}")
     public AlterDatabaseResponse alterDatabase(
             @PathVariable String prefix,
             @PathVariable String database,

Reply via email to