diff --git a/CHANGELOG.md b/CHANGELOG.md index facfc7f..829b1fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Added optional `release_date` field (ISO `YYYY-MM-DD` string) to `HFHResponse.Version` in the Scanning v2 service, exposing the per-version release date returned by Folder Hashing scans +- Added optional `url_hash` field (string) to `HFHResponse.Version` in the Scanning v2 service, exposing the per-version URL hash returned by Folder Hashing scans ## [0.42.0] - 2026-04-20 ### Added diff --git a/api/scanningv2/scanoss-scanning.pb.go b/api/scanningv2/scanoss-scanning.pb.go index 442b014..0517adf 100644 --- a/api/scanningv2/scanoss-scanning.pb.go +++ b/api/scanningv2/scanoss-scanning.pb.go @@ -295,7 +295,11 @@ type HFHResponse_Version struct { // Component score (0-1) Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"` // Licenses - Licenses []*HFHResponse_Version_License `protobuf:"bytes,3,rep,name=licenses,proto3" json:"licenses,omitempty"` + Licenses []*HFHResponse_Version_License `protobuf:"bytes,3,rep,name=licenses,proto3" json:"licenses,omitempty"` + // Component version release date. Optional ISO date in YYYY-MM-DD format; may be empty when unknown or not provided by the upstream source. + ReleaseDate string `protobuf:"bytes,4,opt,name=release_date,proto3" json:"release_date,omitempty"` + // Hash of the URL associated with this component version. Optional; may be empty when not provided by the upstream source. + UrlHash string `protobuf:"bytes,5,opt,name=url_hash,proto3" json:"url_hash,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -351,6 +355,20 @@ func (x *HFHResponse_Version) GetLicenses() []*HFHResponse_Version_License { return nil } +func (x *HFHResponse_Version) GetReleaseDate() string { + if x != nil { + return x.ReleaseDate + } + return "" +} + +func (x *HFHResponse_Version) GetUrlHash() string { + if x != nil { + return x.UrlHash + } + return "" +} + // Matched component details type HFHResponse_Component struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -593,14 +611,16 @@ const file_scanoss_api_scanning_v2_scanoss_scanning_proto_rawDesc = "" + "\x0flang_extensions\x18\x06 \x03(\v2@.scanoss.api.scanning.v2.HFHRequest.Children.LangExtensionsEntryR\x0flang_extensions\x1aA\n" + "\x13LangExtensionsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"\xce\x05\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"\x8e\x06\n" + "\vHFHResponse\x12E\n" + "\aresults\x18\x01 \x03(\v2+.scanoss.api.scanning.v2.HFHResponse.ResultR\aresults\x12=\n" + - "\x06status\x18\x02 \x01(\v2%.scanoss.api.common.v2.StatusResponseR\x06status\x1a\x82\x02\n" + + "\x06status\x18\x02 \x01(\v2%.scanoss.api.common.v2.StatusResponseR\x06status\x1a\xc2\x02\n" + "\aVersion\x12\x18\n" + "\aversion\x18\x01 \x01(\tR\aversion\x12\x14\n" + "\x05score\x18\x02 \x01(\x02R\x05score\x12P\n" + - "\blicenses\x18\x03 \x03(\v24.scanoss.api.scanning.v2.HFHResponse.Version.LicenseR\blicenses\x1au\n" + + "\blicenses\x18\x03 \x03(\v24.scanoss.api.scanning.v2.HFHResponse.Version.LicenseR\blicenses\x12\"\n" + + "\frelease_date\x18\x04 \x01(\tR\frelease_date\x12\x1a\n" + + "\burl_hash\x18\x05 \x01(\tR\burl_hash\x1au\n" + "\aLicense\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + "\aspdx_id\x18\x02 \x01(\tR\aspdx_id\x12*\n" + diff --git a/protobuf/scanoss/api/scanning/v2/scanoss-scanning.proto b/protobuf/scanoss/api/scanning/v2/scanoss-scanning.proto index d6cb6dd..b1c878a 100644 --- a/protobuf/scanoss/api/scanning/v2/scanoss-scanning.proto +++ b/protobuf/scanoss/api/scanning/v2/scanoss-scanning.proto @@ -143,6 +143,10 @@ message HFHResponse { float score = 2; // Licenses repeated License licenses = 3; + // Component version release date. Optional ISO date in YYYY-MM-DD format; may be empty when unknown or not provided by the upstream source. + string release_date = 4 [json_name = "release_date"]; + // Hash of the URL associated with this component version. Optional; may be empty when not provided by the upstream source. + string url_hash = 5 [json_name = "url_hash"]; } // Matched component details message Component { diff --git a/protobuf/scanoss/api/scanning/v2/scanoss-scanning.swagger.json b/protobuf/scanoss/api/scanning/v2/scanoss-scanning.swagger.json index f62709c..c05e7d5 100644 --- a/protobuf/scanoss/api/scanning/v2/scanoss-scanning.swagger.json +++ b/protobuf/scanoss/api/scanning/v2/scanoss-scanning.swagger.json @@ -218,6 +218,14 @@ "$ref": "#/definitions/HFHResponseVersionLicense" }, "title": "Licenses" + }, + "release_date": { + "type": "string", + "description": "Component version release date. Optional ISO date in YYYY-MM-DD format; may be empty when unknown or not provided by the upstream source." + }, + "url_hash": { + "type": "string", + "description": "Hash of the URL associated with this component version. Optional; may be empty when not provided by the upstream source." } }, "title": "Component version details"