-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Unrecognized field "parentUuid" in Project #2439
Comments
p.s. |
The The treegrid plugin, which is used for the hierarchical project view, needs an I guess the best solution would be to somehow ignore this field during de-serialization, so that the project list in the frontend still displays the relationships correctly. |
This is a pure frontend problem which should (and can) be solved there without changing the API. Instead, however, the model in the API was changed in a way that the API itself can't handle! So, instead of this project.pid = MurmurHash2(project.parentUuid).result() Why not just this? project.pid = MurmurHash2(project.parent?.uuid).result() |
Well, for some reason I didn't think about such a simple solution 😅. Thanks for noticing, if you want I can create a PR for this fix tomorrow. |
Please do so, because I won't have time to do so in the next few days. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Current Behavior
The JSON representation of a project contains the field "parentUuid" which is not consumable by other operations that consume a project.
dependency-track/src/main/java/org/dependencytrack/model/Project.java
Lines 262 to 265 in 5e67e12
If you send a request with that field to
/api/v1/project
, you will get the following response with code 400 (bad request).Steps to Reproduce
GET /api/v1/project/<uuid of b>
/api/v1/project
Expected Behavior
The "parentUuid" field should not be part of the project model. It is not needed at all because it has the same value as "uuid" of the "parent" field. Either remove it completely or at least mark it as ignorable.
Dependency-Track Version
4.7.1
Dependency-Track Distribution
Container Image
Database Server
PostgreSQL
Database Server Version
No response
Browser
N/A
Checklist
The text was updated successfully, but these errors were encountered: