Actions
Issue #3423
closedNo validation or documentation for digest field on file content
Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation
Sprint:
Quarter:
Description
There's no documentation for the digest field in the api schema. Is it md5, sha1, sha256, ...?
Also, I can put anything I want to in this field:
$ cat | http POST :8000/api/v3/content/file/
{
"digest": "hello world",
"path": "foo.tar.gz",
"artifacts": {"foo.tar.gz":"http://localhost:8000/api/v3/artifacts/f05c119f-3ad8-4f96-8dc4-a9264420608e/"}
}
HTTP/1.0 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Length: 265
Content-Type: application/json
Date: Sun, 04 Mar 2018 21:55:46 GMT
Location: http://localhost:8000/api/v3/content/file/bb1e4c8b-d2c4-48f1-8682-cf89e5974b06/
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"_href": "http://localhost:8000/api/v3/content/file/bb1e4c8b-d2c4-48f1-8682-cf89e5974b06/",
"artifacts": {
"foo.tar.gz": "http://localhost:8000/api/v3/artifacts/f05c119f-3ad8-4f96-8dc4-a9264420608e/"
},
"digest": "hello world",
"notes": {},
"path": "foo.tar.gz",
"type": "file"
}
Better yet, maybe not even have the user specify this field on create? This digest info is available on the artifact.
Related issues
Updated by daviddavis over 6 years ago
- Status changed from NEW to CLOSED - DUPLICATE
Updated by daviddavis over 6 years ago
- Is duplicate of Task #3428: Update content unit creation so it takes only a relative_path and artifact href added
Actions