Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
171 changes: 138 additions & 33 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions examples/v2/static-analysis/CreateSCAResult.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,23 @@
dependencies: [
DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItems.new({
exclusions: [],
group: nil,
is_direct: nil,
locations: [
DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItems.new({
block: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
}),
name: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
name: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.new({
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
}),
namespace: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
namespace: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.new({
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
}),
version: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({
version: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.new({
_end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}),
}),
Expand All @@ -36,6 +38,8 @@
reachable_symbol_properties: [
DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.new({}),
],
target_frameworks: [],
version: nil,
}),
],
files: [
Expand All @@ -47,6 +51,12 @@
}),
],
repository: DatadogAPIClient::V2::ScaRequestDataAttributesRepository.new({}),
scan_start_timestamp: DatadogAPIClient::V2::ScaRequestDataAttributesScanStartTimestamp.new({}),
tags: DatadogAPIClient::V2::ScaRequestDataAttributesTags.new({
tool: DatadogAPIClient::V2::ScaRequestDataAttributesTagsTool.new({
generator: DatadogAPIClient::V2::ScaRequestDataAttributesTagsToolGenerator.new({}),
}),
}),
vulnerabilities: [
DatadogAPIClient::V2::ScaRequestDataAttributesVulnerabilitiesItems.new({
affects: [
Expand Down
2 changes: 1 addition & 1 deletion features/v2/static_analysis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Feature: Static Analysis
Scenario: Post dependencies for analysis returns "OK" response
Given operation "CreateSCAResult" enabled
And new "CreateSCAResult" request
And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}]}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}}
And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "group": null, "is_direct": null, "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}], "target_frameworks": [], "version": null}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "scan_start_timestamp": {}, "tags": {"tool": {"generator": {}}}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}}
When the request is sent
Then the response status is 200 OK

Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6936,11 +6936,16 @@ def overrides
"v2.sca_request_data_attributes_dependencies_items" => "ScaRequestDataAttributesDependenciesItems",
"v2.sca_request_data_attributes_dependencies_items_locations_items" => "ScaRequestDataAttributesDependenciesItemsLocationsItems",
"v2.sca_request_data_attributes_dependencies_items_locations_items_file_position" => "ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition",
"v2.sca_request_data_attributes_dependencies_items_locations_items_nullable_file_position" => "ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition",
"v2.sca_request_data_attributes_dependencies_items_locations_items_position" => "ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition",
"v2.sca_request_data_attributes_dependencies_items_reachable_symbol_properties_items" => "ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems",
"v2.sca_request_data_attributes_files_items" => "ScaRequestDataAttributesFilesItems",
"v2.sca_request_data_attributes_relations_items" => "ScaRequestDataAttributesRelationsItems",
"v2.sca_request_data_attributes_repository" => "ScaRequestDataAttributesRepository",
"v2.sca_request_data_attributes_scan_start_timestamp" => "ScaRequestDataAttributesScanStartTimestamp",
"v2.sca_request_data_attributes_tags" => "ScaRequestDataAttributesTags",
"v2.sca_request_data_attributes_tags_tool" => "ScaRequestDataAttributesTagsTool",
"v2.sca_request_data_attributes_tags_tool_generator" => "ScaRequestDataAttributesTagsToolGenerator",
"v2.sca_request_data_attributes_vulnerabilities_items" => "ScaRequestDataAttributesVulnerabilitiesItems",
"v2.sca_request_data_attributes_vulnerabilities_items_affects_items" => "ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems",
"v2.sca_request_data_type" => "ScaRequestDataType",
Expand Down
24 changes: 21 additions & 3 deletions lib/datadog_api_client/v2/models/sca_request_data_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ class ScaRequestDataAttributes
# Information about the source code repository being analyzed.
attr_accessor :repository

# The time when the SCA scan started.
attr_accessor :scan_start_timestamp

# The name of the service or application being analyzed.
attr_accessor :service

# A map of key-value tags providing additional metadata for the SCA scan.
# A map of tags providing additional metadata for the SCA scan.
attr_accessor :tags

