-
Notifications
You must be signed in to change notification settings - Fork 21
Add a new endpoint for listing Software Catalog relations #2361
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Get a list of entity relations returns "OK" response | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V2::SoftwareCatalogAPI.new | ||
p api_instance.list_catalog_relation() | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,5 @@ | ||||||
# Get a list of entity relations returns "OK" response with pagination | ||||||
|
||||||
require "datadog_api_client" | ||||||
api_instance = DatadogAPIClient::V2::SoftwareCatalogAPI.new | ||||||
api_instance.list_catalog_relation_with_pagination() { |item| puts item } | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ Code Quality Violation
Suggested change
Do not use parentheses with methods that take no arguments (...read more)The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand. This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success. To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1106,6 +1106,14 @@ | |
"v2.DeleteCatalogEntity" => { | ||
"entity_id" => "String", | ||
}, | ||
"v2.ListCatalogRelation" => { | ||
"page_offset" => "Integer", | ||
"page_limit" => "Integer", | ||
"filter_type" => "RelationType", | ||
"filter_from_ref" => "String", | ||
"filter_to_ref" => "String", | ||
"include" => "RelationIncludeType", | ||
}, | ||
Comment on lines
+1109
to
+1116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ Code Quality ViolationConsider using symbols instead of string hash keys (...read more)In Ruby, it is a best practice to use symbols instead of strings as hash keys. This rule emphasizes that it's more efficient and idiomatic to use symbols for this purpose. Symbols are immutable and unique, which makes them ideal for identifying things, whereas strings are mutable and can create multiple objects for the same sequence of characters. The importance of this rule lies in the performance and memory usage of your Ruby application. Using symbols as hash keys reduces memory usage because they are stored in memory only once during a Ruby process. This can make a significant difference in the efficiency of your application, especially when dealing with large data sets. To ensure you're following good coding practices, always use symbols for hash keys unless there's a specific reason to use a string. A simple refactoring from |
||
"v2.CreateCIAppPipelineEvent" => { | ||
"body" => "CIAppCreatePipelineEventRequest", | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚪ Code Quality Violation
Do not use parentheses with methods that take no arguments (...read more)
The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand.
This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success.
To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing
'test'.upcase()
, you should write'test'.upcase
. Similarly, instead ofKernel.exit!()
, writeKernel.exit!
. However, note that there is an exception forsuper
-super
by itself is different fromsuper()
, so in this case, parentheses may be necessary.