Lexicon: Difference between revisions

From ATProto Wiki
No edit summary
No edit summary
Line 1: Line 1:
A '''lexicon''' is a [[wikipedia:Database_schema|schema]] definition language used in the [[AT Protocol]] to describe [[record|records]], APIs, and event stream messages. It serves as a framework that enables interoperability between different applications and services within the [[ATmosphere]].
A '''lexicon''' is a [[wikipedia:Database_schema|schema]] definition language used throughout the [[AT Protocol]]. It describes the structure of [[records]], HTTP endpoints ([[XPRC]]), and event stream messages, providing a consistent framework to define and validate data across the protocol that enables interoperability between different applications and services within the [[ATmosphere]].  


Each schema is defined by a [[Namespaced Identifier (NSID)]], which follows a reverse domain-name structure (e.g. <code>app.bsky.feed.post</code>). Lexicons are controlled by their domain authority (derived from the NSID) and can evolve over time to follow compatibility rules.
Lexicons define a comprehensive type system that covers everything from simple primitive values to complex data structures and network operations. Each schema definition is associated with a [[Namespaced Identifier (NSID)]], creating a globally unique reference to that definition. Lexicon schemas are published as records in AT Protocol repositories and can be discovered through DNS-based resolution mechanisms.
 
Lexicon schemas are published as records in AT Protocol repositories and can be discovered through DNS-based resolution mechanisms.

Revision as of 15:14, 13 March 2025

A lexicon is a schema definition language used throughout the AT Protocol. It describes the structure of records, HTTP endpoints (XPRC), and event stream messages, providing a consistent framework to define and validate data across the protocol that enables interoperability between different applications and services within the ATmosphere.

Lexicons define a comprehensive type system that covers everything from simple primitive values to complex data structures and network operations. Each schema definition is associated with a Namespaced Identifier (NSID), creating a globally unique reference to that definition. Lexicon schemas are published as records in AT Protocol repositories and can be discovered through DNS-based resolution mechanisms.