1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Merge pull request #475 from csaf-poc/schema-validation-assert-format

Schema validation: Add AssertFormat flag to schema compiler
This commit is contained in:
JanHoefelmeyer 2023-10-04 07:39:27 +02:00 committed by GitHub
commit 666913e61e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,7 @@ func loadURL(s string) (io.ReadCloser, error) {
func (cs *compiledSchema) compile() {
c := jsonschema.NewCompiler()
c.AssertFormat = true
c.LoadURL = loadURL
cs.compiled, cs.err = c.Compile(cs.url)
}