mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 10:36:45 +01:00
allow for optional fields in npm metadata
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
94ffc2caa8
commit
6eb36bc3c8
@ -53,11 +53,6 @@
|
|||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
@ -107,8 +102,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"gitCommitOfApkPort": {
|
"gitCommitOfApkPort": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|||||||
@ -2,9 +2,7 @@ package pkg
|
|||||||
|
|
||||||
// NpmPackageJSONMetadata holds extra information that is used in pkg.Package
|
// NpmPackageJSONMetadata holds extra information that is used in pkg.Package
|
||||||
type NpmPackageJSONMetadata struct {
|
type NpmPackageJSONMetadata struct {
|
||||||
Name string `mapstructure:"name" json:"name"`
|
Files []string `mapstructure:"files" json:"files,omitempty"`
|
||||||
Version string `mapstructure:"version" json:"version"`
|
|
||||||
Files []string `mapstructure:"files" json:"files"`
|
|
||||||
Author string `mapstructure:"author" json:"author"`
|
Author string `mapstructure:"author" json:"author"`
|
||||||
Licenses []string `mapstructure:"licenses" json:"licenses"`
|
Licenses []string `mapstructure:"licenses" json:"licenses"`
|
||||||
Homepage string `mapstructure:"homepage" json:"homepage"`
|
Homepage string `mapstructure:"homepage" json:"homepage"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user