This is an automated email from the ASF dual-hosted git repository.
stevenzwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new 3571629f33 OpenAPI: Add CatalogObjectIdentifier schema (#16144)
3571629f33 is described below
commit 3571629f3348f9ff2ecfcd2d9786867ce0ef715c
Author: Steven Zhen Wu <[email protected]>
AuthorDate: Mon May 18 11:01:27 2026 -0700
OpenAPI: Add CatalogObjectIdentifier schema (#16144)
* OpenAPI: Add CatalogObjectIdentifier and CatalogObjectType schemas
Introduces two related REST schemas:
- CatalogObjectIdentifier: a bare array of hierarchical levels that
references a catalog object (table, view, or namespace). The object
kind is determined by context (e.g. the endpoint or a companion
CatalogObjectType discriminator), not by the identifier structure
alone.
- CatalogObjectType: an enum of "table", "view", and "namespace"
intended to be used as a discriminator alongside
CatalogObjectIdentifier.
Also regenerates rest-catalog-open-api.py to match.
Co-Authored-By: Claude Opus 4.7
---
open-api/rest-catalog-open-api.py | 12 ++++++++++++
open-api/rest-catalog-open-api.yaml | 11 +++++++++++
2 files changed, 23 insertions(+)
diff --git a/open-api/rest-catalog-open-api.py
b/open-api/rest-catalog-open-api.py
index f8b3f5bd37..30ae491248 100644
--- a/open-api/rest-catalog-open-api.py
+++ b/open-api/rest-catalog-open-api.py
@@ -106,6 +106,18 @@ class TableIdentifier(BaseModel):
name: str
+class CatalogObjectIdentifier(RootModel[list[str]]):
+ """
+ Reference to a catalog object (for example, table, view, or namespace) as
an ordered list of hierarchical levels. The object kind is determined by
context (e.g. the endpoint or a companion type discriminator), not by the
identifier structure alone.
+ """
+
+ root: list[str] = Field(
+ ...,
+ description='Reference to a catalog object (for example, table, view,
or namespace) as an ordered list of hierarchical levels. The object kind is
determined by context (e.g. the endpoint or a companion type discriminator),
not by the identifier structure alone.',
+ examples=[['accounting', 'tax', 'paid']],
+ )
+
+
class PrimitiveType(RootModel[str]):
root: str = Field(..., examples=[['long', 'string', 'fixed[16]',
'decimal(10,2)']])
diff --git a/open-api/rest-catalog-open-api.yaml
b/open-api/rest-catalog-open-api.yaml
index 06d13ec133..0e5cd9c95e 100644
--- a/open-api/rest-catalog-open-api.yaml
+++ b/open-api/rest-catalog-open-api.yaml
@@ -2267,6 +2267,17 @@ components:
type: string
nullable: false
+ CatalogObjectIdentifier:
+ description:
+ Reference to a catalog object (for example, table, view, or namespace)
as
+ an ordered list of hierarchical levels.
+ The object kind is determined by context (e.g. the endpoint or a
+ companion type discriminator), not by the identifier structure alone.
+ type: array
+ items:
+ type: string
+ example: [ "accounting", "tax", "paid" ]
+
PrimitiveType:
type: string
example: