Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/types/cocoapods-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:cocoapods/[email protected]#NSData+zlib",
"expected_output": "pkg:cocoapods/[email protected]#NSData+zlib",
"input": "pkg:cocoapods/[email protected]#NSData%2Bzlib",
"expected_output": "pkg:cocoapods/[email protected]#NSData%2Bzlib",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -161,7 +161,7 @@
"qualifiers": null,
"subpath": "NSData+zlib"
},
"expected_output": "pkg:cocoapods/[email protected]#NSData+zlib",
"expected_output": "pkg:cocoapods/[email protected]#NSData%2Bzlib",
"expected_failure": false,
"expected_failure_reason": null
}
Expand Down
32 changes: 16 additions & 16 deletions tests/types/oci-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Parse test for <class 'type'> PURL",
"test_group": "base",
"test_type": "parse",
"input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
"input": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
"expected_output": {
"type": "oci",
"namespace": null,
Expand All @@ -25,8 +25,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
"expected_output": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
"input": "pkg:oci/debian@sha256:244fd47e07d10?arch=amd64&repository_url=docker.io/library/debian&tag=latest",
"expected_output": "pkg:oci/debian@sha256:244fd47e07d10?arch=amd64&repository_url=docker.io/library/debian&tag=latest",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -46,15 +46,15 @@
},
"subpath": null
},
"expected_output": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
"expected_output": "pkg:oci/debian@sha256:244fd47e07d10?arch=amd64&repository_url=docker.io/library/debian&tag=latest",
"expected_failure": false,
"expected_failure_reason": null
},
{
"description": "Parse test for <class 'type'> PURL",
"test_group": "base",
"test_type": "parse",
"input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"input": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"expected_output": {
"type": "oci",
"namespace": null,
Expand All @@ -73,8 +73,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"expected_output": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"input": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"expected_output": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -93,15 +93,15 @@
},
"subpath": null
},
"expected_output": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"expected_output": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
"expected_failure": false,
"expected_failure_reason": null
},
{
"description": "Parse test for <class 'type'> PURL",
"test_group": "base",
"test_type": "parse",
"input": "pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"input": "pkg:oci/static@sha256:244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"expected_output": {
"type": "oci",
"namespace": null,
Expand All @@ -120,8 +120,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"expected_output": "pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"input": "pkg:oci/static@sha256:244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"expected_output": "pkg:oci/static@sha256:244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -140,15 +140,15 @@
},
"subpath": null
},
"expected_output": "pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"expected_output": "pkg:oci/static@sha256:244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
"expected_failure": false,
"expected_failure_reason": null
},
{
"description": "Parse test for <class 'type'> PURL",
"test_group": "base",
"test_type": "parse",
"input": "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
"input": "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
"expected_output": {
"type": "oci",
"namespace": null,
Expand All @@ -166,8 +166,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
"expected_output": "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
"input": "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
"expected_output": "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -185,7 +185,7 @@
},
"subpath": null
},
"expected_output": "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
"expected_output": "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
"expected_failure": false,
"expected_failure_reason": null
}
Expand Down
28 changes: 14 additions & 14 deletions tests/types/swid-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"description": "Parse test for <class 'type'> PURL",
"test_group": "base",
"test_type": "parse",
"input": "pkg:swid/Acme/example.com/Enterprise+Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"input": "pkg:swid/Acme/example.com/Enterprise%20Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"expected_output": {
"type": "swid",
"namespace": "Acme/example.com",
"name": "Enterprise+Server",
"name": "Enterprise Server",
"version": "1.0.0",
"qualifiers": {
"tag_id": "75b8c285-fa7b-485b-b199-4745e3004d0d"
Expand All @@ -23,8 +23,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:swid/Acme/example.com/Enterprise+Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"expected_output": "pkg:swid/Acme/example.com/Enterprise+Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"input": "pkg:swid/Acme/example.com/Enterprise%20Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"expected_output": "pkg:swid/Acme/example.com/Enterprise%20Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -35,14 +35,14 @@
"input": {
"type": "swid",
"namespace": "Acme/example.com",
"name": "Enterprise+Server",
"name": "Enterprise Server",
"version": "1.0.0",
"qualifiers": {
"tag_id": "75b8c285-fa7b-485b-b199-4745e3004d0d"
},
"subpath": null
},
"expected_output": "pkg:swid/Acme/example.com/Enterprise+Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"expected_output": "pkg:swid/Acme/example.com/Enterprise%20Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"expected_failure": false,
"expected_failure_reason": null
},
Expand Down Expand Up @@ -95,11 +95,11 @@
"description": "Parse test for <class 'type'> PURL",
"test_group": "base",
"test_type": "parse",
"input": "pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"input": "pkg:swid/Adobe%20Systems%20Incorporated/Adobe%20InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"expected_output": {
"type": "swid",
"namespace": "Adobe+Systems+Incorporated",
"name": "Adobe+InDesign",
"namespace": "Adobe Systems Incorporated",
"name": "Adobe InDesign",
"version": "CC",
"qualifiers": {
"tag_id": "CreativeCloud-CS6-Win-GM-MUL"
Expand All @@ -113,8 +113,8 @@
"description": "Rountrip test for <class 'type'> PURL",
"test_group": "base",
"test_type": "roundtrip",
"input": "pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"expected_output": "pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"input": "pkg:swid/Adobe%20Systems%20Incorporated/Adobe%20InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"expected_output": "pkg:swid/Adobe%20Systems%20Incorporated/Adobe%20InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"expected_failure": false,
"expected_failure_reason": null
},
Expand All @@ -124,15 +124,15 @@
"test_type": "build",
"input": {
"type": "swid",
"namespace": "Adobe+Systems+Incorporated",
"name": "Adobe+InDesign",
"namespace": "Adobe Systems Incorporated",
"name": "Adobe InDesign",
"version": "CC",
"qualifiers": {
"tag_id": "CreativeCloud-CS6-Win-GM-MUL"
},
"subpath": null
},
"expected_output": "pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"expected_output": "pkg:swid/Adobe%20Systems%20Incorporated/Adobe%20InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL",
"expected_failure": false,
"expected_failure_reason": null
}
Expand Down
4 changes: 2 additions & 2 deletions types-doc/swid-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ The structure of a PURL for this package type is:

## Examples

- `pkg:swid/Acme/example.com/Enterprise+Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d`
- `pkg:swid/Acme/example.com/Enterprise%20Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d`
- `pkg:swid/Fedora@29?tag_id=org.fedoraproject.Fedora-29`
- `pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL`
- `pkg:swid/Adobe%20Systems%20Incorporated/Adobe%20InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL`

## Note

Expand Down
4 changes: 2 additions & 2 deletions types/swid-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
],
"note": "Use of known qualifiers key/value pairs such as download_url can be used to specify where the package was retrieved from.",
"examples": [
"pkg:swid/Acme/example.com/Enterprise+Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"pkg:swid/Acme/example.com/Enterprise%20Server@1.0.0?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d",
"pkg:swid/Fedora@29?tag_id=org.fedoraproject.Fedora-29",
"pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL"
"pkg:swid/Adobe%20Systems%20Incorporated/Adobe%20InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL"
]
}