Skip to content

Commit

Permalink
fix/schema: field RecursiveRef misspelled
Browse files Browse the repository at this point in the history
  • Loading branch information
santhosh-tekuri committed Jun 6, 2024
1 parent 85449f7 commit 87df339
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion objcompiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 87df339

Please sign in to comment.