mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
chore(deps): bump the go-minor-patch group with 3 updates (#4524)
* chore(deps): bump the go-minor-patch group with 3 updates Bumps the go-minor-patch group with 3 updates: [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml), [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) and [github.com/invopop/jsonschema](https://github.com/invopop/jsonschema). Updates `github.com/BurntSushi/toml` from 1.5.0 to 1.6.0 - [Release notes](https://github.com/BurntSushi/toml/releases) - [Commits](https://github.com/BurntSushi/toml/compare/v1.5.0...v1.6.0) Updates `github.com/go-git/go-git/v5` from 5.16.3 to 5.16.4 - [Release notes](https://github.com/go-git/go-git/releases) - [Commits](https://github.com/go-git/go-git/compare/v5.16.3...v5.16.4) Updates `github.com/invopop/jsonschema` from 0.7.0 to 0.13.0 - [Commits](https://github.com/invopop/jsonschema/compare/v0.7.0...v0.13.0) --- updated-dependencies: - dependency-name: github.com/BurntSushi/toml dependency-version: 1.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-minor-patch - dependency-name: github.com/go-git/go-git/v5 dependency-version: 5.16.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-minor-patch - dependency-name: github.com/invopop/jsonschema dependency-version: 0.13.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> * port breaking jsonschema lib changes Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * regenerate the existing json schema with new generation code Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
co-authored by
Alex Goodman
parent
81dd955871
commit
3ea6a03cd0
@@ -158,20 +158,18 @@ func build() *jsonschema.Schema {
|
||||
// ensure the generated list of names is stable between runs
|
||||
sort.Strings(metadataNames)
|
||||
|
||||
metadataTypes := []map[string]string{
|
||||
metadataTypes := []*jsonschema.Schema{
|
||||
// allow for no metadata to be provided
|
||||
{"type": "null"},
|
||||
{Type: "null"},
|
||||
}
|
||||
for _, name := range metadataNames {
|
||||
metadataTypes = append(metadataTypes, map[string]string{
|
||||
"$ref": fmt.Sprintf("#/$defs/%s", name),
|
||||
metadataTypes = append(metadataTypes, &jsonschema.Schema{
|
||||
Ref: fmt.Sprintf("#/$defs/%s", name),
|
||||
})
|
||||
}
|
||||
|
||||
// set the "anyOf" field for Package.Metadata to be a conjunction of several types
|
||||
documentSchema.Definitions["Package"].Properties.Set("metadata", map[string][]map[string]string{
|
||||
"anyOf": metadataTypes,
|
||||
})
|
||||
documentSchema.Definitions["Package"].Properties.Set("metadata", &jsonschema.Schema{AnyOf: metadataTypes})
|
||||
|
||||
// warn about missing descriptions
|
||||
warnMissingDescriptions(documentSchema, metadataNames)
|
||||
|
||||
Reference in New Issue
Block a user