Skip to content

Commit

Permalink
OpenAPI: Changes for freshness-aware table loading
Browse files Browse the repository at this point in the history
Added ETag and If-None-Match headers and 304 response for table loading.
  • Loading branch information
gaborkaszab committed Jan 10, 2025
1 parent 1cbc163 commit 86fa827
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,14 @@ paths:
key. For example, "urn:ietf:params:oauth:token-type:jwt=<JWT-token>".
parameters:
- $ref: '#/components/parameters/data-access'
- name: If-None-Match
in: header
description:
An optional header that triggers freshness-aware table loading. The content is the value
of the ETag received previously for the table.
required: false
schema:
type: string
- in: query
name: snapshots
description:
Expand All @@ -945,6 +953,10 @@ paths:
responses:
200:
$ref: '#/components/responses/LoadTableResponse'
304:
description:
Not Modified - Based on the content of the 'If-None-Match' header the table metadata has
not changed since.
400:
$ref: '#/components/responses/BadRequestErrorResponse'
401:
Expand Down Expand Up @@ -1873,6 +1885,15 @@ components:
type: integer
minimum: 1

etag:
name: ETag
in: header
description: Identifies a certain state of the table metadata.
required: false
schema:
type: string


##############################
# Application Schema Objects #
##############################
Expand Down Expand Up @@ -4587,6 +4608,9 @@ components:
application/json:
schema:
$ref: '#/components/schemas/LoadTableResult'
headers:
etag:
$ref: '#/components/parameters/etag'

PlanTableScanResponse:
description: Result of submitting a table scan to plan
Expand Down Expand Up @@ -4615,6 +4639,9 @@ components:
application/json:
schema:
$ref: '#/components/schemas/LoadTableResult'
headers:
etag:
$ref: '#/components/parameters/etag'

LoadViewResponse:
description: View metadata result when loading a view
Expand Down

0 comments on commit 86fa827

Please sign in to comment.