Skip to content

Commit

Permalink
OpenAPI: Add RemoveSchemas REST update type
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborkaszab committed Feb 10, 2025
1 parent 3e6da2e commit b9d6d32
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions open-api/rest-catalog-open-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -1183,6 +1188,7 @@ class TableUpdate(BaseModel):
SetStatisticsUpdate,
RemoveStatisticsUpdate,
RemovePartitionSpecsUpdate,
RemoveSchemasUpdate,
EnableRowLineageUpdate,
]

Expand Down
16 changes: 16 additions & 0 deletions open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b9d6d32

Please sign in to comment.