Skip to content

Commit bd200e0

Browse files
committed
chore(licenses):SP-4242 rename component_url field to url in ComponentLicenseInfo message
1 parent ebee3cc commit bd200e0

5 files changed

Lines changed: 32 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
## [0.34.1] - 2026-04-07
10+
### Changed
11+
- Renamed `component_url` field to `url` in `ComponentLicenseInfo` message for consistency with other URL fields in the API
912

1013
## [0.34.0] - 2026-04-01
1114
### Added
@@ -262,6 +265,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
262265
- Vulnerabilities
263266
- Added REST endpoint support for each service also
264267

268+
[0.34.1]: https://github.com/scanoss/papi/compare/v0.34.0...v0.34.1
265269
[0.34.0]: https://github.com/scanoss/papi/compare/v0.33.0...v0.34.0
266270
[0.33.0]: https://github.com/scanoss/papi/compare/v0.32.1...v0.33.0
267271
[0.32.1]: https://github.com/scanoss/papi/compare/v0.32.0...v0.32.1

api/licensesv2/scanoss-licenses.pb.go

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protobuf/scanoss/api/licenses/v2/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The response includes these fields:
3131
- `url`: URL to the license text or reference page
3232
- `statement` field: Contains SPDX expression when licensing terms are clearly determinable from source analysis
3333
- `version` field: Shows the specific version that was analyzed
34-
- `component_url` field: URL linking to the component's source or repository page
34+
- `url` field: URL linking to the component's source or repository page
3535
- `requirement` field: Echoes the client's version constraint from the request
3636

