Bill of Materials - Prelimary Rails implementation
See https://gitlab.com/gitlab-org/gitlab-ee/issues/10075 for full context.
This issue is to track the Rails implementation that will happen in %11.11 to reduce the weight of the final implementation for https://gitlab.com/gitlab-org/gitlab-ee/issues/10075.
Goals
- Put everything behind a feature flag
- Provide mock data in the format that the we agree on for https://gitlab.com/gitlab-org/gitlab-ee/issues/10075
- Provide the API in a way that can be consumed from the FE implementation: https://gitlab.com/gitlab-org/gitlab-ee/issues/11059
Implementation plan
GET /*namespace_id/:project_id/dependencies.json
Params
sort_by
=[type
, name
(default value)]
sort
=[desc
, asc
(default value)]
Response
so if everything is OK, the endpoint returns a bare array:
[
{
"name": "rails",
"type": "gem",
"location": {
"blob_path": project_path/blob/commit_ref_of_pipeline/file_path#line_start-line_end,
},
"version": "5.2.3",
"requirements": [
"~>5.2.3"
]
},
...
]
if there is an edge case, the endpoint returns
{
"report_status": "file_not_found"||"outdated" (values to be discussed)
}
Edited by Tetiana Chupryna