package-url / package-url/packageurl-java

Separation of validation and normalization logic

Open
#187 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
48
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Right now, the various validation methods might actually normalize the components on input, too.

Should the various component methods, e.g., getName(), getVersion(), etc., return the valid but not normalized component?

It seemed to be intended that normalization only occur before returning a string (toString())?

Add a separate public PackageURL::normalize (PackageURL::canonicalize returns a String)?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the component methods such as getName() and getVersion(), along with toString() and canonicalize(). Determine whether validation should preserve unnormalized components and how a separate public normalize operation should relate to canonicalize; done means the intended API and normalization semantics are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.