Skip to content

Commit

Permalink
Add byte range support to OpenAPI (server, spec and generated clients) (
Browse files Browse the repository at this point in the history
#4623)

* added byte range support to OpenAPI

* push generated clients

* order imports, fix review comments

* added tests for byte ranges

* Changed Fatalf's to Errorf's where possible to aide debugging
  • Loading branch information
ozkatz authored Nov 22, 2022
1 parent fb878ab commit fc4e1c2
Show file tree
Hide file tree
Showing 13 changed files with 235 additions and 34 deletions.
40 changes: 40 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2669,6 +2669,15 @@ paths:
- objects
operationId: getObject
summary: get object content
parameters:
- in: header
name: Range
description: Byte range to retrieve
example: "bytes=0-1023"
required: false
schema:
type: string
pattern: '^bytes=((\d*-\d*,? ?)+)$'
responses:
200:
description: object content
Expand All @@ -2691,6 +2700,31 @@ paths:
Content-Disposition:
schema:
type: string
206:
description: partial object content
content:
application/octet-stream:
schema:
type: string
format: binary
headers:
Content-Length:
schema:
type: integer
format: int64
Content-Range:
schema:
type: string
pattern: '^bytes=((\d*-\d*,? ?)+)$'
Last-Modified:
schema:
type: string
ETag:
schema:
type: string
Content-Disposition:
schema:
type: string
401:
$ref: "#/components/responses/Unauthorized"
404:
Expand All @@ -2703,6 +2737,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
416:
description: Requested Range Not Satisfiable
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/repositories/{repository}/branches/{branch}/staging/backing:
parameters:
Expand Down
51 changes: 51 additions & 0 deletions clients/java/api/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions clients/java/docs/ObjectsApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 25 additions & 9 deletions clients/java/src/main/java/io/lakefs/clients/api/ObjectsApi.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions clients/python/docs/ObjectsApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc4e1c2

Please sign in to comment.