Skip to content

Commit 7444778

Browse files
committed
this one line… causing so many issues.
no index, no problem.
1 parent 1e40e4d commit 7444778

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

schema_validation/validate_schema.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ func (s *schemaValidator) validateSchemaWithVersion(schema *base.Schema, payload
191191

192192
}
193193

194-
jsch, err := helpers.NewCompiledSchemaWithVersion(schema.GoLow().GetIndex().GetSpecAbsolutePath(), jsonSchema, s.options, version)
194+
path := ""
195+
if schema.GoLow().GetIndex() != nil {
196+
path = schema.GoLow().GetIndex().GetSpecAbsolutePath()
197+
}
198+
jsch, err := helpers.NewCompiledSchemaWithVersion(path, jsonSchema, s.options, version)
195199

196200
var schemaValidationErrors []*liberrors.SchemaValidationFailure
197201
if err != nil {

0 commit comments

Comments
 (0)