From 6fd79d6e9031d0f5ab3f2c2733deb54a611ad007 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Mon, 23 Dec 2024 17:53:23 -0800 Subject: [PATCH] remove 'revision' from lexicon package --- atproto/lexicon/catalog.go | 5 ++--- atproto/lexicon/language.go | 1 - atproto/lexicon/lexicon.go | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/atproto/lexicon/catalog.go b/atproto/lexicon/catalog.go index 7797fad93..524ef81a9 100644 --- a/atproto/lexicon/catalog.go +++ b/atproto/lexicon/catalog.go @@ -72,9 +72,8 @@ func (c *BaseCatalog) AddSchemaFile(sf SchemaFile) error { return err } s := Schema{ - ID: name, - Revision: sf.Revision, - Def: def.Inner, + ID: name, + Def: def.Inner, } c.schemas[name] = s } diff --git a/atproto/lexicon/language.go b/atproto/lexicon/language.go index 1eb5bdf0e..b2243076a 100644 --- a/atproto/lexicon/language.go +++ b/atproto/lexicon/language.go @@ -16,7 +16,6 @@ import ( type SchemaFile struct { Lexicon int `json:"lexicon,const=1"` ID string `json:"id"` - Revision *int `json:"revision,omitempty"` Description *string `json:"description,omitempty"` Defs map[string]SchemaDef `json:"defs"` } diff --git a/atproto/lexicon/lexicon.go b/atproto/lexicon/lexicon.go index 840d2ae7a..df0909da8 100644 --- a/atproto/lexicon/lexicon.go +++ b/atproto/lexicon/lexicon.go @@ -22,9 +22,8 @@ var LenientMode ValidateFlags = AllowLegacyBlob | AllowLenientDatetime // Represents a Lexicon schema definition type Schema struct { - ID string - Revision *int - Def any + ID string + Def any } // Checks Lexicon schema (fetched from the catalog) for the given record, with optional flags tweaking default validation rules.