Use the json schema as input for templating (#2542)

* use the json schema as input for templating

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix cli tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Alex Goodman
2024-01-25 14:00:35 +00:00
committed by GitHub
parent 11c0b1c234
commit a32b8d7fc6
12 changed files with 100 additions and 13 deletions
+1 -3
View File
@@ -72,9 +72,7 @@ func (o EncodersConfig) Encoders() ([]sbom.FormatEncoder, error) {
}
func (o EncodersConfig) templateEncoders() ([]sbom.FormatEncoder, error) {
enc, err := template.NewFormatEncoder(template.EncoderConfig{
TemplatePath: o.Template.TemplatePath,
})
enc, err := template.NewFormatEncoder(o.Template)
return []sbom.FormatEncoder{enc}, err
}