Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions types/cargo-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,29 @@
},
"namespace_definition": {
"requirement": "prohibited",
"note": "there is no namespace"
"note": "There is no namespace for Cargo packages."
},
"name_definition": {
"requirement": "required",
"native_name": "name",
"is_case_sensitve": true,
"note": "The name is the repository name."
"case_sensitive": true,
"note": "The name is the package name. It is case-sensitive."
},
"version_definition": {
"requirement": "required",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"requirement": "required",

Why would the version be required for Cargo specifically if it is not required for other, similar package managers?

"native_name": "version",
"note": "The version is the package version."
"note": "The version is the package version. It should follow the Semantic Versioning (SemVer) specification."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it mean for PURL implementations that the version "should" be semver? Either it is semver or it is not semver. I don't know if it matters. This seems like unnecessary information.

},
"qualifiers_definition": [
{
"key": "repository_url",
"requirement": "optional",
"description": "The repository URL of the registry where the package is located, if not the default crates.io."
}
],
"examples": [
"pkg:cargo/[email protected]",
"pkg:cargo/[email protected]",
"pkg:cargo/[email protected]"
]
}
}