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 Jan 21, 2025
1 parent c0bd4bf commit 637f0bf
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 @@ -386,6 +386,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 AssertCreate(BaseModel):
"""
The table must not already exist; used for create transactions
Expand Down Expand Up @@ -1176,6 +1181,7 @@ class TableUpdate(BaseModel):
SetStatisticsUpdate,
RemoveStatisticsUpdate,
RemovePartitionSpecsUpdate,
RemoveSchemasUpdate,
]


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 @@ -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
Expand Down Expand Up @@ -2966,6 +2967,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'
Expand All @@ -2986,6 +3001,7 @@ components:
- $ref: '#/components/schemas/SetStatisticsUpdate'
- $ref: '#/components/schemas/RemoveStatisticsUpdate'
- $ref: '#/components/schemas/RemovePartitionSpecsUpdate'
- $ref: '#/components/schemas/RemoveSchemasUpdate'

ViewUpdate:
anyOf:
Expand Down

0 comments on commit 637f0bf

Please sign in to comment.