An experimental TypeSpec syntax for Lexicon

oops

+17 -17
+8 -9
packages/emitter/test/spec/basic/output/com/example/profile.json
··· 1 { 2 "lexicon": 1, 3 - "id": "com.example.record", 4 "defs": { 5 "main": { 6 "type": "record", 7 - "description": "A simple record with basic properties", 8 - "key": "tid", 9 "record": { 10 "type": "object", 11 - "required": ["text", "createdAt"], 12 "properties": { 13 - "text": { 14 "type": "string", 15 - "description": "The text content" 16 }, 17 - "createdAt": { 18 "type": "string", 19 - "format": "datetime", 20 - "description": "When the record was created" 21 } 22 } 23 }
··· 1 { 2 "lexicon": 1, 3 + "id": "com.example.profile", 4 "defs": { 5 "main": { 6 "type": "record", 7 + "description": "Record with literal 'self' key", 8 + "key": "literal:self", 9 "record": { 10 "type": "object", 11 + "required": ["displayName"], 12 "properties": { 13 + "displayName": { 14 "type": "string", 15 + "maxGraphemes": 64 16 }, 17 + "description": { 18 "type": "string", 19 + "maxGraphemes": 256 20 } 21 } 22 }
+9 -8
packages/emitter/test/spec/basic/output/com/example/record.json
··· 1 { 2 "lexicon": 1, 3 - "id": "com.example.profile", 4 "defs": { 5 "main": { 6 "type": "record", 7 - "description": "Record with literal 'self' key", 8 - "key": "literal:self", 9 "record": { 10 "type": "object", 11 - "required": ["displayName"], 12 "properties": { 13 - "displayName": { 14 "type": "string", 15 - "maxGraphemes": 64 16 }, 17 - "description": { 18 "type": "string", 19 - "maxGraphemes": 256 20 } 21 } 22 }
··· 1 { 2 "lexicon": 1, 3 + "id": "com.example.record", 4 "defs": { 5 "main": { 6 "type": "record", 7 + "description": "A simple record with basic properties", 8 + "key": "tid", 9 "record": { 10 "type": "object", 11 + "required": ["text", "createdAt"], 12 "properties": { 13 + "text": { 14 "type": "string", 15 + "description": "The text content" 16 }, 17 + "createdAt": { 18 "type": "string", 19 + "format": "datetime", 20 + "description": "When the record was created" 21 } 22 } 23 }