allow for optional fields in npm metadata

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2020-10-23 15:00:55 -04:00
parent 94ffc2caa8
commit 6eb36bc3c8
2 changed files with 38 additions and 47 deletions
+37 -44
View File
@@ -53,62 +53,55 @@
"type": "integer"
},
"files": {
"anyOf": [
{
"type": "null"
},
{
"items": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"properties": {
"checksum": {
"type": "string"
},
{
"digest": {
"properties": {
"checksum": {
"algorithm": {
"type": "string"
},
"digest": {
"properties": {
"algorithm": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"algorithm",
"value"
],
"type": "object"
},
"ownerGid": {
"type": "string"
},
"ownerUid": {
"type": "string"
},
"path": {
"type": "string"
},
"permissions": {
"type": "string"
},
"size": {
"value": {
"type": "string"
}
},
"required": [
"path"
"algorithm",
"value"
],
"type": "object"
},
"ownerGid": {
"type": "string"
},
"ownerUid": {
"type": "string"
},
"path": {
"type": "string"
},
"permissions": {
"type": "string"
},
"size": {
"type": "string"
}
]
},
"type": "array"
}
]
},
"required": [
"path"
],
"type": "object"
}
]
},
"type": "array"
},
"gitCommitOfApkPort": {
"type": "string"