This is an automated email from the ASF dual-hosted git repository.
fokko 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 0c194502b8 OpenAPI: Use `PrimitiveTypeValue` rather than `object`
(#14184)
0c194502b8 is described below
commit 0c194502b802630dde71120e5e48a074a0552ee8
Author: Fokko Driesprong <[email protected]>
AuthorDate: Mon Dec 8 10:15:03 2025 +0100
OpenAPI: Use `PrimitiveTypeValue` rather than `object` (#14184)
---
open-api/rest-catalog-open-api.py | 7 +++----
open-api/rest-catalog-open-api.yaml | 7 ++-----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/open-api/rest-catalog-open-api.py
b/open-api/rest-catalog-open-api.py
index 25a1a1a5c4..6627e4516b 100644
--- a/open-api/rest-catalog-open-api.py
+++ b/open-api/rest-catalog-open-api.py
@@ -18,7 +18,7 @@
from __future__ import annotations
from datetime import date, timedelta
-from typing import Any, Dict, List, Literal, Optional, Union
+from typing import Dict, List, Literal, Optional, Union
from uuid import UUID
from pydantic import BaseModel, Extra, Field
@@ -1085,19 +1085,18 @@ class SetStatisticsUpdate(BaseUpdate):
class UnaryExpression(BaseModel):
type: ExpressionType
term: Term
- value: Dict[str, Any]
class LiteralExpression(BaseModel):
type: ExpressionType
term: Term
- value: Dict[str, Any]
+ value: PrimitiveTypeValue
class SetExpression(BaseModel):
type: ExpressionType
term: Term
- values: List[Dict[str, Any]]
+ values: List[PrimitiveTypeValue]
class StructField(BaseModel):
diff --git a/open-api/rest-catalog-open-api.yaml
b/open-api/rest-catalog-open-api.yaml
index c0b1c0f0fc..c977f9b9af 100644
--- a/open-api/rest-catalog-open-api.yaml
+++ b/open-api/rest-catalog-open-api.yaml
@@ -2311,15 +2311,12 @@ components:
required:
- type
- term
- - value
properties:
type:
$ref: '#/components/schemas/ExpressionType'
enum: ["is-null", "not-null", "is-nan", "not-nan"]
term:
$ref: '#/components/schemas/Term'
- value:
- type: object
LiteralExpression:
type: object
@@ -2334,7 +2331,7 @@ components:
term:
$ref: '#/components/schemas/Term'
value:
- type: object
+ $ref: '#/components/schemas/PrimitiveTypeValue'
SetExpression:
type: object
@@ -2351,7 +2348,7 @@ components:
values:
type: array
items:
- type: object
+ $ref: '#/components/schemas/PrimitiveTypeValue'
Term:
oneOf: