Omit H1Digest when empty (#902)

* Omit HD1Field when empty

Signed-off-by: Jonas Galvão Xavier <jonas.agx@gmail.com>

* update test-fixtures

Signed-off-by: Jonas Galvão Xavier <jonas.agx@gmail.com>
This commit is contained in:
Jonas Xavier 2022-03-21 11:59:10 -07:00 committed by GitHub
parent 03e193e577
commit 283db88dc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1244 additions and 8 deletions

View file

@ -6,5 +6,5 @@ const (
// JSONSchemaVersion is the current schema version output by the JSON encoder
// This is roughly following the "SchemaVer" guidelines for versioning the JSON schema. Please see schema/json/README.md for details on how to increment.
JSONSchemaVersion = "3.1.1"
JSONSchemaVersion = "3.2.1"
)

View file

@ -88,7 +88,7 @@
}
},
"schema": {
"version": "3.1.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.1.1.json"
"version": "3.2.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.1.json"
}
}

View file

@ -184,7 +184,7 @@
}
},
"schema": {
"version": "3.1.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.1.1.json"
"version": "3.2.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.1.json"
}
}

View file

@ -111,7 +111,7 @@
}
},
"schema": {
"version": "3.1.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.1.1.json"
"version": "3.2.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.1.json"
}
}

File diff suppressed because it is too large Load diff

View file

@ -5,5 +5,5 @@ type GolangBinMetadata struct {
BuildSettings map[string]string `json:"goBuildSettings,omitempty" cyclonedx:"goBuildSettings"`
GoCompiledVersion string `json:"goCompiledVersion" cyclonedx:"goCompiledVersion"`
Architecture string `json:"architecture" cyclonedx:"architecture"`
H1Digest string `json:"h1Digest" cyclonedx:"h1Digest"`
H1Digest string `json:"h1Digest,omitempty" cyclonedx:"h1Digest"`
}