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
72 changes: 65 additions & 7 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94280,6 +94280,8 @@ components:
type: array
repository:
$ref: "#/components/schemas/ScaRequestDataAttributesRepository"
scan_start_timestamp:
$ref: "#/components/schemas/ScaRequestDataAttributesScanStartTimestamp"
service:
description: The name of the service or application being analyzed.
type: string
Expand Down Expand Up @@ -94330,24 +94332,26 @@ components:
type: array
group:
description: The group or organization namespace of the dependency (e.g., Maven group ID).
nullable: true
type: string
is_dev:
description: Indicates whether this is a development-only dependency not used in production.
type: boolean
is_direct:
description: Indicates whether this is a direct dependency (as opposed to a transitive one).
nullable: true
type: boolean
language:
description: The programming language ecosystem of this dependency (e.g., java, python, javascript).
type: string
locations:
description: The list of source file locations where this dependency is declared.
items:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems"
type: array
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocations"
name:
description: The name of the dependency package.
type: string
opaque:
description: Indicates whether dependency details are intentionally opaque.
type: boolean
package_manager:
description: The package manager responsible for this dependency (e.g., maven, pip, npm).
type: string
Expand All @@ -94359,21 +94363,43 @@ components:
items:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems"
type: array
requires_transitive_enrichment:
description: Indicates whether this dependency requires transitive dependency enrichment.
type: boolean
target_frameworks:
description: The target framework identifiers associated with this dependency.
items:
description: A target framework identifier.
type: string
type: array
version:
description: The version of the dependency.
nullable: true
type: string
version_constraint:
description: Indicates whether the version value represents a version constraint.
type: boolean
version_range:
description: The version range associated with this dependency when a manifest declares a range.
type: string
type: object
ScaRequestDataAttributesDependenciesItemsLocations:
description: The list of source file locations where this dependency is declared.
items:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems"
nullable: true
type: array
ScaRequestDataAttributesDependenciesItemsLocationsItems:
description: The source code location where a dependency is declared, including block, name, namespace, and version positions within the file.
properties:
block:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"
name:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition"
namespace:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition"
version:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition"
type: object
ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition:
description: A range within a file defined by a start and end position, along with the file name.
Expand All @@ -94383,6 +94409,24 @@ components:
file_name:
description: The name or path of the file containing this location.
type: string
role:
description: The semantic role associated with this file location.
type: string
start:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition"
type: object
ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition:
description: A nullable range within a file defined by a start and end position, along with the file name.
nullable: true
properties:
end:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition"
file_name:
description: The name or path of the file containing this location.
type: string
role:
description: The semantic role associated with this file location.
type: string
start:
$ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition"
type: object
Expand Down Expand Up @@ -94440,6 +94484,20 @@ components:
description: The URL of the repository.
type: string
type: object
ScaRequestDataAttributesScanStartTimestamp:
description: The time when the SCA scan started.
nullable: true
properties:
nanos:
description: Non-negative fractions of a second at nanosecond resolution.
format: int32
maximum: 2147483647
type: integer
seconds:
description: Seconds of UTC time since Unix epoch.
format: int64
type: integer
type: object
ScaRequestDataAttributesVulnerabilitiesItems:
description: A vulnerability entry from the Software Bill of Materials (SBOM), describing a known security issue and the components it affects.
properties:
Expand Down
14 changes: 10 additions & 4 deletions examples/v2/static-analysis/CreateSCAResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItems;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItems;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesFilesItems;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesRelationsItems;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesRepository;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesScanStartTimestamp;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesVulnerabilitiesItems;
import com.datadog.api.client.v2.model.ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems;
import com.datadog.api.client.v2.model.ScaRequestDataType;
Expand All @@ -36,6 +38,8 @@ public static void main(String[] args) {
.dependencies(
Collections.singletonList(
new ScaRequestDataAttributesDependenciesItems()
.group(null)
.isDirect(null)
.locations(
Collections.singletonList(
new ScaRequestDataAttributesDependenciesItemsLocationsItems()
Expand All @@ -46,32 +50,34 @@ public static void main(String[] args) {
.start(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()))
.name(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition()
new ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition()
.end(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())
.start(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()))
.namespace(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition()
new ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition()
.end(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())
.start(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()))
.version(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition()
new ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition()
.end(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())
.start(
new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()))))
.reachableSymbolProperties(
Collections.singletonList(
new ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems()))))
new ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems()))
.version(null)))
.files(
Collections.singletonList(new ScaRequestDataAttributesFilesItems()))
.relations(
Collections.singletonList(
new ScaRequestDataAttributesRelationsItems()))
.repository(new ScaRequestDataAttributesRepository())
.scanStartTimestamp(new ScaRequestDataAttributesScanStartTimestamp())
.vulnerabilities(
Collections.singletonList(
new ScaRequestDataAttributesVulnerabilitiesItems()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/**
* The attributes of an SCA request, containing dependency graph data, vulnerability information,
Expand All @@ -29,6 +30,7 @@
ScaRequestDataAttributes.JSON_PROPERTY_FILES,
ScaRequestDataAttributes.JSON_PROPERTY_RELATIONS,
ScaRequestDataAttributes.JSON_PROPERTY_REPOSITORY,
ScaRequestDataAttributes.JSON_PROPERTY_SCAN_START_TIMESTAMP,
ScaRequestDataAttributes.JSON_PROPERTY_SERVICE,
ScaRequestDataAttributes.JSON_PROPERTY_TAGS,
ScaRequestDataAttributes.JSON_PROPERTY_VULNERABILITIES
Expand All @@ -55,6 +57,10 @@ public class ScaRequestDataAttributes {
public static final String JSON_PROPERTY_REPOSITORY = "repository";
private ScaRequestDataAttributesRepository repository;

public static final String JSON_PROPERTY_SCAN_START_TIMESTAMP = "scan_start_timestamp";
private JsonNullable<ScaRequestDataAttributesScanStartTimestamp> scanStartTimestamp =
JsonNullable.<ScaRequestDataAttributesScanStartTimestamp>undefined();

public static final String JSON_PROPERTY_SERVICE = "service";
private String service;

Expand Down Expand Up @@ -260,6 +266,42 @@ public void setRepository(ScaRequestDataAttributesRepository repository) {
}
}

public ScaRequestDataAttributes scanStartTimestamp(
ScaRequestDataAttributesScanStartTimestamp scanStartTimestamp) {
this.scanStartTimestamp =
JsonNullable.<ScaRequestDataAttributesScanStartTimestamp>of(scanStartTimestamp);
return this;
}

/**
* The time when the SCA scan started.
*
* @return scanStartTimestamp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public ScaRequestDataAttributesScanStartTimestamp getScanStartTimestamp() {
return scanStartTimestamp.orElse(null);
}

@JsonProperty(JSON_PROPERTY_SCAN_START_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<ScaRequestDataAttributesScanStartTimestamp>
getScanStartTimestamp_JsonNullable() {
return scanStartTimestamp;
}

@JsonProperty(JSON_PROPERTY_SCAN_START_TIMESTAMP)
public void setScanStartTimestamp_JsonNullable(
JsonNullable<ScaRequestDataAttributesScanStartTimestamp> scanStartTimestamp) {
this.scanStartTimestamp = scanStartTimestamp;
}

public void setScanStartTimestamp(ScaRequestDataAttributesScanStartTimestamp scanStartTimestamp) {
this.scanStartTimestamp =
JsonNullable.<ScaRequestDataAttributesScanStartTimestamp>of(scanStartTimestamp);
}

public ScaRequestDataAttributes service(String service) {
this.service = service;
return this;
Expand Down Expand Up @@ -415,6 +457,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.files, scaRequestDataAttributes.files)
&& Objects.equals(this.relations, scaRequestDataAttributes.relations)
&& Objects.equals(this.repository, scaRequestDataAttributes.repository)
&& Objects.equals(this.scanStartTimestamp, scaRequestDataAttributes.scanStartTimestamp)
&& Objects.equals(this.service, scaRequestDataAttributes.service)
&& Objects.equals(this.tags, scaRequestDataAttributes.tags)
&& Objects.equals(this.vulnerabilities, scaRequestDataAttributes.vulnerabilities)
Expand All @@ -430,6 +473,7 @@ public int hashCode() {
files,
relations,
repository,
scanStartTimestamp,
service,
tags,
vulnerabilities,
Expand All @@ -446,6 +490,7 @@ public String toString() {
sb.append(" files: ").append(toIndentedString(files)).append("\n");
sb.append(" relations: ").append(toIndentedString(relations)).append("\n");
sb.append(" repository: ").append(toIndentedString(repository)).append("\n");
sb.append(" scanStartTimestamp: ").append(toIndentedString(scanStartTimestamp)).append("\n");
sb.append(" service: ").append(toIndentedString(service)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" vulnerabilities: ").append(toIndentedString(vulnerabilities)).append("\n");
Expand Down
Loading
Loading