-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fossid-webapp): Support two new API functions
This commit adds support for the functions `add_license_identification` and `add_file_comment`. Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
- Loading branch information
1 parent
66fbc5c
commit 12d2bde
Showing
5 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
clients/fossid-webapp/src/test/assets/return-type/mappings/apiphp-add_file_comment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"id" : "39b6448c-7541-4387-9127-88d5e8bbdc9b", | ||
"name" : "apiphp", | ||
"request" : { | ||
"url" : "/api.php", | ||
"method" : "POST", | ||
"bodyPatterns" : [ { | ||
"equalToJson" : "{ \"action\": \"add_file_comment\", \"group\": \"files_and_folders\", \"data\": { \"username\": \"\", \"key\": \"\", \"scan_code\": \"semver4j_20201203_090342\", \"path\": \"c3JjL21haW4vamF2YS9jb20vdmR1cm1vbnQvc2VtdmVyNGovUmFuZ2UuamF2YQ==\", \"comment\": \"TestORT\", \"is_important\": \"0\", \"include_in_report\": \"0\" }}", | ||
"ignoreArrayOrder" : true, | ||
"ignoreExtraElements" : true | ||
} ] | ||
}, | ||
"response" : { | ||
"status" : 200, | ||
"body" : "{ \"operation\": \"files_and_folders_add_file_comment\", \"status\": \"1\", \"data\": { \"operation\": \"files_add_file_comment\", \"status\": \"1\", \"data\": null, \"message\": \"Success\" }, \"message\": \"Success\"}", | ||
"headers" : { | ||
"Content-Type" : "text/html; charset=UTF-8", | ||
"Date" : "Thu, 05 Dec 2021 11:54:04 GMT", | ||
"Server" : "Apache/2.4.38 (Debian)", | ||
"Vary" : "Accept-Encoding" | ||
} | ||
}, | ||
"uuid" : "39b6448c-7541-4387-9127-88d5e8bbdc9b", | ||
"persistent" : true, | ||
"insertionIndex" : 1 | ||
} |
26 changes: 26 additions & 0 deletions
26
...fossid-webapp/src/test/assets/return-type/mappings/apiphp-add_license_identification.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"id" : "7794f1fa-b8b9-4170-9811-9cb276522ee9", | ||
"name" : "apiphp", | ||
"request" : { | ||
"url" : "/api.php", | ||
"method" : "POST", | ||
"bodyPatterns" : [ { | ||
"equalToJson" : "{ \"action\": \"add_license_identification\", \"group\": \"files_and_folders\", \"data\": { \"username\": \"\", \"key\": \"\", \"scan_code\": \"semver4j_20201203_090342\", \"path\": \"c3JjL21haW4vamF2YS9jb20vdmR1cm1vbnQvc2VtdmVyNGovUmFuZ2UuamF2YQ==\", \"license_identifier\": \"Apache-2.0\", \"identification_on\": \"snippet\", \"is_directory\": \"0\" }}", | ||
"ignoreArrayOrder" : true, | ||
"ignoreExtraElements" : true | ||
} ] | ||
}, | ||
"response" : { | ||
"status" : 200, | ||
"body" : "{ \"operation\": \"files_and_folders_add_license_identification\", \"status\": \"1\", \"data\": { \"identification_id\": \"10397697\" }, \"message\": \"Success, the identification with ID: 10397697 was created.\"}", | ||
"headers" : { | ||
"Content-Type" : "text/html; charset=UTF-8", | ||
"Date" : "Thu, 05 Dec 2021 11:54:04 GMT", | ||
"Server" : "Apache/2.4.38 (Debian)", | ||
"Vary" : "Accept-Encoding" | ||
} | ||
}, | ||
"uuid" : "7794f1fa-b8b9-4170-9811-9cb276522ee9", | ||
"persistent" : true, | ||
"insertionIndex" : 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters