mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
update json schema to v2
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
f8a874a3de
commit
81c956cdbd
@ -6,5 +6,5 @@ const (
|
|||||||
|
|
||||||
// JSONSchemaVersion is the current schema version output by the JSON presenter
|
// JSONSchemaVersion is the current schema version output by the JSON presenter
|
||||||
// This is roughly following the "SchemaVer" guidelines for versioning the JSON schema. Please see schema/json/README.md for details on how to increment.
|
// 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 = "1.1.0"
|
JSONSchemaVersion = "2.0.0"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
"github.com/alecthomas/jsonschema"
|
"github.com/alecthomas/jsonschema"
|
||||||
"github.com/anchore/syft/internal"
|
"github.com/anchore/syft/internal"
|
||||||
"github.com/anchore/syft/internal/presenter/poweruser"
|
syftjsonModel "github.com/anchore/syft/internal/formats/syftjson/model"
|
||||||
"github.com/anchore/syft/syft/pkg"
|
"github.com/anchore/syft/syft/pkg"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ func build() *jsonschema.Schema {
|
|||||||
return strings.TrimPrefix(r.Name(), "JSON")
|
return strings.TrimPrefix(r.Name(), "JSON")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
documentSchema := reflector.ReflectFromType(reflect.TypeOf(&poweruser.JSONDocument{}))
|
documentSchema := reflector.ReflectFromType(reflect.TypeOf(&syftjsonModel.Document{}))
|
||||||
metadataSchema := reflector.ReflectFromType(reflect.TypeOf(&artifactMetadataContainer{}))
|
metadataSchema := reflector.ReflectFromType(reflect.TypeOf(&artifactMetadataContainer{}))
|
||||||
|
|
||||||
// TODO: inject source definitions
|
// TODO: inject source definitions
|
||||||
|
|||||||
1002
schema/json/schema-2.0.0.json
Normal file
1002
schema/json/schema-2.0.0.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user