3737
### Response Examples
@@ -50,7 +50,7 @@ This allows consumers to understand all licensing obligations present in the com
5050
{
5151
"component": {
5252
"purl": "pkg:github/ffmpeg/ffmpeg@n7.0",
53-
"component_url": "https://github.com/ffmpeg/ffmpeg",
53+
"url": "https://github.com/ffmpeg/ffmpeg",
5454
"requirement": "",
5555
"version": "n7.0",
5656
"statement": "",
@@ -92,7 +92,7 @@ Individual license objects are also provided for detailed analysis.
9292
{
9393
"component": {
9494
"purl": "pkg:maven/ch.qos.logback/logback-classic@1.5.0",
95-
"component_url": "https://github.com/qos-ch/logback",
95+
"url": "https://github.com/qos-ch/logback",
9696
"requirement": "",
9797
"version": "1.5.0",
9898
"statement": "EPL-1.0 OR LGPL-2.1-only",
@@ -121,7 +121,7 @@ This indicates users must comply with both licenses, generating the SPDX express
121121
{
122122
"component": {
123123
"purl": "pkg:github/openssl/openssl@1.1.1n",
124-
"component_url": "https://github.com/openssl/openssl",
124+
"url": "https://github.com/openssl/openssl",
125125
"requirement": "",
126126
"version": "1.1.1n",
127127
"statement": "OpenSSL AND SSLeay",
@@ -145,7 +145,7 @@ When a component cannot be processed, the response includes `error_message` and
145145
{
146146
"component": {
147147
"purl": "pkg:github/scanoss/unknown-component",
148-
"component_url": "",
148+
"url": "",
149149
"requirement": "",
150150
"version": "",
151151
"statement": "",

protobuf/scanoss/api/licenses/v2/scanoss-licenses.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ service License {
128128
message ComponentLicenseResponse {
129129
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
130130
json_schema: {
131-
example: "{\"component\":{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\", \"is_spdx_approved\": true, \"url\": \"https://spdx.org/licenses/GPL-2.0-only.html\"}], \"component_url\": \"https://github.com/scanoss/engine\"}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}";
132-
description: "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"component\\\":{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"component_url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"},\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}";
131+
example: "{\"component\":{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\", \"is_spdx_approved\": true, \"url\": \"https://spdx.org/licenses/GPL-2.0-only.html\"}], \"url\": \"https://github.com/scanoss/engine\"}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}";
132+
description: "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"component\\\":{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"},\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}";
133133
}
134134
};
135135
// License info for the component
@@ -146,8 +146,8 @@ message ComponentLicenseResponse {
146146
message ComponentsLicenseResponse {
147147
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
148148
json_schema: {
149-
example: "{\"components\":[{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\", \"is_spdx_approved\": true, \"url\": \"https://spdx.org/licenses/GPL-2.0-only.html\"}], \"component_url\": \"https://github.com/scanoss/engine\"}, {\"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\",\"requirement\": \"\",\"version\": \"v1.30.0\",\"statement\": \"MIT\", \"licenses\": [{\"id\": \"MIT\",\"full_name\": \"MIT License\", \"is_spdx_approved\": true, \"url\": \"https://spdx.org/licenses/MIT.html\"}], \"component_url\": \"https://github.com/scanoss/scanoss.py\"}], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}";
150-
description: "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"components\\\":[{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"component_url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"}],\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}";
149+
example: "{\"components\":[{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\", \"is_spdx_approved\": true, \"url\": \"https://spdx.org/licenses/GPL-2.0-only.html\"}], \"url\": \"https://github.com/scanoss/engine\"}, {\"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\",\"requirement\": \"\",\"version\": \"v1.30.0\",\"statement\": \"MIT\", \"licenses\": [{\"id\": \"MIT\",\"full_name\": \"MIT License\", \"is_spdx_approved\": true, \"url\": \"https://spdx.org/licenses/MIT.html\"}], \"url\": \"https://github.com/scanoss/scanoss.py\"}], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}";
150+
description: "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"components\\\":[{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"}],\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}";
151151
}
152152
};
153153
// License info for each component in the batch
@@ -384,5 +384,5 @@ message ComponentLicenseInfo {
384384
// Optional error code indicating the type of error encountered
385385
optional common.v2.ErrorCode error_code = 9 [json_name = "error_code"];
386386
// Component URL
387-
string component_url = 10 [json_name = "component_url"];
387+
string url = 10 [json_name = "url"];
388388
}

protobuf/scanoss/api/licenses/v2/scanoss-licenses.swagger.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
"$ref": "#/definitions/v2ErrorCode",
374374
"title": "Optional error code indicating the type of error encountered"
375375
},
376-
"component_url": {
376+
"url": {
377377
"type": "string",
378378
"title": "Component URL"
379379
}
@@ -396,7 +396,7 @@
396396
"url": "https://spdx.org/licenses/GPL-2.0-only.html"
397397
}
398398
],
399-
"component_url": "https://github.com/scanoss/engine"
399+
"url": "https://github.com/scanoss/engine"
400400
},
401401
"status": {
402402
"status": "SUCCESS",
@@ -412,7 +412,7 @@
412412
"$ref": "#/definitions/v2StatusResponse"
413413
}
414414
},
415-
"description": "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"component\\\":{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"component_url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"},\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}"
415+
"description": "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"component\\\":{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"},\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}"
416416
},
417417
"v2ComponentRequest": {
418418
"type": "object",
@@ -451,7 +451,7 @@
451451
"url": "https://spdx.org/licenses/GPL-2.0-only.html"
452452
}
453453
],
454-
"component_url": "https://github.com/scanoss/engine"
454+
"url": "https://github.com/scanoss/engine"
455455
},
456456
{
457457
"purl": "pkg:github/scanoss/scanoss.py@v1.30.0",
@@ -466,7 +466,7 @@
466466
"url": "https://spdx.org/licenses/MIT.html"
467467
}
468468
],
469-
"component_url": "https://github.com/scanoss/scanoss.py"
469+
"url": "https://github.com/scanoss/scanoss.py"
470470
}
471471
],
472472
"status": {
@@ -487,7 +487,7 @@
487487
"$ref": "#/definitions/v2StatusResponse"
488488
}
489489
},
490-
"description": "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"components\\\":[{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"component_url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"}],\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}"
490+
"description": "Success example. For error cases, the component block includes error_message and error_code fields, e.g.: {\\\"components\\\":[{\\\"purl\\\":\\\"pkg:github/scanoss/unknown-component\\\",\\\"requirement\\\":\\\"\\\",\\\"version\\\":\\\"\\\",\\\"statement\\\":\\\"\\\",\\\"licenses\\\":[],\\\"url\\\":\\\"\\\",\\\"error_message\\\":\\\"Component version not found\\\",\\\"error_code\\\":\\\"VERSION_NOT_FOUND\\\"}],\\\"status\\\":{\\\"status\\\":\\\"SUCCESS\\\",\\\"message\\\":\\\"Success\\\"}}"
491491
},
492492
"v2ComponentsRequest": {
493493
"type": "object",

0 commit comments

Comments
 (0)