Skip to content

Commit

Permalink
OpenAPI: Fix property names for stats/partition stats (#10662)
Browse files Browse the repository at this point in the history
  • Loading branch information
nastra authored Jul 15, 2024
1 parent 96e7759 commit 6319712
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 4 additions & 6 deletions open-api/rest-catalog-open-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ class BlobMetadata(BaseModel):
snapshot_id: int = Field(..., alias='snapshot-id')
sequence_number: int = Field(..., alias='sequence-number')
fields: List[int]
properties: Optional[Dict[str, Any]] = None
properties: Optional[Dict[str, str]] = None


class PartitionStatisticsFile(BaseModel):
Expand Down Expand Up @@ -1024,11 +1024,9 @@ class TableMetadata(BaseModel):
last_sequence_number: Optional[int] = Field(None, alias='last-sequence-number')
snapshot_log: Optional[SnapshotLog] = Field(None, alias='snapshot-log')
metadata_log: Optional[MetadataLog] = Field(None, alias='metadata-log')
statistics_files: Optional[List[StatisticsFile]] = Field(
None, alias='statistics-files'
)
partition_statistics_files: Optional[List[PartitionStatisticsFile]] = Field(
None, alias='partition-statistics-files'
statistics: Optional[List[StatisticsFile]] = None
partition_statistics: Optional[List[PartitionStatisticsFile]] = Field(
None, alias='partition-statistics'
)


Expand Down
6 changes: 4 additions & 2 deletions open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2132,11 +2132,11 @@ components:
metadata-log:
$ref: '#/components/schemas/MetadataLog'
# statistics
statistics-files:
statistics:
type: array
items:
$ref: '#/components/schemas/StatisticsFile'
partition-statistics-files:
partition-statistics:
type: array
items:
$ref: '#/components/schemas/PartitionStatisticsFile'
Expand Down Expand Up @@ -3389,6 +3389,8 @@ components:
type: integer
properties:
type: object
additionalProperties:
type: string

PartitionStatisticsFile:
type: object
Expand Down

0 comments on commit 6319712

Please sign in to comment.