Skip to content

Conversation

@api-clients-generation-pipeline
Copy link
Contributor

header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
header_params['Accept'] = @api_client.select_header_accept(['*/*'])

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
header_params['Accept'] = @api_client.select_header_accept(%w[*/*])
Consider using the %w syntax instead (...read more)

The rule "Prefer %w to the literal array syntax" is a Ruby style guideline that encourages the use of %w notation instead of the traditional array syntax when defining arrays of strings. This rule is part of the Ruby community's efforts to promote readability and simplicity in Ruby code.

This rule is important because it helps to keep the code concise and easy to read. The %w notation allows you to define an array of strings without having to use quotes and commas. This can make the code cleaner and easier to understand, especially when dealing with large arrays.

To follow this rule, replace the traditional array syntax with the %w notation. For example, instead of writing ['foo', 'bar', 'baz'], you should write %w[foo bar baz]. This will create the same array, but in a more readable and concise way. By following this rule, you can help to make your Ruby code cleaner and easier to understand.

View in Datadog  Leave us feedback  Documentation

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 10, 2025

Datadog Report

Branch report: datadog-api-spec/generated/3633
Commit report: f00b9c9
Test service: datadog-api-client-ruby

✅ 0 Failed, 1007 Passed, 2092 Skipped, 1m 58.19s Total duration (1m 18.66s time saved)

@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3633 branch from a8511fd to 55dea5c Compare March 11, 2025 13:17
@api-clients-generation-pipeline api-clients-generation-pipeline bot merged commit b39f4f7 into master Mar 11, 2025
15 checks passed
@api-clients-generation-pipeline api-clients-generation-pipeline bot deleted the datadog-api-spec/generated/3633 branch March 11, 2025 13:53
github-actions bot pushed a commit that referenced this pull request Mar 11, 2025
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> b39f4f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants