summaryrefslogtreecommitdiff
path: root/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go')
-rw-r--r--vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go b/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go
index 95e0568ab..20db0c1f9 100644
--- a/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go
+++ b/vendor/github.com/xeipuuv/gojsonschema/schemaLoader.go
@@ -21,6 +21,7 @@ import (
"github.com/xeipuuv/gojsonreference"
)
+// SchemaLoader is used to load schemas
type SchemaLoader struct {
pool *schemaPool
AutoDetect bool
@@ -28,6 +29,7 @@ type SchemaLoader struct {
Draft Draft
}
+// NewSchemaLoader creates a new NewSchemaLoader
func NewSchemaLoader() *SchemaLoader {
ps := &SchemaLoader{
@@ -141,6 +143,7 @@ func (sl *SchemaLoader) AddSchema(url string, loader JSONLoader) error {
return sl.pool.parseReferences(doc, ref, true)
}
+// Compile loads and compiles a schema
func (sl *SchemaLoader) Compile(rootSchema JSONLoader) (*Schema, error) {
ref, err := rootSchema.JsonReference()