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

remove already removed method putObjectTagging #1155

Merged
merged 2 commits into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var s3Client = new Minio.Client({
| [`getBucketTagging`](#getBucketTagging) | [`removeIncompleteUpload`](#removeIncompleteUpload) | | | | |
| [`setBucketTagging`](#setBucketTagging) | [`putObjectRetention`](#putObjectRetention) | | | | |
| [`removeBucketTagging`](#removeBucketTagging) | [`getObjectRetention`](#getObjectRetention) | | | | |
| [`setBucketLifecycle`](#setBucketLifecycle) | [`putObjectTagging`](#putObjectTagging) | | | | |
| [`setBucketLifecycle`](#setBucketLifecycle) | [`setObjectTagging`](#setObjectTagging) | | | | |
| [`getBucketLifecycle`](#getBucketLifecycle) | [`removeObjectTagging`](#removeObjectTagging) | | | | |
| [`removeBucketLifecycle`](#removeBucketLifecycle) | [`getObjectTagging`](#getObjectTagging) | | | | |
| [`setObjectLockConfig`](#setObjectLockConfig) | [`getObjectLegalHold`](#getObjectLegalHold) | | | | |
Expand Down Expand Up @@ -1487,8 +1487,6 @@ minioClient.getObjectRetention('bucketname', 'bucketname', { versionId: "my-vers
})
```

<a name="putObjectTagging"></a>
### putObjectTagging(bucketName, objectName, tags[, putOpts, callback])
<a name="setObjectTagging"></a>
### setObjectTagging(bucketName, objectName, tags[, putOpts, callback])

Expand Down
25 changes: 0 additions & 25 deletions src/minio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,31 +446,6 @@ export class Client {
): void
getObjectRetention(bucketName: string, objectName: string, options: VersionIdentificator): Promise<Retention>

// It seems, putObjectTagging is deprecated in favor or setObjectTagging - there is no such a method in the library source code
/**
* @deprecated Use setObjectTagging instead.
*/
putObjectTagging(bucketName: string, objectName: string, tags: TagList, callback: NoResultCallback): void
/**
* @deprecated Use setObjectTagging instead.
*/
putObjectTagging(
bucketName: string,
objectName: string,
tags: TagList,
putOptions: VersionIdentificator,
callback: NoResultCallback,
): void
/**
* @deprecated Use setObjectTagging instead.
*/
putObjectTagging(
bucketName: string,
objectName: string,
tags: TagList,
putOptions?: VersionIdentificator,
): Promise<void>

setObjectTagging(bucketName: string, objectName: string, tags: TagList, callback: NoResultCallback): void
setObjectTagging(
bucketName: string,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/functional-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ describe('functional tests', function () {
},
)

step(`putObjectTagging object_bucketName:${tagsBucketName}, objectName:${tagObjName},`, (done) => {
step(`setObjectTagging object_bucketName:${tagsBucketName}, objectName:${tagObjName},`, (done) => {
client.setObjectTagging(tagsBucketName, tagObjName, { 'test-tag-key-obj': 'test-tag-value-obj' }, (err) => {
if (err && err.code === 'NotImplemented') {
return done()
Expand Down
34 changes: 0 additions & 34 deletions tests/unit/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,40 +958,6 @@ describe('Client', function () {
}
})
})
describe('Put Object Tags', () => {
it('should fail on null object', (done) => {
try {
client.putObjectTagging('my-bucket-name', null, {}, function () {})
} catch (e) {
done()
}
})
it('should fail on empty object', (done) => {
try {
client.putObjectTagging('my-bucket-name', null, {}, function () {})
} catch (e) {
done()
}
})
it('should fail on non object tags', (done) => {
try {
client.putObjectTagging('my-bucket-name', null, 'non-obj-tag', function () {})
} catch (e) {
done()
}
})
it('should fail if tags are more than 50 on an object', (done) => {
const _50_plus_key_tags = {}
for (let i = 0; i < 51; i += 1) {
_50_plus_key_tags[i] = i
}
try {
client.putObjectTagging('my-bucket-name', null, _50_plus_key_tags, function () {})
} catch (e) {
done()
}
})
})
describe('Get Object Tags', () => {
it('should fail on invalid bucket', (done) => {
try {
Expand Down