Skip to content

fix tag parsing and type and update validation and tests#1399

Merged
prakashsvmx merged 1 commit intominio:masterfrom
prakashsvmx:fix-tagging-type
Apr 7, 2025
Merged

fix tag parsing and type and update validation and tests#1399
prakashsvmx merged 1 commit intominio:masterfrom
prakashsvmx:fix-tagging-type

Conversation

@prakashsvmx
Copy link
Copy Markdown
Member

currently it is parsed as a nested array.. make it flat array always

Fixes #1397

import * as Minio from 'minio'

var minioClient = new Minio.Client({
  endPoint: 'localhost',
  port: 22000,
  useSSL: false,
  accessKey: 'minio',
  secretKey: 'minio123',
  //pathStyle:true
})

const testTagging = async () => {
  //const tags = { test: 'test' }
  const tags = { test: 'test', test1: 'test1' }
  await minioClient.setObjectTagging('test-bucket', '1.txt', tags)
  const tagging = await minioClient.getObjectTagging('test-bucket', '1.txt')
  console.dir(tagging)
}

testTagging()

//Result
[ { Key: 'test', Value: 'test' }, { Key: 'test1', Value: 'test1' } ]

@prakashsvmx prakashsvmx requested a review from grahit13 April 3, 2025 09:50
@prakashsvmx prakashsvmx self-assigned this Apr 3, 2025
Copy link
Copy Markdown

@grahit13 grahit13 left a comment

Choose a reason for hiding this comment

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

LGTM, Verified.

@prakashsvmx prakashsvmx merged commit 6a821b5 into minio:master Apr 7, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getObjectTagging return type mismatch with runtime

2 participants