fix(component) Renamed check date to status_change_date#66
fix(component) Renamed check date to status_change_date#66scanoss-qg wants to merge 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThe changes rename the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable poems in the walkthrough.Disable the |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
protobuf/scanoss/api/components/v2/scanoss-components.proto (2)
181-185:⚠️ Potential issue | 🟡 MinorExample JSON contains stale field name
check_date.The
openapiv2_schemaexample still referencescheck_dateinstead of the renamedstatus_change_date. This will generate misleading API documentation.🔧 Proposed fix
- 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\", \"status_change_date\": \"2026-02-01\" } }" ;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@protobuf/scanoss/api/components/v2/scanoss-components.proto` around lines 181 - 185, Update the OpenAPI example JSON inside the option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) json_schema to use the renamed field "status_change_date" instead of the stale "check_date" value; locate the example string under that option in scanoss-components.proto and replace the "check_date" key within the "version_status" object with "status_change_date" so the generated API docs reflect the current proto field name.
236-240:⚠️ Potential issue | 🟡 MinorExample JSON contains stale field name
check_date.Same issue as above — the
ComponentsStatusResponseexample still usescheck_dateinstead ofstatus_change_date, and is missingstatus_change_datein thecomponent_statusobject.🔧 Proposed fix
- 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\", \"status_change_date\": \"2026-02-01\" } } ] }" ;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@protobuf/scanoss/api/components/v2/scanoss-components.proto` around lines 236 - 240, The example JSON in the openapiv2 schema uses the stale field name "check_date" and omits "status_change_date"; update the example string so any occurrence of "check_date" is replaced with "status_change_date" and ensure the component_status object includes a "status_change_date" property (matching the field used by ComponentsStatusResponse/component_status in the proto), keeping the same date format as the other dates so the example aligns with the actual proto field names.protobuf/scanoss/api/components/v2/scanoss-components.swagger.json (2)
673-690:⚠️ Potential issue | 🟡 MinorExample data contains stale
check_datefield and missingstatus_change_dateincomponent_status.The example at lines 679-689 still references
check_dateinversion_status(line 683) and is missingstatus_change_dateincomponent_status. This creates inconsistency with the schema definitions which correctly usestatus_change_date.The example should be updated to:
- Replace
"check_date": "2026-02-01"with"status_change_date": "2026-02-01"inversion_status- Add
"status_change_date": "..."tocomponent_status🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@protobuf/scanoss/api/components/v2/scanoss-components.swagger.json` around lines 673 - 690, Update the example object in v2ComponentStatusResponse: in the nested version_status replace the stale field "check_date" with "status_change_date" (preserving the date value), and add a "status_change_date" property to component_status with an appropriate date string; ensure the field names exactly match the schema's "status_change_date" for both version_status and component_status so the example aligns with the model.
789-808:⚠️ Potential issue | 🟡 MinorExample data contains stale
check_datefield.Same issue as above — the
v2ComponentsStatusResponseexample at line 799 still usescheck_dateinstead ofstatus_change_date, and thecomponent_statusobject is missing the newstatus_change_datefield.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@protobuf/scanoss/api/components/v2/scanoss-components.swagger.json` around lines 789 - 808, The example for v2ComponentsStatusResponse uses the deprecated field "check_date" and omits the new "status_change_date"; update the example object inside the "example" for v2ComponentsStatusResponse so that in "version_status" you replace "check_date" with "status_change_date" (keeping the same date value) and add a "status_change_date" field to the "component_status" object (with an appropriate example date), ensuring the example matches the schema keys "version_status" and "component_status" and removes any remaining "check_date" occurrences.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@protobuf/scanoss/api/components/v2/scanoss-components.proto`:
- Around line 181-185: Update the OpenAPI example JSON inside the option
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) json_schema to use
the renamed field "status_change_date" instead of the stale "check_date" value;
locate the example string under that option in scanoss-components.proto and
replace the "check_date" key within the "version_status" object with
"status_change_date" so the generated API docs reflect the current proto field
name.
- Around line 236-240: The example JSON in the openapiv2 schema uses the stale
field name "check_date" and omits "status_change_date"; update the example
string so any occurrence of "check_date" is replaced with "status_change_date"
and ensure the component_status object includes a "status_change_date" property
(matching the field used by ComponentsStatusResponse/component_status in the
proto), keeping the same date format as the other dates so the example aligns
with the actual proto field names.
In `@protobuf/scanoss/api/components/v2/scanoss-components.swagger.json`:
- Around line 673-690: Update the example object in v2ComponentStatusResponse:
in the nested version_status replace the stale field "check_date" with
"status_change_date" (preserving the date value), and add a "status_change_date"
property to component_status with an appropriate date string; ensure the field
names exactly match the schema's "status_change_date" for both version_status
and component_status so the example aligns with the model.
- Around line 789-808: The example for v2ComponentsStatusResponse uses the
deprecated field "check_date" and omits the new "status_change_date"; update the
example object inside the "example" for v2ComponentsStatusResponse so that in
"version_status" you replace "check_date" with "status_change_date" (keeping the
same date value) and add a "status_change_date" field to the "component_status"
object (with an appropriate example date), ensuring the example matches the
schema keys "version_status" and "component_status" and removes any remaining
"check_date" occurrences.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 50747e25-ff8c-41ff-9f26-980c8ecf273b
⛔ Files ignored due to path filters (1)
api/componentsv2/scanoss-components.pb.gois excluded by!**/*.pb.go
📒 Files selected for processing (3)
CHANGELOG.mdprotobuf/scanoss/api/components/v2/scanoss-components.protoprotobuf/scanoss/api/components/v2/scanoss-components.swagger.json
Summary by CodeRabbit
Release Notes