rdblue commented on a change in pull request #3955:
URL: https://github.com/apache/iceberg/pull/3955#discussion_r794079325
##########
File path: rest_docs/rest-catalog-open-api.yaml
##########
@@ -579,36 +672,552 @@ components:
destination:
$ref: '#/components/schemas/TableIdentifier'
+ Namespace:
+ description: Reference to one or more levels of a namespace
+ type: array
+ items:
+ type: string
+ example: [ "accounting", "tax" ]
+
TableIdentifier:
type: object
required:
- namespace
- name
properties:
namespace:
+ $ref: '#/components/schemas/Namespace'
+ name:
+ type: string
+ nullable: false
+
+ PrimitiveType:
+ type: string
+ example:
+ - "long"
+ - "string"
+ - "fixed[16]"
+ - "decimal(10,2)"
+
+ StructField:
+ type: object
+ required:
+ - id
+ - name
+ - required
+ - type
+ properties:
+ id:
+ type: integer
+ name:
+ type: string
+ required:
+ type: boolean
+ type:
+ $ref: '#/components/schemas/Type'
+ doc:
+ type: string
+
+ StructType:
+ type: object
+ required:
+ - fields
+ properties:
+ type:
+ type: string
+ enum: ["struct"]
+ fields:
type: array
- description: Individual levels of the namespace
items:
- type: string
+ $ref: '#/components/schemas/StructField'
+
+ ListType:
+ type: object
+ required:
+ - type
+ - element-id
+ - element-required
+ - element
+ properties:
+ type:
+ type: string
+ enum: ["list"]
+ element-id:
+ type: integer
+ element-required:
+ type: boolean
+ element:
+ $ref: '#/components/schemas/Type'
+
+ MapType:
+ type: object
+ required:
+ - type
+ - key-id
+ - key
+ - value-id
+ - value-required
+ - value
+ properties:
+ type:
+ type: string
+ enum: ["map"]
+ key-id:
+ type: integer
+ key:
+ $ref: '#/components/schemas/Type'
+ value-id:
+ type: integer
+ value-required:
+ type: boolean
+ value:
+ $ref: '#/components/schemas/Type'
+
+ Type:
+ anyOf:
+ - $ref: '#/components/schemas/PrimitiveType'
+ - $ref: '#/components/schemas/StructType'
+ - $ref: '#/components/schemas/ListType'
+ - $ref: '#/components/schemas/MapType'
+
+ Schema:
+ allOf:
+ - $ref: '#/components/schemas/StructType'
+ - type: object
+ properties:
+ schema-id:
+ type: integer
+ readOnly: true
+ identifier-field-ids:
+ type: array
+ items:
+ type: integer
+
+ Transform:
+ type: string
+ example:
+ - "identity"
+ - "year"
+ - "month"
+ - "day"
+ - "hour"
+ - "bucket[256]"
+ - "truncate[16]"
+
+ PartitionField:
+ type: object
+ required:
+ - source-id
+ - transform
+ - name
+ properties:
+ field-id:
+ type: integer
+ source-id:
+ type: integer
name:
type: string
- nullable: false
+ transform:
+ $ref: '#/components/schemas/Transform'
- UpdateNamespacePropertiesRequest:
+ PartitionSpec:
type: object
+ required:
+ - fields
properties:
- removals:
+ spec-id:
+ type: integer
+ readOnly: true
+ fields:
type: array
- uniqueItems: true
items:
+ $ref: '#/components/schemas/PartitionField'
+
+ SortDirection:
+ type: string
+ enum: ["asc", "desc"]
+
+ NullOrder:
+ type: string
+ enum: ["nulls-first", "nulls-last"]
+
+ SortField:
+ type: object
+ required:
+ - source-id
+ - transform
+ - direction
+ - null-order
+ properties:
+ source-id:
+ type: integer
+ transform:
+ $ref: '#/components/schemas/Transform'
+ direction:
+ $ref: '#/components/schemas/SortDirection'
+ null-order:
+ $ref: '#/components/schemas/NullOrder'
+
+ SortOrder:
+ type: object
+ required:
+ - fields
+ properties:
+ order-id:
+ type: integer
+ readOnly: true
+ fields:
+ $ref: '#/components/schemas/SortField'
+
+ Snapshot:
+ type: object
+ required:
+ - snapshot-id
+ - timestamp-ms
+ - manifest-list
+ properties:
+ snapshot-id:
+ type: integer
+ timestamp-ms:
+ type: integer
+ manifest-list:
+ type: string
+ description: Location of the snapshot's manifest list file
+ schema-id:
+ type: integer
+ summary:
+ type: object
+ required:
+ - summary
+ properties:
+ summary:
+ type: string
+ enum: ["append", "replace", "overwrite", "delete"]
+ additionalProperties:
+ type: string
+
+ SnapshotReference:
+ type: object
+ required:
+ - type
+ - snapshot-id
+ properties:
+ type:
+ type: string
+ enum: ["tag", "branch"]
+ snapshot-id:
+ type: integer
+ max-ref-age-ms:
+ type: integer
+ max-snapshot-age-ms:
+ type: integer
+ min-snapshots-to-keep:
+ type: integer
+
+ SnapshotReferences:
+ type: object
Review comment:
This is to match the Iceberg spec, where the refs are a map of ref name
to ref data. We could also have a ref that embeds its name and keep them in a
list. That's what we do for schemas, partition specs, etc. Either way, what we
do here should match the spec.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]