Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Add IfAbsent to LinkPhysicalAddress #7480

Merged
merged 5 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ components:
description: delimiter used to group common prefixes by
schema:
type: string

IfNonMatch:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IfNonMatch:
IfNoneMatch:

in: header
name: If-None-Match
description: |
Currently supports only "*" to allow uploading an object only if one doesn't exist yet.
N-o-Z marked this conversation as resolved.
Show resolved Hide resolved
example: "*"
required: false
schema:
type: string
pattern: '^\*$' # Currently, only "*" is supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid this: server limitations should be enforced on the server not on the client. Suppose I update my server to a version that also supports ETag. This is the only thing that prevents me from using an old client version.

I know the previous implementation also did this. I now believe that it was also wrong. But back then we didn't try hard enough to keep old clients compatible where possible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove pattern and add validation on server


responses:
NotFoundOrNoACL:
Expand Down Expand Up @@ -4164,6 +4175,10 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/StagingMetadata"

parameters:
- $ref: "#/components/parameters/IfNonMatch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- $ref: "#/components/parameters/IfNonMatch"
- $ref: "#/components/parameters/IfNoneMatch"


responses:
200:
# This actually violates HTTP, which requires returning 201 if a new object was
Expand Down Expand Up @@ -4397,24 +4412,14 @@ paths:
format: binary

parameters:
- $ref: "#/components/parameters/IfNonMatch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making sure this isn't a breaking change for clients

- in: query
name: storageClass
description: Deprecated, this capability will not be supported in future releases.
required: false
deprecated: true
schema:
type: string
- in: header
name: If-None-Match
description: |
Currently supports only "*" to allow uploading an object only if one doesn't exist yet.
Deprecated, this capability will not be supported in future releases.
example: "*"
required: false
deprecated: true
schema:
type: string
pattern: '^\*$' # Currently, only "*" is supported
- in: query
name: force
required: false
Expand Down
45 changes: 33 additions & 12 deletions clients/java-legacy/api/openapi.yaml

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

8 changes: 4 additions & 4 deletions clients/java-legacy/docs/ObjectsApi.md

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

6 changes: 4 additions & 2 deletions clients/java-legacy/docs/StagingApi.md

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.

Loading
Loading