Field possibly erroneously set as `Schema.RequiredMode.REQUIRED`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in src/main/java/org/dependencytrack/model/RepositoryMetaComponent.java around lines 84-90 and inspect the schema annotation for published, then trace the /v1/repository/latest response behavior. Done means the OpenAPI requiredness matches whether published is actually returned, or the endpoint consistently supplies a value.
Written by the indexing model from the issue text.
Description
Current Behavior
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
- I have read and understand the contributing guidelines
- I have checked the existing issues for whether this defect was already reported
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 817
- Avg merge
- 7h 47m
- Merged PRs (30d)
- 270
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DependencyTrack/dependency-track
-
defect in triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DependencyTrack/dependency-track#6653 ·
-
defect in triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
DependencyTrack/dependency-track#6624 ·
-
missing info in docs Opendefect in triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DependencyTrack/dependency-track#5841 · 2 comments ·
-
defect p2 size/S
Difficulty 3/5 1-2 days Newbie friendliness 72/100
DependencyTrack/dependency-track#7387 · 1 comment ·
-
blocked defect p2 size/M
Difficulty 4/5 3-5 days Newbie friendliness 55/100
DependencyTrack/dependency-track#7314 · 1 comment ·
All issues in DependencyTrack/dependency-track
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100