# The list of vulnerabilities identified in the dependency graph.
Expand All @@ -60,6 +63,7 @@ def self.attribute_map
:'files' => :'files',
:'relations' => :'relations',
:'repository' => :'repository',
:'scan_start_timestamp' => :'scan_start_timestamp',
:'service' => :'service',
:'tags' => :'tags',
:'vulnerabilities' => :'vulnerabilities'
Expand All @@ -76,12 +80,21 @@ def self.openapi_types
:'files' => :'Array<ScaRequestDataAttributesFilesItems>',
:'relations' => :'Array<ScaRequestDataAttributesRelationsItems>',
:'repository' => :'ScaRequestDataAttributesRepository',
:'scan_start_timestamp' => :'ScaRequestDataAttributesScanStartTimestamp',
:'service' => :'String',
:'tags' => :'Hash<String, String>',
:'tags' => :'ScaRequestDataAttributesTags',
:'vulnerabilities' => :'Array<ScaRequestDataAttributesVulnerabilitiesItems>'
}
end

# List of attributes with nullable: true
# @!visibility private
def self.openapi_nullable
Set.new([
:'scan_start_timestamp',
])
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
Expand Down Expand Up @@ -130,6 +143,10 @@ def initialize(attributes = {})
self.repository = attributes[:'repository']
end

if attributes.key?(:'scan_start_timestamp')
self.scan_start_timestamp = attributes[:'scan_start_timestamp']
end

if attributes.key?(:'service')
self.service = attributes[:'service']
end
Expand Down Expand Up @@ -177,6 +194,7 @@ def ==(o)
files == o.files &&
relations == o.relations &&
repository == o.repository &&
scan_start_timestamp == o.scan_start_timestamp &&
service == o.service &&
tags == o.tags &&
vulnerabilities == o.vulnerabilities &&
Expand All @@ -187,7 +205,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[commit, dependencies, env, files, relations, repository, service, tags, vulnerabilities, additional_properties].hash
[commit, dependencies, env, files, relations, repository, scan_start_timestamp, service, tags, vulnerabilities, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class ScaRequestDataAttributesDependenciesItems
# The name of the dependency package.
attr_accessor :name

# Indicates whether dependency details are intentionally opaque.
attr_accessor :opaque

# The package manager responsible for this dependency (e.g., maven, pip, npm).
attr_accessor :package_manager

Expand All @@ -51,9 +54,21 @@ class ScaRequestDataAttributesDependenciesItems
# Properties describing symbols from this dependency that are reachable in the application code.
attr_accessor :reachable_symbol_properties

# Indicates whether this dependency requires transitive dependency enrichment.
attr_accessor :requires_transitive_enrichment

# The target framework identifiers associated with this dependency.
attr_accessor :target_frameworks

# The version of the dependency.
attr_accessor :version

# Indicates whether the version value represents a version constraint.
attr_accessor :version_constraint

# The version range associated with this dependency when a manifest declares a range.
attr_accessor :version_range

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
Expand All @@ -67,10 +82,15 @@ def self.attribute_map
:'language' => :'language',
:'locations' => :'locations',
:'name' => :'name',
:'opaque' => :'opaque',
:'package_manager' => :'package_manager',
:'purl' => :'purl',
:'reachable_symbol_properties' => :'reachable_symbol_properties',
:'version' => :'version'
:'requires_transitive_enrichment' => :'requires_transitive_enrichment',
:'target_frameworks' => :'target_frameworks',
:'version' => :'version',
:'version_constraint' => :'version_constraint',
:'version_range' => :'version_range'
}
end

Expand All @@ -85,13 +105,29 @@ def self.openapi_types
:'language' => :'String',
:'locations' => :'Array<ScaRequestDataAttributesDependenciesItemsLocationsItems>',
:'name' => :'String',
:'opaque' => :'Boolean',
:'package_manager' => :'String',
:'purl' => :'String',
:'reachable_symbol_properties' => :'Array<ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems>',
:'version' => :'String'
:'requires_transitive_enrichment' => :'Boolean',
:'target_frameworks' => :'Array<String>',
:'version' => :'String',
:'version_constraint' => :'Boolean',
:'version_range' => :'String'
}
end

# List of attributes with nullable: true
# @!visibility private
def self.openapi_nullable
Set.new([
:'group',
:'is_direct',
:'locations',
:'version',
])
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
Expand Down Expand Up @@ -142,6 +178,10 @@ def initialize(attributes = {})
self.name = attributes[:'name']
end

