Current Behavior
|
/** |
|
* The optional date when the component was last published. |
|
*/ |
|
@Persistent |
|
@Column(name = "PUBLISHED") |
|
@Schema(type = "integer", format = "int64", requiredMode = Schema.RequiredMode.REQUIRED, description = "UNIX epoch timestamp in milliseconds") |
|
private Date published; |
Comment says it's optional and from a quick search through the code base it appears to indeed be conditionally set, not set at all, etc.
This may cause issues for generated OpenAPI clients which assume that the field is always set.
Steps to Reproduce
An API call to /v1/repository/latest may return data such as:
{
"repositoryType": "NPM",
"name": "buffer",
"latestVersion": "6.0.3",
"lastCheck": 1775555220982
}
in which published is absent.
Expected Behavior
Either published to always have some value (0?) or, for it not be set as required.
Dependency-Track Version
4.13.3
Dependency-Track Distribution
Container Image
Database Server
N/A
Database Server Version
No response
Browser
N/A
Checklist
Current Behavior
dependency-track/src/main/java/org/dependencytrack/model/RepositoryMetaComponent.java
Lines 84 to 90 in 626a0cb
Comment says it's optional and from a quick search through the code base it appears to indeed be conditionally set, not set at all, etc.
This may cause issues for generated OpenAPI clients which assume that the field is always set.
Steps to Reproduce
An API call to
/v1/repository/latestmay return data such as:{ "repositoryType": "NPM", "name": "buffer", "latestVersion": "6.0.3", "lastCheck": 1775555220982 }in which
publishedis absent.Expected Behavior
Either
publishedto always have some value (0?) or, for it not be set as required.Dependency-Track Version
4.13.3
Dependency-Track Distribution
Container Image
Database Server
N/A
Database Server Version
No response
Browser
N/A
Checklist