From b9d6d321ee3f79e0b6fb185a2a613fa666e5e840 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 9cae07dd106e..b3999264a4a6 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: str = Field('remove-schemas', const=True) + schema_ids: List[int] = Field(..., alias='schema-ids') + + class EnableRowLineageUpdate(BaseUpdate): action: str = Field('enable-row-lineage', const=True) @@ -1183,6 +1188,7 @@ class TableUpdate(BaseModel): SetStatisticsUpdate, RemoveStatisticsUpdate, RemovePartitionSpecsUpdate, + RemoveSchemasUpdate, EnableRowLineageUpdate, ] diff --git a/open-api/rest-catalog-open-api.yaml b/open-api/rest-catalog-open-api.yaml index 4b82fb3a3b0e..7e3620981a44 100644 --- a/open-api/rest-catalog-open-api.yaml +++ b/open-api/rest-catalog-open-api.yaml @@ -2673,6 +2673,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' enable-row-lineage: '#/components/schemas/EnableRowLineageUpdate' type: object required: @@ -2978,6 +2979,20 @@ components: items: type: integer + RemoveSchemasUpdate: + allOf: + - $ref: '#/components/schemas/BaseUpdate' + required: + - schema-ids + properties: + action: + type: string + const: "remove-schemas" + schema-ids: + type: array + items: + type: integer + # Disabling Row Lineage is Forbidden EnableRowLineageUpdate: allOf: @@ -3007,6 +3022,7 @@ components: - $ref: '#/components/schemas/SetStatisticsUpdate' - $ref: '#/components/schemas/RemoveStatisticsUpdate' - $ref: '#/components/schemas/RemovePartitionSpecsUpdate' + - $ref: '#/components/schemas/RemoveSchemasUpdate' - $ref: '#/components/schemas/EnableRowLineageUpdate' ViewUpdate: