Skip to content

Expose requested PURL version in lookup results#1585

Open
AgentGoose32 wants to merge 1 commit intoecosyste-ms:mainfrom
AgentGoose32:polar-512-lookup-purl-version
Open

Expose requested PURL version in lookup results#1585
AgentGoose32 wants to merge 1 commit intoecosyste-ms:mainfrom
AgentGoose32:polar-512-lookup-purl-version

Conversation

@AgentGoose32
Copy link
Copy Markdown

Fixes #512

Summary

  • Preserves the version from a package URL lookup request when the PURL includes one.
  • Adds the requested version field to lookup JSON results only when a version was present in the purl parameter.
  • Keeps versionless PURL lookup responses unchanged.
  • Adds controller coverage for both versioned and versionless lookup responses.

Validation

  • bundle install
  • bundle exec ruby -c app/controllers/api/v1/packages_controller.rb
  • bundle exec ruby -c test/controllers/api/v1/packages_controller_test.rb
  • git diff --check

Note: targeted Rails controller test execution is blocked locally because PostgreSQL is not running on /tmp/.s.PGSQL.5432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lookup by packageurl should include version if passed

1 participant