Skip to content

Commit c1c2424

Browse files
committed
Add expected JSON files for testing
Signed-off-by: NucleonGodX <racerpro41@gmail.com>
1 parent 3a46d09 commit c1c2424

File tree

9 files changed

+934
-120
lines changed

9 files changed

+934
-120
lines changed

src/packagedcode/buildpack.py

-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def parse(cls, location, package_only=False):
4848
homepage_url = buildpack.get("homepage")
4949
licenses = buildpack.get("licenses", [])
5050
keywords = buildpack.get("keywords", [])
51-
sbom_formats = buildpack.get("sbom-formats", [])
5251

5352
# Parse licenses
5453
license_expressions = []
@@ -109,7 +108,6 @@ def parse(cls, location, package_only=False):
109108
description=description,
110109
homepage_url=homepage_url,
111110
keywords=keywords,
112-
sbom_formats=sbom_formats,
113111
declared_license_expression=" AND ".join(license_expressions) if license_expressions else None,
114112
dependencies=dependencies,
115113
extra_data={"id": buildpack_id}, # Store the id in extra_data

src/packagedcode/models.py

-8
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,6 @@ class PackageData(IdentifiablePackageData):
583583
label='Download URL',
584584
help='A direct download URL.')
585585

586-
sbom_formats = List(
587-
item_type=str,
588-
label='SBOM Formats',
589-
help='A list of supported SBOM formats output by the buildpack. '
590-
'Supported values are the following media types: '
591-
'"application/vnd.cyclonedx+json", "application/spdx+json", and "application/vnd.syft+json".'
592-
)
593-
594586
size = Integer(
595587
default=None,
596588
label='download size',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"packages": [
3+
{
4+
"type": "buildpack",
5+
"namespace": null,
6+
"name": "Paketo Buildpack for .NET Execute",
7+
"version": "unknown",
8+
"qualifiers": {},
9+
"subpath": null,
10+
"primary_language": null,
11+
"description": "A buildpack for running the `dotnet execute` command for an app",
12+
"release_date": null,
13+
"parties": [],
14+
"keywords": [
15+
"dotnet"
16+
],
17+
"homepage_url": "https://github.com/paketo-buildpacks/dotnet-execute",
18+
"download_url": null,
19+
"size": null,
20+
"sha1": null,
21+
"md5": null,
22+
"sha256": null,
23+
"sha512": null,
24+
"bug_tracking_url": null,
25+
"code_view_url": null,
26+
"vcs_url": null,
27+
"copyright": null,
28+
"holder": null,
29+
"declared_license_expression": "Apache-2.0",
30+
"declared_license_expression_spdx": null,
31+
"license_detections": [],
32+
"other_license_expression": null,
33+
"other_license_expression_spdx": null,
34+
"other_license_detections": [],
35+
"extracted_license_statement": null,
36+
"notice_text": null,
37+
"source_packages": [],
38+
"is_private": false,
39+
"is_virtual": false,
40+
"extra_data": {
41+
"id": "paketo-buildpacks/dotnet-execute"
42+
},
43+
"repository_homepage_url": null,
44+
"repository_download_url": null,
45+
"api_data_url": null,
46+
"package_uid": "pkg:buildpack/Paketo%20Buildpack%20for%20.NET%20Execute@unknown?uuid=269fba9a-5182-4434-a4e5-e00840e4c545",
47+
"datafile_paths": [
48+
"buildpack.toml"
49+
],
50+
"datasource_ids": [
51+
"buildpack_toml"
52+
],
53+
"purl": "pkg:buildpack/Paketo%20Buildpack%20for%20.NET%20Execute@unknown"
54+
}
55+
],
56+
"dependencies": [],
57+
"files": [
58+
{
59+
"path": "buildpack.toml",
60+
"type": "file",
61+
"package_data": [
62+
{
63+
"type": "buildpack",
64+
"namespace": null,
65+
"name": "Paketo Buildpack for .NET Execute",
66+
"version": "unknown",
67+
"qualifiers": {},
68+
"subpath": null,
69+
"primary_language": null,
70+
"description": "A buildpack for running the `dotnet execute` command for an app",
71+
"release_date": null,
72+
"parties": [],
73+
"keywords": [
74+
"dotnet"
75+
],
76+
"homepage_url": "https://github.com/paketo-buildpacks/dotnet-execute",
77+
"download_url": null,
78+
"size": null,
79+
"sha1": null,
80+
"md5": null,
81+
"sha256": null,
82+
"sha512": null,
83+
"bug_tracking_url": null,
84+
"code_view_url": null,
85+
"vcs_url": null,
86+
"copyright": null,
87+
"holder": null,
88+
"declared_license_expression": "Apache-2.0",
89+
"declared_license_expression_spdx": null,
90+
"license_detections": [],
91+
"other_license_expression": null,
92+
"other_license_expression_spdx": null,
93+
"other_license_detections": [],
94+
"extracted_license_statement": null,
95+
"notice_text": null,
96+
"source_packages": [],
97+
"file_references": [],
98+
"is_private": false,
99+
"is_virtual": false,
100+
"extra_data": {
101+
"id": "paketo-buildpacks/dotnet-execute"
102+
},
103+
"dependencies": [],
104+
"repository_homepage_url": null,
105+
"repository_download_url": null,
106+
"api_data_url": null,
107+
"datasource_id": "buildpack_toml",
108+
"purl": "pkg:buildpack/Paketo%20Buildpack%20for%20.NET%20Execute@unknown"
109+
}
110+
],
111+
"for_packages": [
112+
"pkg:buildpack/Paketo%20Buildpack%20for%20.NET%20Execute@unknown?uuid=269fba9a-5182-4434-a4e5-e00840e4c545"
113+
],
114+
"scan_errors": []
115+
}
116+
]
117+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
"packages": [
3+
{
4+
"type": "buildpack",
5+
"namespace": null,
6+
"name": "Paketo Buildpack for Git",
7+
"version": "unknown",
8+
"qualifiers": {},
9+
"subpath": null,
10+
"primary_language": null,
11+
"description": null,
12+
"release_date": null,
13+
"parties": [],
14+
"keywords": [],
15+
"homepage_url": "https://github.com/paketo-buildpacks/git",
16+
"download_url": null,
17+
"size": null,
18+
"sha1": null,
19+
"md5": null,
20+
"sha256": null,
21+
"sha512": null,
22+
"bug_tracking_url": null,
23+
"code_view_url": null,
24+
"vcs_url": null,
25+
"copyright": null,
26+
"holder": null,
27+
"declared_license_expression": null,
28+
"declared_license_expression_spdx": null,
29+
"license_detections": [],
30+
"other_license_expression": null,
31+
"other_license_expression_spdx": null,
32+
"other_license_detections": [],
33+
"extracted_license_statement": null,
34+
"notice_text": null,
35+
"source_packages": [],
36+
"is_private": false,
37+
"is_virtual": false,
38+
"extra_data": {
39+
"id": "paketo-buildpacks/git"
40+
},
41+
"repository_homepage_url": null,
42+
"repository_download_url": null,
43+
"api_data_url": null,
44+
"package_uid": "pkg:buildpack/Paketo%20Buildpack%20for%20Git@unknown?uuid=d949b01b-4db7-4fbd-a85b-c23ff707444d",
45+
"datafile_paths": [
46+
"buildpack.toml"
47+
],
48+
"datasource_ids": [
49+
"buildpack_toml"
50+
],
51+
"purl": "pkg:buildpack/Paketo%20Buildpack%20for%20Git@unknown"
52+
}
53+
],
54+
"dependencies": [],
55+
"files": [
56+
{
57+
"path": "buildpack.toml",
58+
"type": "file",
59+
"package_data": [
60+
{
61+
"type": "buildpack",
62+
"namespace": null,
63+
"name": "Paketo Buildpack for Git",
64+
"version": "unknown",
65+
"qualifiers": {},
66+
"subpath": null,
67+
"primary_language": null,
68+
"description": null,
69+
"release_date": null,
70+
"parties": [],
71+
"keywords": [],
72+
"homepage_url": "https://github.com/paketo-buildpacks/git",
73+
"download_url": null,
74+
"size": null,
75+
"sha1": null,
76+
"md5": null,
77+
"sha256": null,
78+
"sha512": null,
79+
"bug_tracking_url": null,
80+
"code_view_url": null,
81+
"vcs_url": null,
82+
"copyright": null,
83+
"holder": null,
84+
"declared_license_expression": null,
85+
"declared_license_expression_spdx": null,
86+
"license_detections": [],
87+
"other_license_expression": null,
88+
"other_license_expression_spdx": null,
89+
"other_license_detections": [],
90+
"extracted_license_statement": null,
91+
"notice_text": null,
92+
"source_packages": [],
93+
"file_references": [],
94+
"is_private": false,
95+
"is_virtual": false,
96+
"extra_data": {
97+
"id": "paketo-buildpacks/git"
98+
},
99+
"dependencies": [],
100+
"repository_homepage_url": null,
101+
"repository_download_url": null,
102+
"api_data_url": null,
103+
"datasource_id": "buildpack_toml",
104+
"purl": "pkg:buildpack/Paketo%20Buildpack%20for%20Git@unknown"
105+
}
106+
],
107+
"for_packages": [
108+
"pkg:buildpack/Paketo%20Buildpack%20for%20Git@unknown?uuid=d949b01b-4db7-4fbd-a85b-c23ff707444d"
109+
],
110+
"scan_errors": []
111+
}
112+
]
113+
}

0 commit comments

Comments
 (0)