An experimental TypeSpec syntax for Lexicon
56
fork

Configure Feed

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

feat: add com.atproto.identity.defs lexicon

Port identity.defs with identityInfo:
- did and handle formats
- unknown type with descriptions
- Property-level @doc annotations

Tests passing (18/18)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+37
+15
typelex-emitter/test/scenarios/com-atproto-identity-defs/input/main.tsp
··· 1 + import "@typelex/emitter"; 2 + 3 + namespace com.atproto.identity { 4 + model IdentityInfo { 5 + @lexFormat("did") 6 + did: string; 7 + 8 + @doc("The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document.") 9 + @lexFormat("handle") 10 + handle: string; 11 + 12 + @doc("The complete DID document for the identity.") 13 + didDoc: unknown; 14 + } 15 + }
+22
typelex-emitter/test/scenarios/com-atproto-identity-defs/output/com/atproto/identity/defs.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "com.atproto.identity.defs", 4 + "defs": { 5 + "identityInfo": { 6 + "type": "object", 7 + "required": ["did", "handle", "didDoc"], 8 + "properties": { 9 + "did": { "type": "string", "format": "did" }, 10 + "handle": { 11 + "type": "string", 12 + "format": "handle", 13 + "description": "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document." 14 + }, 15 + "didDoc": { 16 + "type": "unknown", 17 + "description": "The complete DID document for the identity." 18 + } 19 + } 20 + } 21 + } 22 + }