From 77d96660e51b6ec5cb82733ddcb7e9a0dae42605 Mon Sep 17 00:00:00 2001 From: Gabor Kaszab Date: Fri, 10 Jan 2025 16:01:50 +0100 Subject: [PATCH] OpenAPI: Changes for freshness-aware table loading Added ETag and If-None-Match headers and 304 response for table loading. --- open-api/rest-catalog-open-api.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/open-api/rest-catalog-open-api.yaml b/open-api/rest-catalog-open-api.yaml index aeeb655522d8..50fe149355f5 100644 --- a/open-api/rest-catalog-open-api.yaml +++ b/open-api/rest-catalog-open-api.yaml @@ -930,6 +930,15 @@ paths: key. For example, "urn:ietf:params:oauth:token-type:jwt=". parameters: - $ref: '#/components/parameters/data-access' + - name: If-None-Match + in: header + description: + An optional header that allows the server to return 304 (Not Modified) if the metadata + is current. The content is the value of the ETag received in a CreateTableResponse or + LoadTableResponse. + required: false + schema: + type: string - in: query name: snapshots description: @@ -945,6 +954,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: @@ -1873,6 +1886,14 @@ components: type: integer minimum: 1 + etag: + name: ETag + in: header + description: Identifies a unique version of the table metadata. + required: false + schema: + type: string + ############################## # Application Schema Objects # ############################## @@ -4588,6 +4609,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 @@ -4616,6 +4640,9 @@ components: application/json: schema: $ref: '#/components/schemas/LoadTableResult' + headers: + etag: + $ref: '#/components/parameters/etag' LoadViewResponse: description: View metadata result when loading a view