Skip to main content

Module shape

Module shape 

Source
Expand description

The shape rules a record meets before it is stored: a collection that could name a lexicon, a $type that agrees with it, a body the atproto data model can encode, and the lexicon itself when one is held.

Enums§

ShapeError
Why a record’s shape is refused.
Stance
Which of the specification’s three validation stances to take for one write.

Functions§

schema_is_held
Whether this server holds a lexicon that defines collection’s record.
validate_collection
The first of validate_with’s rules, on its own.
validate_shape
The shape rules under the optimistic stance, which is the one this server takes when a caller says nothing. Authorship is not a property of the bytes, so no rule here is about who may write.
validate_with
Checks a record against the collection it is being written to.