From 129cf133c4a94d9c8b9b7f208e1de0eb07773a9e Mon Sep 17 00:00:00 2001 From: Bretton May Date: Mon, 3 Nov 2025 22:29:06 -0800 Subject: [PATCH] feat(lexicon): apply atProto best practices to community lexicons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applied atProto best practices from https://github.com/bluesky-social/atproto/discussions/4245 Changes: - getMembers.json: Changed 'enum' to 'knownValues' for sort parameter to allow schema evolution - profile.json: Removed 'visibility' and 'moderationType' from required fields (both have defaults) These changes improve forward compatibility and follow atProto lexicon design guidelines while maintaining full backward compatibility with existing code. Impact: Zero breaking changes - all tests pass, service layer already handles defaults. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../atproto/lexicon/social/coves/community/getMembers.json | 5 +++-- internal/atproto/lexicon/social/coves/community/profile.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/atproto/lexicon/social/coves/community/getMembers.json b/internal/atproto/lexicon/social/coves/community/getMembers.json index cfffa0c..b4d5969 100644 --- a/internal/atproto/lexicon/social/coves/community/getMembers.json +++ b/internal/atproto/lexicon/social/coves/community/getMembers.json @@ -25,8 +25,9 @@ }, "sort": { "type": "string", - "enum": ["reputation", "recent", "alphabetical"], - "default": "reputation" + "knownValues": ["reputation", "recent", "alphabetical"], + "default": "reputation", + "maxLength": 64 } } }, diff --git a/internal/atproto/lexicon/social/coves/community/profile.json b/internal/atproto/lexicon/social/coves/community/profile.json index 1541307..9db1a9a 100644 --- a/internal/atproto/lexicon/social/coves/community/profile.json +++ b/internal/atproto/lexicon/social/coves/community/profile.json @@ -8,7 +8,7 @@ "key": "literal:self", "record": { "type": "object", - "required": ["handle", "name", "createdAt", "createdBy", "hostedBy", "visibility", "moderationType"], + "required": ["handle", "name", "createdAt", "createdBy", "hostedBy"], "properties": { "handle": { "type": "string", -- 2.51.2