-
Notifications
You must be signed in to change notification settings - Fork 3
chore(components) Mark some fields as optional #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
|
||
| ## [Unreleased] | ||
|
|
||
| ## [0.31.1] - 2026-03-05 | ||
| ### Fixed | ||
| - Marked as optional information several keys for `ComponentStatus and VersionStatus` | ||
| - Renamed `check_date` to `status_change_date` on `ComponentStatus and VersionStatus` | ||
|
Comment on lines
+10
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# List the repository structure to understand layout
echo "=== Repository structure ==="
git ls-files | head -30
# Find proto, swagger, or API definition files
echo -e "\n=== Searching for contract files ==="
fd -e proto -e swagger.json -e swagger.yaml -e openapi.json -o --type f
# Find CHANGELOG and related files
echo -e "\n=== Changelog and release files ==="
fd -i changelog -o --type f | head -20Repository: scanoss/papi Length of output: 1273 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Search for ComponentStatus and VersionStatus definitions
echo "=== ComponentStatus and VersionStatus in proto files ==="
rg -n 'message (ComponentStatus|VersionStatus)' --type-list | head -5
rg -n 'message (ComponentStatus|VersionStatus)' -A 20
# Search for check_date and status_change_date occurrences
echo -e "\n=== Occurrences of check_date and status_change_date ==="
rg -n 'check_date|status_change_date'
# Look for backward compatibility hints (deprecated, json_name, reserved)
echo -e "\n=== Backward compatibility markers ==="
rg -n 'deprecated|json_name|reserved' -B 2 -A 2 | grep -E '(check_date|status_change_date|ComponentStatus|VersionStatus)' -B 5 -A 5Repository: scanoss/papi Length of output: 519 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Find all .proto source files
echo "=== Proto source files ==="
find . -name "*.proto" -type f
# Check for a proto directory
echo -e "\n=== Directory structure of api/ ==="
ls -la api/ 2>/dev/null | head -20Repository: scanoss/papi Length of output: 1616 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Search for ComponentStatus and VersionStatus in proto compiled files
echo "=== ComponentStatus definition ==="
rg -n 'type ComponentStatus' api/
# Search for check_date and status_change_date
echo -e "\n=== check_date and status_change_date occurrences ==="
rg -n 'check_date\|status_change_date'
# Look at full CHANGELOG to understand link structure
echo -e "\n=== CHANGELOG.md content (check for [0.31.1] reference) ==="
cat CHANGELOG.mdRepository: scanoss/papi Length of output: 427 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Examine the proto source for ComponentStatus and VersionStatus
echo "=== scanoss-components.proto - ComponentStatus and VersionStatus ==="
rg -n 'message ComponentStatus|message VersionStatus' -A 15 ./protobuf/scanoss/api/components/v2/scanoss-components.proto
# Look for any field called check_date or status_change_date in proto
echo -e "\n=== Fields in ComponentStatus/VersionStatus ==="
rg -n 'check_date|status_change_date|reserved|json_name' ./protobuf/scanoss/api/components/v2/scanoss-components.protoRepository: scanoss/papi Length of output: 5267 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Read the CHANGELOG.md to check link references and context
echo "=== Full CHANGELOG.md ==="
cat CHANGELOG.mdRepository: scanoss/papi Length of output: 13344 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Double-check: search in all files including pb.go for check_date
echo "=== Comprehensive search for 'check_date' in entire repository ==="
rg 'check_date' . || echo "No results found for check_date"
# Verify the missing [0.31.1] link at bottom of CHANGELOG
echo -e "\n=== End of CHANGELOG.md (last 20 lines) ==="
tail -20 CHANGELOG.mdRepository: scanoss/papi Length of output: 1594 Add missing The version Additionally, the changelog entry states "Renamed 🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scanoss-qg shoul we add this suggestion? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That text is already there! there was a typo on protobuff |
||
|
|
||
| ## [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 | ||
|
|
@@ -237,7 +242,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
| - Dependencies | ||
| - Vulnerabilities | ||
| - Added REST endpoint support for each service also | ||
|
|
||
| [0.31.1]: https://github.com/scanoss/papi/compare/v0.31.0...v0.31.1 | ||
| [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 | ||
| [0.29.0]: https://github.com/scanoss/papi/compare/v0.28.0...v0.29.0 | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,7 +180,7 @@ message ComponentsStatisticResponse { | |
| message ComponentStatusResponse { | ||
| option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { | ||
| json_schema: { | ||
| example: "{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"check_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\" } }" ; | ||
| example: "{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"status_change_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\" } }" ; | ||
| } | ||
| }; | ||
| // Purl requested | ||
|
|
@@ -195,30 +195,32 @@ message ComponentStatusResponse { | |
| // Specific version name | ||
| string version = 1; | ||
| // Development status of the requested version of this component classified automatically | ||
| string status = 2; | ||
| optional string status = 2; | ||
| // Raw status reported by the registry for this version | ||
| string repository_status = 3[json_name = "repository_status"]; | ||
| optional string repository_status = 3[json_name = "repository_status"]; | ||
| // 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"]; | ||
| optional string indexed_date = 4 [json_name = "indexed_date"]; | ||
| // Date that the status changed or change was detected | ||
| optional 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 string error_message = 6 [json_name = "error_message"]; | ||
| optional common.v2.ErrorCode error_code = 7 [json_name = "error_code"]; | ||
| } | ||
| // Component status details (ignoring version) | ||
| message ComponentStatus { | ||
| // Development status of the requested component classified automatically | ||
| string status = 1; | ||
| optional string status = 1; | ||
| // Raw status reported by the registry for this component | ||
| string repository_status = 2 [json_name = "repository_status"]; | ||
| optional string repository_status = 2 [json_name = "repository_status"]; | ||
| // Date of the first time component was indexed | ||
| string first_indexed_date = 3 [json_name = "first_indexed_date"]; | ||
| optional 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"]; | ||
| optional string last_indexed_date = 4 [json_name = "last_indexed_date"]; | ||
| // Date of the last detected change | ||
| optional string status_change_date = 5 [json_name = "status_change_date"]; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Verify proto declaration
echo "=== Proto declaration ==="
rg -n 'status_change_date|status_change_indexed_date' protobuf/scanoss/api/components/v2/scanoss-components.proto
# Verify generated Go protobuf tags
echo ""
echo "=== Generated Go protobuf tags ==="
rg -n 'StatusChangeDate|status_change_indexed_date|status_change_date' api/componentsv2/scanoss-components.pb.go
# Verify swagger/public schema field names
echo ""
echo "=== Swagger schema ==="
rg -n 'status_change_date|status_change_indexed_date' protobuf/scanoss/api/components/v2/scanoss-components.swagger.jsonRepository: scanoss/papi Length of output: 3093 Fix protobuf tag mismatch in generated Go code for ComponentStatus. At line 793 of 🤖 Prompt for AI Agents |
||
| // 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 | ||
|
|
@@ -233,7 +235,7 @@ message ComponentStatusResponse { | |
| message ComponentsStatusResponse { | ||
| option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { | ||
| json_schema: { | ||
| example: "{\"components\": [{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"check_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\" } } ] }" ; | ||
| example: "{\"components\": [{\"purl\": \"pkg:npm/strive-molu-axios\",\"name\": \"strive-molu-axios\", \"requirement\": \"^0.0.1\", \"version_status\": {\"version\": \"0.0.1-beta.1\", \"status\": \"deleted\", \"indexed_date\": \"2024-06-21\", \"status_change_date\": \"2026-02-01\" }, \"component_status\": { \"status\": \"active\", \"first_indexed_date\": \"2022-03-01\", \"last_indexed_date\": \"2026-02-15\" } } ] }" ; | ||
| } | ||
| }; | ||
| // Component status | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.