From 89d177f08d7bb6d5d8ef8ce671f3e7fdf0a6064c Mon Sep 17 00:00:00 2001 From: Gabor Kaszab Date: Tue, 21 Jan 2025 17:42:02 +0100 Subject: [PATCH] OpenAPI: Add RemoveSchemas REST update type --- open-api/rest-catalog-open-api.py | 6 ++++++ open-api/rest-catalog-open-api.yaml | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/open-api/rest-catalog-open-api.py b/open-api/rest-catalog-open-api.py index c3ec276b9e8b..c39260bfa79d 100644 --- a/open-api/rest-catalog-open-api.py +++ b/open-api/rest-catalog-open-api.py @@ -390,6 +390,11 @@ class RemovePartitionSpecsUpdate(BaseUpdate): spec_ids: List[int] = Field(..., alias='spec-ids') +class RemoveSchemasUpdate(BaseUpdate): + action: Optional[Literal['remove-schemas']] = None + schema_ids: List[int] = Field(..., alias='schema-ids') + + class TableRequirement(BaseModel): type: str @@ -1173,6 +1178,7 @@ class TableUpdate(BaseModel): SetStatisticsUpdate, RemoveStatisticsUpdate, RemovePartitionSpecsUpdate, + RemoveSchemasUpdate, ] diff --git a/open-api/rest-catalog-open-api.yaml b/open-api/rest-catalog-open-api.yaml index 5df05094a86d..dcf5106105d2 100644 --- a/open-api/rest-catalog-open-api.yaml +++ b/open-api/rest-catalog-open-api.yaml @@ -2644,6 +2644,7 @@ components: set-partition-statistics: '#/components/schemas/SetPartitionStatisticsUpdate' remove-partition-statistics: '#/components/schemas/RemovePartitionStatisticsUpdate' remove-partition-specs: '#/components/schemas/RemovePartitionSpecsUpdate' + remove-schemas: '#/components/schemas/RemoveSchemasUpdate' type: object required: - action @@ -2945,6 +2946,20 @@ components: items: type: integer + RemoveSchemasUpdate: + allOf: + - $ref: '#/components/schemas/BaseUpdate' + required: + - schema-ids + properties: + action: + type: string + enum: [ "remove-schemas" ] + schema-ids: + type: array + items: + type: integer + TableUpdate: anyOf: - $ref: '#/components/schemas/AssignUUIDUpdate' @@ -2965,6 +2980,7 @@ components: - $ref: '#/components/schemas/SetStatisticsUpdate' - $ref: '#/components/schemas/RemoveStatisticsUpdate' - $ref: '#/components/schemas/RemovePartitionSpecsUpdate' + - $ref: '#/components/schemas/RemoveSchemasUpdate' ViewUpdate: anyOf: