mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +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:
commit
666913e61e
1 changed files with 1 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ func loadURL(s string) (io.ReadCloser, error) {
|
||||||
|
|
||||||
func (cs *compiledSchema) compile() {
|
func (cs *compiledSchema) compile() {
|
||||||
c := jsonschema.NewCompiler()
|
c := jsonschema.NewCompiler()
|
||||||
|
c.AssertFormat = true
|
||||||
c.LoadURL = loadURL
|
c.LoadURL = loadURL
|
||||||
cs.compiled, cs.err = c.Compile(cs.url)
|
cs.compiled, cs.err = c.Compile(cs.url)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue