spdx / tools-golang

Collection of Go packages to work with SPDX files
Other
121 stars 56 forks source link

feat: normalize external reference category when reading JSON and YAML #203

Closed kzantow closed 1 year ago

kzantow commented 1 year ago

This PR normalizes the referenceCategory for external references when reading JSON and YAML to read the alternate values with underscores, like PERSISTENT_ID and PACKAGE_MANAGER and translate these to the values in the SPDX spec, which instead have dashes: PERSISTENT-ID and PACKAGE-MANAGER, respectively. This allows tools reading and writing SPDX to simply use the spec values with dashes.

Fixes #196

kzantow commented 1 year ago

Closing this in favor of: https://github.com/spdx/tools-golang/pull/204