diff --git a/open-api/rest-catalog-open-api.py b/open-api/rest-catalog-open-api.py index f8b3f5bd3771..30ae491248fa 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 2435cd43f0e5..b2404f7424ea 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: