diff --git a/CHANGELOG.md b/CHANGELOG.md index 7000721..62fb2a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +## [0.32.1] - 2026-03-13 +### Fixed +- Renamed `check_date` to `status_change_date` while retrieving lifecycle status for a specific version +- Added `status_change_date` while retrieving lifecycle status for a component +- Removed `optional` modifiers for ComponentStatus + ## [0.32.0] - 2026-03-09 ### Added - Added `error_message` and `error_code` fields to `Dependencies` message in `DependencyResponse` for error handling at the individual dependency level - Updated `DependencyResponse` JSON schema description to reflect error fields inside the dependency block + ## [0.31.0] - 2026-02-24 ### Added - Added gRPC `GetComponentStatus` and REST endpoint GET `/v2/components/status/component` for retrieving lifecycle status of a single component @@ -243,6 +251,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Vulnerabilities - Added REST endpoint support for each service also +[0.32.1]: https://github.com/scanoss/papi/compare/v0.32.0...v0.32.1 [0.32.0]: https://github.com/scanoss/papi/compare/v0.31.0...v0.32.0 [0.31.0]: https://github.com/scanoss/papi/compare/v0.30.0...v0.31.0 [0.30.0]: https://github.com/scanoss/papi/compare/v0.29.0...v0.30.0 diff --git a/api/componentsv2/scanoss-components.pb.go b/api/componentsv2/scanoss-components.pb.go index 38b2667..7674db3 100644 --- a/api/componentsv2/scanoss-components.pb.go +++ b/api/componentsv2/scanoss-components.pb.go @@ -691,7 +691,7 @@ type ComponentStatusResponse_VersionStatus struct { // Date that the component was indexed IndexedDate string `protobuf:"bytes,4,opt,name=indexed_date,proto3" json:"indexed_date,omitempty"` // Date that the status was checked - CheckDate string `protobuf:"bytes,5,opt,name=check_date,proto3" json:"check_date,omitempty"` + StatusChangeDate string `protobuf:"bytes,5,opt,name=status_change_date,proto3" json:"status_change_date,omitempty"` // States if something went wrong while searching for the version of this component version in the DB ErrorMessage *string `protobuf:"bytes,6,opt,name=error_message,proto3,oneof" json:"error_message,omitempty"` ErrorCode *commonv2.ErrorCode `protobuf:"varint,7,opt,name=error_code,proto3,enum=scanoss.api.common.v2.ErrorCode,oneof" json:"error_code,omitempty"` @@ -757,9 +757,9 @@ func (x *ComponentStatusResponse_VersionStatus) GetIndexedDate() string { return "" } -func (x *ComponentStatusResponse_VersionStatus) GetCheckDate() string { +func (x *ComponentStatusResponse_VersionStatus) GetStatusChangeDate() string { if x != nil { - return x.CheckDate + return x.StatusChangeDate } return "" } @@ -789,9 +789,11 @@ type ComponentStatusResponse_ComponentStatus struct { FirstIndexedDate string `protobuf:"bytes,3,opt,name=first_indexed_date,proto3" json:"first_indexed_date,omitempty"` // Date of the last time component was indexed LastIndexedDate string `protobuf:"bytes,4,opt,name=last_indexed_date,proto3" json:"last_indexed_date,omitempty"` + // Date of the last detected change + StatusChangeDate string `protobuf:"bytes,5,opt,name=status_change_date,proto3" json:"status_change_date,omitempty"` // States if something went wrong while searching for the version of this component in the DB - ErrorMessage *string `protobuf:"bytes,5,opt,name=error_message,proto3,oneof" json:"error_message,omitempty"` - ErrorCode *commonv2.ErrorCode `protobuf:"varint,6,opt,name=error_code,proto3,enum=scanoss.api.common.v2.ErrorCode,oneof" json:"error_code,omitempty"` + ErrorMessage *string `protobuf:"bytes,6,opt,name=error_message,proto3,oneof" json:"error_message,omitempty"` + ErrorCode *commonv2.ErrorCode `protobuf:"varint,7,opt,name=error_code,proto3,enum=scanoss.api.common.v2.ErrorCode,oneof" json:"error_code,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -854,6 +856,13 @@ func (x *ComponentStatusResponse_ComponentStatus) GetLastIndexedDate() string { return "" } +func (x *ComponentStatusResponse_ComponentStatus) GetStatusChangeDate() string { + if x != nil { + return x.StatusChangeDate + } + return "" +} + func (x *ComponentStatusResponse_ComponentStatus) GetErrorMessage() string { if x != nil && x.ErrorMessage != nil { return *x.ErrorMessage @@ -1179,36 +1188,35 @@ const file_scanoss_api_components_v2_scanoss_components_proto_rawDesc = "" + "\n" + "statistics\x18\x03 \x01(\v2(.scanoss.api.components.v2.CompStatisticR\n" + "statistics:\xea\x02\x92A\xe6\x02\n" + - "\xe3\x02J\xe0\x02{\"component_statistics\": [{\"purl\": \"pkg:github/scanoss/engine@5.0.0\", \"version\": \"5.0.0\", \"statistics\": {\"total_source_files\": 156, \"total_lines\": 25430, \"total_blank_lines\": 3420, \"languages\": [{\"name\": \"C\", \"files\": 89}, {\"name\": \"C Header\", \"files\": 45}]}}], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Component statistics successfully retrieved\"}}\"\xab\n" + + "\xe3\x02J\xe0\x02{\"component_statistics\": [{\"purl\": \"pkg:github/scanoss/engine@5.0.0\", \"version\": \"5.0.0\", \"statistics\": {\"total_source_files\": 156, \"total_lines\": 25430, \"total_blank_lines\": 3420, \"languages\": [{\"name\": \"C\", \"files\": 89}, {\"name\": \"C Header\", \"files\": 45}]}}], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Component statistics successfully retrieved\"}}\"\xeb\n" + "\n" + "\x17ComponentStatusResponse\x12\x12\n" + "\x04purl\x18\x01 \x01(\tR\x04purl\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + "\vrequirement\x18\x03 \x01(\tR\vrequirement\x12h\n" + "\x0eversion_status\x18\x04 \x01(\v2@.scanoss.api.components.v2.ComponentStatusResponse.VersionStatusR\x0eversion_status\x12n\n" + - "\x10component_status\x18\x05 \x01(\v2B.scanoss.api.components.v2.ComponentStatusResponse.ComponentStatusR\x10component_status\x1a\xc6\x02\n" + + "\x10component_status\x18\x05 \x01(\v2B.scanoss.api.components.v2.ComponentStatusResponse.ComponentStatusR\x10component_status\x1a\xd6\x02\n" + "\rVersionStatus\x12\x18\n" + "\aversion\x18\x01 \x01(\tR\aversion\x12\x16\n" + "\x06status\x18\x02 \x01(\tR\x06status\x12,\n" + "\x11repository_status\x18\x03 \x01(\tR\x11repository_status\x12\"\n" + - "\findexed_date\x18\x04 \x01(\tR\findexed_date\x12\x1e\n" + - "\n" + - "check_date\x18\x05 \x01(\tR\n" + - "check_date\x12)\n" + + "\findexed_date\x18\x04 \x01(\tR\findexed_date\x12.\n" + + "\x12status_change_date\x18\x05 \x01(\tR\x12status_change_date\x12)\n" + "\rerror_message\x18\x06 \x01(\tH\x00R\rerror_message\x88\x01\x01\x12E\n" + "\n" + "error_code\x18\a \x01(\x0e2 .scanoss.api.common.v2.ErrorCodeH\x01R\n" + "error_code\x88\x01\x01B\x10\n" + "\x0e_error_messageB\r\n" + - "\v_error_code\x1a\xc8\x02\n" + + "\v_error_code\x1a\xf8\x02\n" + "\x0fComponentStatus\x12\x16\n" + "\x06status\x18\x01 \x01(\tR\x06status\x12,\n" + "\x11repository_status\x18\x02 \x01(\tR\x11repository_status\x12.\n" + "\x12first_indexed_date\x18\x03 \x01(\tR\x12first_indexed_date\x12,\n" + - "\x11last_indexed_date\x18\x04 \x01(\tR\x11last_indexed_date\x12)\n" + - "\rerror_message\x18\x05 \x01(\tH\x00R\rerror_message\x88\x01\x01\x12E\n" + + "\x11last_indexed_date\x18\x04 \x01(\tR\x11last_indexed_date\x12.\n" + + "\x12status_change_date\x18\x05 \x01(\tR\x12status_change_date\x12)\n" + + "\rerror_message\x18\x06 \x01(\tH\x00R\rerror_message\x88\x01\x01\x12E\n" + "\n" + - "error_code\x18\x06 \x01(\x0e2 .scanoss.api.common.v2.ErrorCodeH\x01R\n" + + "error_code\x18\a \x01(\x0e2 .scanoss.api.common.v2.ErrorCodeH\x01R\n" + "error_code\x88\x01\x01B\x10\n" + "\x0e_error_messageB\r\n" + "\v_error_code:\xd7\x02\x92A\xd3\x02\n" + diff --git a/protobuf/scanoss/api/components/v2/scanoss-components.proto b/protobuf/scanoss/api/components/v2/scanoss-components.proto index 5063560..3654810 100644 --- a/protobuf/scanoss/api/components/v2/scanoss-components.proto +++ b/protobuf/scanoss/api/components/v2/scanoss-components.proto @@ -201,7 +201,7 @@ message ComponentStatusResponse { // Date that the component was indexed string indexed_date = 4 [json_name = "indexed_date"]; // Date that the status was checked - string check_date = 5 [json_name = "check_date"]; + string status_change_date = 5 [json_name = "status_change_date"]; // States if something went wrong while searching for the version of this component version in the DB optional string error_message = 6[json_name = "error_message"]; optional common.v2.ErrorCode error_code = 7 [json_name = "error_code"]; @@ -216,9 +216,11 @@ message ComponentStatusResponse { string first_indexed_date = 3 [json_name = "first_indexed_date"]; // Date of the last time component was indexed string last_indexed_date = 4 [json_name = "last_indexed_date"]; + // Date of the last detected change + string status_change_date = 5 [json_name = "status_change_date"]; // States if something went wrong while searching for the version of this component in the DB - optional string error_message = 5 [json_name = "error_message"]; - optional common.v2.ErrorCode error_code = 6 [json_name = "error_code"]; + optional string error_message = 6 [json_name = "error_message"]; + optional common.v2.ErrorCode error_code = 7 [json_name = "error_code"]; } // Information about the requested version. If no requirement is described, the latest version of the component is responded diff --git a/protobuf/scanoss/api/components/v2/scanoss-components.swagger.json b/protobuf/scanoss/api/components/v2/scanoss-components.swagger.json index 343b8d1..25b9e96 100644 --- a/protobuf/scanoss/api/components/v2/scanoss-components.swagger.json +++ b/protobuf/scanoss/api/components/v2/scanoss-components.swagger.json @@ -372,6 +372,10 @@ "type": "string", "title": "Date of the last time component was indexed" }, + "status_change_date": { + "type": "string", + "title": "Date of the last detected change" + }, "error_message": { "type": "string", "title": "States if something went wrong while searching for the version of this component in the DB" @@ -401,7 +405,7 @@ "type": "string", "title": "Date that the component was indexed" }, - "check_date": { + "status_change_date": { "type": "string", "title": "Date that the status was checked" },