this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

atproto/lexicon: Fix "empty full scheme ref" error (#1166)

When you resolve a lexicon with ResolvingCatalog and then try to
validate a record you get the error message ```empty full schema ref```
Moving the call to FinishParse from addSchemaFromBytes to AddSchemaFile
fixes this.

authored by

bnewbold and committed by
GitHub
09f107c1 20524de1

+4 -3
+4 -3
atproto/lexicon/catalog.go
··· 51 51 // Inserts a schema loaded from a JSON file in to the catalog. 52 52 func (c *BaseCatalog) AddSchemaFile(sf SchemaFile) error { 53 53 54 + if err := sf.FinishParse(); err != nil { 55 + return err 56 + } 57 + 54 58 if err := sf.CheckSchema(); err != nil { 55 59 return err 56 60 } ··· 74 78 func (c *BaseCatalog) addSchemaFromBytes(b []byte) error { 75 79 var sf SchemaFile 76 80 if err := json.Unmarshal(b, &sf); err != nil { 77 - return err 78 - } 79 - if err := sf.FinishParse(); err != nil { 80 81 return err 81 82 } 82 83 if err := c.AddSchemaFile(sf); err != nil {