This is an automated email from the ASF dual-hosted git repository.
etudenhoefner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new dd26f36309 OpenAPI: Add AssignUUID update to metadata updates (#8716)
dd26f36309 is described below
commit dd26f3630954e69c584faa06c9395f77d49337b1
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Thu Oct 5 11:23:10 2023 +0200
OpenAPI: Add AssignUUID update to metadata updates (#8716)
---
open-api/rest-catalog-open-api.py | 6 ++++++
open-api/rest-catalog-open-api.yaml | 12 ++++++++++++
2 files changed, 18 insertions(+)
diff --git a/open-api/rest-catalog-open-api.py
b/open-api/rest-catalog-open-api.py
index 5fc9fe6e68..5de6c8969f 100644
--- a/open-api/rest-catalog-open-api.py
+++ b/open-api/rest-catalog-open-api.py
@@ -211,6 +211,7 @@ class MetadataLog(BaseModel):
class BaseUpdate(BaseModel):
action: Literal[
+ 'assign-uuid',
'upgrade-format-version',
'add-schema',
'set-current-schema',
@@ -228,6 +229,10 @@ class BaseUpdate(BaseModel):
]
+class AssignUUIDUpdate(BaseUpdate):
+ uuid: str
+
+
class UpgradeFormatVersionUpdate(BaseUpdate):
format_version: int = Field(..., alias='format-version')
@@ -632,6 +637,7 @@ class AddSchemaUpdate(BaseUpdate):
class TableUpdate(BaseModel):
__root__: Union[
+ AssignUUIDUpdate,
UpgradeFormatVersionUpdate,
AddSchemaUpdate,
SetCurrentSchemaUpdate,
diff --git a/open-api/rest-catalog-open-api.yaml
b/open-api/rest-catalog-open-api.yaml
index 5c1bf13ce4..d0b0006e70 100644
--- a/open-api/rest-catalog-open-api.yaml
+++ b/open-api/rest-catalog-open-api.yaml
@@ -1680,6 +1680,7 @@ components:
action:
type: string
enum:
+ - assign-uuid
- upgrade-format-version
- add-schema
- set-current-schema
@@ -1695,6 +1696,16 @@ components:
- set-properties
- remove-properties
+ AssignUUIDUpdate:
+ allOf:
+ - $ref: '#/components/schemas/BaseUpdate'
+ - type: object
+ required:
+ - uuid
+ properties:
+ uuid:
+ type: string
+
UpgradeFormatVersionUpdate:
allOf:
- $ref: '#/components/schemas/BaseUpdate'
@@ -1851,6 +1862,7 @@ components:
TableUpdate:
anyOf:
+ - $ref: '#/components/schemas/AssignUUIDUpdate'
- $ref: '#/components/schemas/UpgradeFormatVersionUpdate'
- $ref: '#/components/schemas/AddSchemaUpdate'
- $ref: '#/components/schemas/SetCurrentSchemaUpdate'