From 87df339550a7b2440ff7da286bd34ece7d74039b Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Tekuri Date: Thu, 6 Jun 2024 23:27:31 +0530 Subject: [PATCH] fix/schema: field RecursiveRef misspelled --- objcompiler.go | 2 +- schema.go | 2 +- validator.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/objcompiler.go b/objcompiler.go index 82ca772..f1494b1 100644 --- a/objcompiler.go +++ b/objcompiler.go @@ -266,7 +266,7 @@ func (c *objCompiler) compileDraft2019(s *Schema) error { var err error if c.hasVocab("core") { - if s.RecusiveRef, err = c.enqueueRef("$recursiveRef"); err != nil { + if s.RecursiveRef, err = c.enqueueRef("$recursiveRef"); err != nil { return err } s.RecursiveAnchor = c.boolean("$recursiveAnchor") diff --git a/schema.go b/schema.go index a8f263e..a970311 100644 --- a/schema.go +++ b/schema.go @@ -24,7 +24,7 @@ type Schema struct { ID string Ref *Schema Anchor string - RecusiveRef *Schema + RecursiveRef *Schema RecursiveAnchor bool DynamicRef *DynamicRef DynamicAnchor string // "" if not specified diff --git a/validator.go b/validator.go index e2a6a22..e2ace37 100644 --- a/validator.go +++ b/validator.go @@ -790,7 +790,7 @@ func (vd *validator) resolveDynamicAnchor(name string, fallback *Schema) *Schema func (vd *validator) validateRefs() { // $recursiveRef -- - if sch := vd.sch.RecusiveRef; sch != nil { + if sch := vd.sch.RecursiveRef; sch != nil { if sch.RecursiveAnchor { sch = vd.resolveRecursiveAnchor(sch) }