From 56bdeec9992b6e2b1c7c4c1e829a57f06a373045 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Mon, 10 Mar 2025 13:20:50 -0700 Subject: [PATCH 01/16] add generic table apis --- api/iceberg-service/build.gradle.kts | 2 +- api/polaris-catalog-service/build.gradle.kts | 101 +++++++ gradle/projects.main.properties | 1 + .../generic-tables-api.yaml | 263 ++++++++++++++++++ spec/polaris-catalog-service.yaml | 14 +- 5 files changed, 377 insertions(+), 4 deletions(-) create mode 100644 api/polaris-catalog-service/build.gradle.kts create mode 100644 spec/polaris-catalog-apis/generic-tables-api.yaml diff --git a/api/iceberg-service/build.gradle.kts b/api/iceberg-service/build.gradle.kts index f669f4a367..a2a73eadef 100644 --- a/api/iceberg-service/build.gradle.kts +++ b/api/iceberg-service/build.gradle.kts @@ -55,7 +55,7 @@ openApiGenerate { ignoreFileOverride = "$rootDir/.openapi-generator-ignore" removeOperationIdPrefix = true templateDir = "$rootDir/server-templates" - globalProperties.put("apis", "") + globalProperties.put("apis", "CatalogApi,ConfigurationApi,OAuth2Api") globalProperties.put("models", "false") globalProperties.put("apiDocs", "false") globalProperties.put("modelTests", "false") diff --git a/api/polaris-catalog-service/build.gradle.kts b/api/polaris-catalog-service/build.gradle.kts new file mode 100644 index 0000000000..cddae1f9b6 --- /dev/null +++ b/api/polaris-catalog-service/build.gradle.kts @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +plugins { + alias(libs.plugins.openapi.generator) + id("polaris-client") + alias(libs.plugins.jandex) +} + +val models = + listOf( + "CreateGenericTableRequest", + "LoadGenericTableResponse", + "ListGenericTablesResponse", + "Table", + ) + .joinToString(",") + +dependencies { + implementation(project(":polaris-core")) + + implementation(platform(libs.iceberg.bom)) + implementation("org.apache.iceberg:iceberg-api") + implementation("org.apache.iceberg:iceberg-core") + + implementation(libs.jakarta.annotation.api) + implementation(libs.jakarta.inject.api) + implementation(libs.jakarta.validation.api) + implementation(libs.swagger.annotations) + + implementation(libs.jakarta.servlet.api) + implementation(libs.jakarta.ws.rs.api) + + implementation(platform(libs.micrometer.bom)) + implementation("io.micrometer:micrometer-core") + + implementation(platform(libs.jackson.bom)) + implementation("com.fasterxml.jackson.core:jackson-annotations") + implementation("com.fasterxml.jackson.core:jackson-core") + implementation("com.fasterxml.jackson.core:jackson-databind") +} + +openApiGenerate { + inputSpec = "$rootDir/spec/polaris-catalog-service.yaml" + generatorName = "jaxrs-resteasy" + outputDir = "$projectDir/build/generated" + apiPackage = "org.apache.polaris.service.catalog.api" + modelPackage = "org.apache.polaris.service.types" + ignoreFileOverride = "$rootDir/.openapi-generator-ignore" + removeOperationIdPrefix = true + templateDir = "$rootDir/server-templates" + globalProperties.put("apis", "GenericTableApi") + globalProperties.put("models", models) + globalProperties.put("apiDocs", "false") + globalProperties.put("modelTests", "false") + configOptions.put("resourceName", "catalog") + configOptions.put("useTags", "true") + configOptions.put("useBeanValidation", "false") + configOptions.put("sourceFolder", "src/main/java") + configOptions.put("useJakartaEe", "true") + configOptions.put("generateBuilders", "true") + configOptions.put("generateConstructorWithAllArgs", "true") + configOptions.put("openApiNullable", "false") + openapiNormalizer.put("REFACTOR_ALLOF_WITH_PROPERTIES_ONLY", "true") + additionalProperties.put("apiNamePrefix", "PolarisCatalog") + additionalProperties.put("apiNameSuffix", "") + additionalProperties.put("metricsPrefix", "polaris") + serverVariables.put("basePath", "api/catalog") + importMappings = + mapOf( + "ErrorModel" to "org.apache.iceberg.rest.responses.ErrorResponse", + "IcebergErrorResponse" to "org.apache.iceberg.rest.responses.ErrorResponse", + "TableIdentifier" to "org.apache.iceberg.catalog.TableIdentifier", + ) +} + +listOf("sourcesJar", "compileJava").forEach { task -> + tasks.named(task) { dependsOn("openApiGenerate") } +} + +sourceSets { + main { java { srcDir(project.layout.buildDirectory.dir("generated/src/main/java")) } } +} + +tasks.named("javadoc") { dependsOn("jandex") } diff --git a/gradle/projects.main.properties b/gradle/projects.main.properties index 4f13a8cd88..88fbcd0fa4 100644 --- a/gradle/projects.main.properties +++ b/gradle/projects.main.properties @@ -22,6 +22,7 @@ polaris-core=polaris-core polaris-api-iceberg-service=api/iceberg-service polaris-api-management-model=api/management-model polaris-api-management-service=api/management-service +polaris-api-catalog-service=api/polaris-catalog-service polaris-service-common=service/common polaris-quarkus-defaults=quarkus/defaults polaris-quarkus-service=quarkus/service diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml new file mode 100644 index 0000000000..913c346d18 --- /dev/null +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -0,0 +1,263 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +--- +paths: + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables: + parameters: + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/prefix' + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/namespace' + + get: + tags: + - Generic Table API + summary: List all generic tables identifiers underneath a given namespace + description: Return all generic table identifiers under this namespace + operationId: listGenericTables + parameters: + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/page-token' + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/page-size' + responses: + 200: + $ref: '#/components/responses/ListGenericTablesResponse' + 400: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/BadRequestErrorResponse' + 401: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/UnauthorizedResponse' + 403: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ForbiddenResponse' + 404: + description: Not Found - The namespace specified does not exist + content: + application/json: + schema: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/IcebergErrorResponse' + examples: + NamespaceNotFound: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchNamespaceError' + 419: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse' + + post: + tags: + - Generic Table API + summary: Create a generic table under the given namespace + description: + Create a generic table under the given namespace, and return the created table information as a response. + operationId: createGenericTable + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGenericTableRequest' + responses: + 200: + $ref: '#/components/responses/CreateGenericTableResponse' + 400: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/BadRequestErrorResponse' + 401: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/UnauthorizedResponse' + 403: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ForbiddenResponse' + 404: + description: Not Found - The namespace specified does not exist + content: + application/json: + schema: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/IcebergErrorResponse' + examples: + NamespaceNotFound: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchNamespaceError' + 409: + description: Conflict - The table already exists under the given namespace + content: + application/json: + schema: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/IcebergErrorResponse' + examples: + TableAlreadyExists: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/TableAlreadyExistsError' + 419: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse' + + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{table}: + parameters: + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/prefix' + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/namespace' + - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/table' + + get: + tags: + - Generic Table API + summary: Load a generic table under the given namespace from the catalog + operationId: loadGenericTable + description: + Load a generic table from the catalog under the given namespace. + + The response contains all table information passed during create. + + responses: + 200: + $ref: '#/components/responses/LoadGenericTableResponse' + 400: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/BadRequestErrorResponse' + 401: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/UnauthorizedResponse' + 403: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ForbiddenResponse' + 404: + description: + Not Found - NoSuchTableError, generic table to load does not exist + content: + application/json: + schema: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/IcebergErrorResponse' + examples: + TableToLoadDoesNotExist: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchGenericTableError' + 419: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse' + + delete: + tags: + - Generic Table API + summary: Drop a generic table under the given namespace from the catalog + operationId: dropGenericTable + description: Remove a table under the given namespace from the catalog + responses: + 204: + description: Success, no content + 400: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/BadRequestErrorResponse' + 401: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/UnauthorizedResponse' + 403: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ForbiddenResponse' + 404: + description: + Not Found - NoSuchTableError, Generic table to drop does not exist + content: + application/json: + schema: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/IcebergErrorResponse' + examples: + TableToDeleteDoesNotExist: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchTableError' + 419: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse' + +components: + schemas: + CreateGenericTableRequest: + type: object + required: + - name + - format + properties: + name: + type: string + format: + type: string + doc: + type: string + properties: + type: object + additionalProperties: + type: string + + Table: + type: object + required: + - name + - format + properties: + name: + type: string + format: + type: string + doc: + type: string + properties: + type: object + additionalProperties: + type: string + register-at: + type: string + + LoadGenericTableResponse: + description: Result used when a table is successfully loaded. + type: object + required: + - table + properties: + table: + $ref: '#/components/schemas/Table' + + ListGenericTablesResponse: + type: object + properties: + next-page-token: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/PageToken' + identifiers: + type: array + uniqueItems: true + items: + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/TableIdentifier' + + responses: + + LoadGenericTableResponse: + description: Table result if successfully load a generic table. + content: + application/json: + schema: + $ref: '#/components/schemas/LoadGenericTableResponse' + + + CreateGenericTableResponse: + description: Table result if successfully created a generic table. + content: + application/json: + schema: + $ref: '#/components/schemas/LoadGenericTableResponse' + + + ListGenericTablesResponse: + description: List of generic table identifiers. + content: + application/json: + schema: + $ref: '#/components/schemas/ListGenericTablesResponse' \ No newline at end of file diff --git a/spec/polaris-catalog-service.yaml b/spec/polaris-catalog-service.yaml index cedcf0f717..08992bf017 100644 --- a/spec/polaris-catalog-service.yaml +++ b/spec/polaris-catalog-service.yaml @@ -127,13 +127,21 @@ paths: # /v1/{prefix}/namespaces/{namespace}/tables/{table}/tasks: # Not implemented in Polaris - ###################### - # Polaris-native API # - ###################### + ################################### + # Polaris-native notification API # + ################################### /v1/{prefix}/namespaces/{namespace}/tables/{table}/notifications: $ref: './polaris-catalog-apis/notifications-api.yaml#/paths/~1v1~1{prefix}~1namespaces~1{namespace}~1tables~1{table}~1notifications' + ############################# + # Polaris Generic Table API # + ############################# + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables: + $ref: './polaris-catalog-apis/generic-tables-api.yaml#/paths/~1polaris~1v1~1{prefix}~1namespaces~1{namespace}~1generic-tables' + + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{table}: + $ref: './polaris-catalog-apis/generic-tables-api.yaml#/paths/~1polaris~1v1~1{prefix}~1namespaces~1{namespace}~1generic-tables~1{table}' components: securitySchemes: From 586acabc3aa736a4da37858948797677a45c81f9 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Mon, 10 Mar 2025 13:29:17 -0700 Subject: [PATCH 02/16] add new line --- spec/polaris-catalog-apis/generic-tables-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index 913c346d18..e51f486bc0 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -260,4 +260,4 @@ components: content: application/json: schema: - $ref: '#/components/schemas/ListGenericTablesResponse' \ No newline at end of file + $ref: '#/components/schemas/ListGenericTablesResponse' From 20d1368f52b414b882eae92561b0e2dac2bca833 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Mon, 10 Mar 2025 15:10:59 -0700 Subject: [PATCH 03/16] update table to GenericTable --- api/polaris-catalog-service/build.gradle.kts | 2 +- spec/polaris-catalog-apis/generic-tables-api.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/polaris-catalog-service/build.gradle.kts b/api/polaris-catalog-service/build.gradle.kts index cddae1f9b6..9ca73453f3 100644 --- a/api/polaris-catalog-service/build.gradle.kts +++ b/api/polaris-catalog-service/build.gradle.kts @@ -28,7 +28,7 @@ val models = "CreateGenericTableRequest", "LoadGenericTableResponse", "ListGenericTablesResponse", - "Table", + "GenericTable", ) .joinToString(",") diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index e51f486bc0..364013c2a8 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -139,7 +139,7 @@ paths: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/schemas/IcebergErrorResponse' examples: TableToLoadDoesNotExist: - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchGenericTableError' + $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchTableError' 419: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' 503: @@ -198,7 +198,7 @@ components: additionalProperties: type: string - Table: + GenericTable: type: object required: - name @@ -224,7 +224,7 @@ components: - table properties: table: - $ref: '#/components/schemas/Table' + $ref: '#/components/schemas/GenericTable' ListGenericTablesResponse: type: object From 14929a5ee188af6676c67b89a5a6690923532ee5 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Mon, 10 Mar 2025 16:19:01 -0700 Subject: [PATCH 04/16] add example --- spec/polaris-catalog-apis/generic-tables-api.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index 364013c2a8..e363331d2e 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -216,6 +216,7 @@ components: type: string register-at: type: string + example: "2024-03-03T12:00:00Z" LoadGenericTableResponse: description: Result used when a table is successfully loaded. From 74318d14c98be93b38f6864d5d57d45ef9f20a42 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 14:31:31 -0700 Subject: [PATCH 05/16] add updated readme and bundle yaml --- api/README.md | 2 + .../bundled-polaris-catalog-service.yaml | 236 ++++++++++++++++-- 2 files changed, 222 insertions(+), 16 deletions(-) diff --git a/api/README.md b/api/README.md index efecb80b21..7c7fb61fc0 100644 --- a/api/README.md +++ b/api/README.md @@ -31,6 +31,8 @@ This directory contains the API modules for Apache Polaris. Polaris Management API. - [`polaris-api-iceberg-service`](iceberg-service): contains the service classes for the Polaris Iceberg REST API. +- [`polaris-api-catalog-service`](polaris-catalog-service): contains the service classes for the Polaris + native Catalog REST API. The classes in these modules are generated from the OpenAPI specification files in the [`spec`](../spec) directory. \ No newline at end of file diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index 1b10c66dec..563f00c7f3 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1,19 +1,3 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. openapi: 3.0.3 info: title: Apache Polaris and Apache Iceberg REST Catalog API @@ -1359,6 +1343,155 @@ paths: $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: $ref: '#/components/responses/ServerErrorResponse' + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables: + parameters: + - $ref: '#/components/parameters/prefix' + - $ref: '#/components/parameters/namespace' + get: + tags: + - Generic Table API + summary: List all generic tables identifiers underneath a given namespace + description: Return all generic table identifiers under this namespace + operationId: listGenericTables + parameters: + - $ref: '#/components/parameters/page-token' + - $ref: '#/components/parameters/page-size' + responses: + '200': + $ref: '#/components/responses/ListGenericTablesResponse' + '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' + post: + tags: + - Generic Table API + summary: Create a generic table under the given namespace + description: Create a generic table under the given namespace, and return the created table information as a response. + operationId: createGenericTable + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGenericTableRequest' + responses: + '200': + $ref: '#/components/responses/CreateGenericTableResponse' + '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' + '409': + description: Conflict - The table already exists under the given namespace + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergErrorResponse' + examples: + TableAlreadyExists: + $ref: '#/components/examples/TableAlreadyExistsError' + '419': + $ref: '#/components/responses/AuthenticationTimeoutResponse' + '503': + $ref: '#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '#/components/responses/ServerErrorResponse' + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{table}: + parameters: + - $ref: '#/components/parameters/prefix' + - $ref: '#/components/parameters/namespace' + - $ref: '#/components/parameters/table' + get: + tags: + - Generic Table API + summary: Load a generic table under the given namespace from the catalog + operationId: loadGenericTable + description: |- + Load a generic table from the catalog under the given namespace. + The response contains all table information passed during create. + responses: + '200': + $ref: '#/components/responses/LoadGenericTableResponse' + '400': + $ref: '#/components/responses/BadRequestErrorResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + description: Not Found - NoSuchTableError, generic table to load does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergErrorResponse' + examples: + TableToLoadDoesNotExist: + $ref: '#/components/examples/NoSuchTableError' + '419': + $ref: '#/components/responses/AuthenticationTimeoutResponse' + '503': + $ref: '#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '#/components/responses/ServerErrorResponse' + delete: + tags: + - Generic Table API + summary: Drop a generic table under the given namespace from the catalog + operationId: dropGenericTable + description: Remove a table under the given namespace from the catalog + 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 - NoSuchTableError, Generic table to drop does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergErrorResponse' + examples: + TableToDeleteDoesNotExist: + $ref: '#/components/examples/NoSuchTableError' + '419': + $ref: '#/components/responses/AuthenticationTimeoutResponse' + '503': + $ref: '#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '#/components/responses/ServerErrorResponse' components: securitySchemes: OAuth2: @@ -3257,6 +3390,59 @@ components: $ref: '#/components/schemas/NotificationType' payload: $ref: '#/components/schemas/TableUpdateNotification' + ListGenericTablesResponse: + type: object + properties: + next-page-token: + $ref: '#/components/schemas/PageToken' + identifiers: + type: array + uniqueItems: true + items: + $ref: '#/components/schemas/TableIdentifier' + CreateGenericTableRequest: + type: object + required: + - name + - format + properties: + name: + type: string + format: + type: string + doc: + type: string + properties: + type: object + additionalProperties: + type: string + GenericTable: + type: object + required: + - name + - format + properties: + name: + type: string + format: + type: string + doc: + type: string + properties: + type: object + additionalProperties: + type: string + register-at: + type: string + example: '2024-03-03T12:00:00Z' + LoadGenericTableResponse: + description: Result used when a table is successfully loaded. + type: object + required: + - table + properties: + table: + $ref: '#/components/schemas/GenericTable' responses: BadRequestErrorResponse: description: Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. @@ -3436,6 +3622,24 @@ components: application/json: schema: $ref: '#/components/schemas/LoadViewResult' + ListGenericTablesResponse: + description: List of generic table identifiers. + content: + application/json: + schema: + $ref: '#/components/schemas/ListGenericTablesResponse' + CreateGenericTableResponse: + description: Table result if successfully created a generic table. + content: + application/json: + schema: + $ref: '#/components/schemas/LoadGenericTableResponse' + LoadGenericTableResponse: + description: Table result if successfully load a generic table. + content: + application/json: + schema: + $ref: '#/components/schemas/LoadGenericTableResponse' parameters: prefix: name: prefix From 3b2730ccc08f276b22711cf3ff2f6588caf8e641 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 14:34:20 -0700 Subject: [PATCH 06/16] add license --- .../bundled-polaris-catalog-service.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index 563f00c7f3..a99daa67de 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. openapi: 3.0.3 info: title: Apache Polaris and Apache Iceberg REST Catalog API From 0e180ba35f77bf10bbde13d8d47f8c7af8f10460 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 14:37:14 -0700 Subject: [PATCH 07/16] update README file --- spec/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/README.md b/spec/README.md index 7790d0ed34..d8b6670a1f 100644 --- a/spec/README.md +++ b/spec/README.md @@ -23,7 +23,7 @@ Polaris provides two sets of OpenAPI specifications: - `polaris-management-service.yml` - Defines the management APIs for using Polaris to create and manage Iceberg catalogs and their principals - `polaris-catalog-service.yaml` - Defines the specification for the Polaris Catalog API, which encompasses both the Iceberg REST Catalog API and Polaris-native API. - - `polaris-catalog-apis` - Contains the specifications of Polaris-native API + - `polaris-catalog-apis` - Contains the specification for Polaris-native Catalog APIs - `iceberg-rest-catalog-open-api.yaml` - Contains the specification for Iceberg Rest Catalog API ## Generated Specification Files @@ -45,5 +45,6 @@ npm install @redocly/cli -g ``` redocly bundle spec/polaris-catalog-service.yaml -o spec/generated/bundled-polaris-catalog-service.yaml ``` +Note: the license header will be removed after the bundle generation, please manually add it back. From 18c9ac66009d238cee73d8d6fdf21d5d797e230a Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 17:31:05 -0700 Subject: [PATCH 08/16] address feedback --- spec/generated/bundled-polaris-catalog-service.yaml | 8 -------- spec/polaris-catalog-apis/generic-tables-api.yaml | 8 -------- spec/polaris-catalog-service.yaml | 6 +++--- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index a99daa67de..f6ce4906fe 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1390,8 +1390,6 @@ paths: examples: NamespaceNotFound: $ref: '#/components/examples/NoSuchNamespaceError' - '419': - $ref: '#/components/responses/AuthenticationTimeoutResponse' '503': $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: @@ -1435,8 +1433,6 @@ paths: examples: TableAlreadyExists: $ref: '#/components/examples/TableAlreadyExistsError' - '419': - $ref: '#/components/responses/AuthenticationTimeoutResponse' '503': $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: @@ -1472,8 +1468,6 @@ paths: examples: TableToLoadDoesNotExist: $ref: '#/components/examples/NoSuchTableError' - '419': - $ref: '#/components/responses/AuthenticationTimeoutResponse' '503': $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: @@ -1502,8 +1496,6 @@ paths: examples: TableToDeleteDoesNotExist: $ref: '#/components/examples/NoSuchTableError' - '419': - $ref: '#/components/responses/AuthenticationTimeoutResponse' '503': $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index e363331d2e..f85912cc7e 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -51,8 +51,6 @@ paths: examples: NamespaceNotFound: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchNamespaceError' - 419: - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' 503: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' 5XX: @@ -98,8 +96,6 @@ paths: examples: TableAlreadyExists: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/TableAlreadyExistsError' - 419: - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' 503: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' 5XX: @@ -140,8 +136,6 @@ paths: examples: TableToLoadDoesNotExist: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchTableError' - 419: - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' 503: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' 5XX: @@ -172,8 +166,6 @@ paths: examples: TableToDeleteDoesNotExist: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/examples/NoSuchTableError' - 419: - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/AuthenticationTimeoutResponse' 503: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServiceUnavailableResponse' 5XX: diff --git a/spec/polaris-catalog-service.yaml b/spec/polaris-catalog-service.yaml index 08992bf017..aceb6ee30a 100644 --- a/spec/polaris-catalog-service.yaml +++ b/spec/polaris-catalog-service.yaml @@ -127,9 +127,9 @@ paths: # /v1/{prefix}/namespaces/{namespace}/tables/{table}/tasks: # Not implemented in Polaris - ################################### - # Polaris-native notification API # - ################################### + ############################ + # Polaris notification API # + ############################ /v1/{prefix}/namespaces/{namespace}/tables/{table}/notifications: $ref: './polaris-catalog-apis/notifications-api.yaml#/paths/~1v1~1{prefix}~1namespaces~1{namespace}~1tables~1{table}~1notifications' From 4445ecc7bf877a60ef572c931e433b726f005b6f Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 17:37:15 -0700 Subject: [PATCH 09/16] replace parameter table with generic-table --- .../bundled-polaris-catalog-service.yaml | 28 +++++++------------ .../generic-tables-api.yaml | 14 ++++++++-- spec/polaris-catalog-service.yaml | 4 +-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index f6ce4906fe..ca1b944ef6 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1,19 +1,3 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. openapi: 3.0.3 info: title: Apache Polaris and Apache Iceberg REST Catalog API @@ -1437,11 +1421,11 @@ paths: $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: $ref: '#/components/responses/ServerErrorResponse' - /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{table}: + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{generic-table}: parameters: - $ref: '#/components/parameters/prefix' - $ref: '#/components/parameters/namespace' - - $ref: '#/components/parameters/table' + - $ref: '#/components/parameters/generic-table' get: tags: - Generic Table API @@ -3717,6 +3701,14 @@ components: schema: type: string example: sales + generic-table: + name: generic-table + in: path + description: A generic table name + required: true + schema: + type: string + example: sales examples: ListNamespacesNonEmptyExample: summary: A non-empty list of namespaces diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index f85912cc7e..1cde0d2a94 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -101,11 +101,11 @@ paths: 5XX: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse' - /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{table}: + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{generic-table}: parameters: - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/prefix' - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/namespace' - - $ref: '../iceberg-rest-catalog-open-api.yaml#/components/parameters/table' + - $ref: '#/components/parameters/generic-table' get: tags: @@ -172,6 +172,16 @@ paths: $ref: '../iceberg-rest-catalog-open-api.yaml#/components/responses/ServerErrorResponse' components: + parameters: + generic-table: + name: generic-table + in: path + description: A generic table name + required: true + schema: + type: string + example: "sales" + schemas: CreateGenericTableRequest: type: object diff --git a/spec/polaris-catalog-service.yaml b/spec/polaris-catalog-service.yaml index aceb6ee30a..488c206c1a 100644 --- a/spec/polaris-catalog-service.yaml +++ b/spec/polaris-catalog-service.yaml @@ -140,8 +140,8 @@ paths: /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables: $ref: './polaris-catalog-apis/generic-tables-api.yaml#/paths/~1polaris~1v1~1{prefix}~1namespaces~1{namespace}~1generic-tables' - /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{table}: - $ref: './polaris-catalog-apis/generic-tables-api.yaml#/paths/~1polaris~1v1~1{prefix}~1namespaces~1{namespace}~1generic-tables~1{table}' + /polaris/v1/{prefix}/namespaces/{namespace}/generic-tables/{generic-table}: + $ref: './polaris-catalog-apis/generic-tables-api.yaml#/paths/~1polaris~1v1~1{prefix}~1namespaces~1{namespace}~1generic-tables~1{generic-table}' components: securitySchemes: From 8c41774a2c536249731cf68178c9cef77a51e9c0 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 17:37:44 -0700 Subject: [PATCH 10/16] add license back --- .../bundled-polaris-catalog-service.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index ca1b944ef6..b6ce9ecb2c 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. openapi: 3.0.3 info: title: Apache Polaris and Apache Iceberg REST Catalog API From 1f550be4f4eb6d1becaa1907890c5e48b6e4151b Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 17:49:06 -0700 Subject: [PATCH 11/16] add doc for GenericTable --- spec/generated/bundled-polaris-catalog-service.yaml | 7 +++++++ spec/polaris-catalog-apis/generic-tables-api.yaml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index b6ce9ecb2c..17d8cfb387 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -3426,6 +3426,13 @@ components: type: string GenericTable: type: object + description: | + Generic Table information. + - `name` name for the generic table + - `format` format for the generic table, i.e. "delta", "csv" + - `properties` properties for the generic table passed on creation + - `doc` comment or description for the generic table + - `register-at` time when the generic table is registered with Polaris service in ISO format. required: - name - format diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index 1cde0d2a94..b9d9f8ffdc 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -202,6 +202,18 @@ components: GenericTable: type: object + description: > + Generic Table information. + + - `name` name for the generic table + + - `format` format for the generic table, i.e. "delta", "csv" + + - `properties` properties for the generic table passed on creation + + - `doc` comment or description for the generic table + + - `register-at` time when the generic table is registered with Polaris service in ISO format. required: - name - format From 82127f0d0e2b990f95992147d7178202f04a596b Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Tue, 11 Mar 2025 17:56:04 -0700 Subject: [PATCH 12/16] capitialization --- spec/polaris-catalog-service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/polaris-catalog-service.yaml b/spec/polaris-catalog-service.yaml index 488c206c1a..8299ec29c6 100644 --- a/spec/polaris-catalog-service.yaml +++ b/spec/polaris-catalog-service.yaml @@ -128,7 +128,7 @@ paths: # Not implemented in Polaris ############################ - # Polaris notification API # + # Polaris Notification API # ############################ /v1/{prefix}/namespaces/{namespace}/tables/{table}/notifications: From fd96bd2ecc5c7373d8fe5b3fce029dfd34d0845f Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Wed, 12 Mar 2025 14:29:56 -0700 Subject: [PATCH 13/16] fix error --- .../bundled-polaris-catalog-service.yaml | 20 ------------------- .../generic-tables-api.yaml | 5 ----- 2 files changed, 25 deletions(-) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index 17d8cfb387..ad70a1568c 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1,19 +1,3 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. openapi: 3.0.3 info: title: Apache Polaris and Apache Iceberg REST Catalog API @@ -3432,7 +3416,6 @@ components: - `format` format for the generic table, i.e. "delta", "csv" - `properties` properties for the generic table passed on creation - `doc` comment or description for the generic table - - `register-at` time when the generic table is registered with Polaris service in ISO format. required: - name - format @@ -3447,9 +3430,6 @@ components: type: object additionalProperties: type: string - register-at: - type: string - example: '2024-03-03T12:00:00Z' LoadGenericTableResponse: description: Result used when a table is successfully loaded. type: object diff --git a/spec/polaris-catalog-apis/generic-tables-api.yaml b/spec/polaris-catalog-apis/generic-tables-api.yaml index b9d9f8ffdc..92ee7f9a59 100644 --- a/spec/polaris-catalog-apis/generic-tables-api.yaml +++ b/spec/polaris-catalog-apis/generic-tables-api.yaml @@ -212,8 +212,6 @@ components: - `properties` properties for the generic table passed on creation - `doc` comment or description for the generic table - - - `register-at` time when the generic table is registered with Polaris service in ISO format. required: - name - format @@ -228,9 +226,6 @@ components: type: object additionalProperties: type: string - register-at: - type: string - example: "2024-03-03T12:00:00Z" LoadGenericTableResponse: description: Result used when a table is successfully loaded. From ce1031d4d8920c0442ebb7e80af7a90903122484 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Wed, 12 Mar 2025 14:31:53 -0700 Subject: [PATCH 14/16] add license back --- .../bundled-polaris-catalog-service.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/generated/bundled-polaris-catalog-service.yaml b/spec/generated/bundled-polaris-catalog-service.yaml index ad70a1568c..2a5509ca9e 100644 --- a/spec/generated/bundled-polaris-catalog-service.yaml +++ b/spec/generated/bundled-polaris-catalog-service.yaml @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. openapi: 3.0.3 info: title: Apache Polaris and Apache Iceberg REST Catalog API From 34cf4634359ced1a79ab0de45062ed8f2e77f6be Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Wed, 12 Mar 2025 15:22:15 -0700 Subject: [PATCH 15/16] fix readme --- spec/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/README.md b/spec/README.md index d8b6670a1f..a25010bf36 100644 --- a/spec/README.md +++ b/spec/README.md @@ -23,7 +23,7 @@ Polaris provides two sets of OpenAPI specifications: - `polaris-management-service.yml` - Defines the management APIs for using Polaris to create and manage Iceberg catalogs and their principals - `polaris-catalog-service.yaml` - Defines the specification for the Polaris Catalog API, which encompasses both the Iceberg REST Catalog API and Polaris-native API. - - `polaris-catalog-apis` - Contains the specification for Polaris-native Catalog APIs + - `polaris-catalog-apis` - Contains the specification for Polaris-specific Catalog APIs - `iceberg-rest-catalog-open-api.yaml` - Contains the specification for Iceberg Rest Catalog API ## Generated Specification Files From 9792d700e16af7d33950ece8f4b0b49594e4ea65 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Wed, 12 Mar 2025 16:00:17 -0700 Subject: [PATCH 16/16] fix model name --- api/polaris-catalog-service/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/polaris-catalog-service/build.gradle.kts b/api/polaris-catalog-service/build.gradle.kts index 9ca73453f3..f231943335 100644 --- a/api/polaris-catalog-service/build.gradle.kts +++ b/api/polaris-catalog-service/build.gradle.kts @@ -23,7 +23,7 @@ plugins { alias(libs.plugins.jandex) } -val models = +val genericTableModels = listOf( "CreateGenericTableRequest", "LoadGenericTableResponse", @@ -66,7 +66,7 @@ openApiGenerate { removeOperationIdPrefix = true templateDir = "$rootDir/server-templates" globalProperties.put("apis", "GenericTableApi") - globalProperties.put("models", models) + globalProperties.put("models", genericTableModels) globalProperties.put("apiDocs", "false") globalProperties.put("modelTests", "false") configOptions.put("resourceName", "catalog")