osv.dev icon indicating copy to clipboard operation
osv.dev copied to clipboard

Case sensitivity of Ecosystem names for API calls

Open hayleycd opened this issue 2 years ago • 3 comments

While I was looking into #1635 I realized that we have not explicitly indicated the formats for the "ecosystem" parameter in the package object. I tried a sample call and got an error when I tried to use "pypi" for the ecosystem. "PyPI" however, did work. "Go" works but "go" doesn't.

I am happy to update documentation to help people choose the correct ecosystem. But should the ecosystem parameter be case sensitive at all?

hayleycd avatar Sep 18 '23 18:09 hayleycd

package names also appear to be case sensitive

hayleycd avatar Sep 18 '23 22:09 hayleycd

This is a potentially related discussion: #1673

It involves versions instead of package names/ecosystems but the question of how strict to be about matching is the same.

hayleycd avatar Sep 28 '23 01:09 hayleycd

Per discussion with @oliverchang, this is behaving as intended

  • We want ecosystem to be case sensitive
  • We want the package and versioning to be sensitive as well because it varies among ecosystems.

I will update docs to reflect case sensitivity

hayleycd avatar Sep 28 '23 23:09 hayleycd