if attributes.key?(:'opaque')
self.opaque = attributes[:'opaque']
end

if attributes.key?(:'package_manager')
self.package_manager = attributes[:'package_manager']
end
Expand All @@ -156,9 +196,27 @@ def initialize(attributes = {})
end
end

if attributes.key?(:'requires_transitive_enrichment')
self.requires_transitive_enrichment = attributes[:'requires_transitive_enrichment']
end

if attributes.key?(:'target_frameworks')
if (value = attributes[:'target_frameworks']).is_a?(Array)
self.target_frameworks = value
end
end

if attributes.key?(:'version')
self.version = attributes[:'version']
end

if attributes.key?(:'version_constraint')
self.version_constraint = attributes[:'version_constraint']
end

if attributes.key?(:'version_range')
self.version_range = attributes[:'version_range']
end
end

# Returns the object in the form of hash, with additionalProperties support.
Expand Down Expand Up @@ -194,18 +252,23 @@ def ==(o)
language == o.language &&
locations == o.locations &&
name == o.name &&
opaque == o.opaque &&
package_manager == o.package_manager &&
purl == o.purl &&
reachable_symbol_properties == o.reachable_symbol_properties &&
requires_transitive_enrichment == o.requires_transitive_enrichment &&
target_frameworks == o.target_frameworks &&
version == o.version &&
version_constraint == o.version_constraint &&
version_range == o.version_range &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[exclusions, group, is_dev, is_direct, language, locations, name, package_manager, purl, reachable_symbol_properties, version, additional_properties].hash
[exclusions, group, is_dev, is_direct, language, locations, name, opaque, package_manager, purl, reachable_symbol_properties, requires_transitive_enrichment, target_frameworks, version, version_constraint, version_range, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class ScaRequestDataAttributesDependenciesItemsLocationsItems
# A range within a file defined by a start and end position, along with the file name.
attr_accessor :block

# A range within a file defined by a start and end position, along with the file name.
# A nullable range within a file defined by a start and end position, along with the file name.
attr_accessor :name

# A range within a file defined by a start and end position, along with the file name.
# A nullable range within a file defined by a start and end position, along with the file name.
attr_accessor :namespace

# A range within a file defined by a start and end position, along with the file name.
# A nullable range within a file defined by a start and end position, along with the file name.
attr_accessor :version

attr_accessor :additional_properties
Expand All @@ -51,12 +51,22 @@ def self.attribute_map
def self.openapi_types
{
:'block' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition',
:'name' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition',
:'namespace' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition',
:'version' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition'
:'name' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition',
:'namespace' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition',
:'version' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition'
}
end

# List of attributes with nullable: true
# @!visibility private
def self.openapi_nullable
Set.new([
:'name',
:'namespace',
:'version',
])
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition
# The name or path of the file containing this location.
attr_accessor :file_name

# The semantic role associated with this file location.
attr_accessor :role

# A specific position (line and column) within a source file.
attr_accessor :start

Expand All @@ -38,6 +41,7 @@ def self.attribute_map
{
:'_end' => :'end',
:'file_name' => :'file_name',
:'role' => :'role',
:'start' => :'start'
}
end
Expand All @@ -48,6 +52,7 @@ def self.openapi_types
{
:'_end' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition',
:'file_name' => :'String',
:'role' => :'String',
:'start' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition'
}
end
Expand Down Expand Up @@ -78,6 +83,10 @@ def initialize(attributes = {})
self.file_name = attributes[:'file_name']
end

if attributes.key?(:'role')
self.role = attributes[:'role']
end

if attributes.key?(:'start')
self.start = attributes[:'start']
end
Expand Down Expand Up @@ -111,6 +120,7 @@ def ==(o)
self.class == o.class &&
_end == o._end &&
file_name == o.file_name &&
role == o.role &&
start == o.start &&
additional_properties == o.additional_properties
end
Expand All @@ -119,7 +129,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[_end, file_name, start, additional_properties].hash
[_end, file_name, role, start, additional_properties].hash
end
end
end
Loading
Loading