bluesky-social / atproto-website

https://atproto.com
Other
231 stars 141 forks source link

specs: clarify what data types can appear in a union (object only, or token/ref allowed) #317

Closed bnewbold closed 2 days ago

bnewbold commented 3 months ago

The specs currently say:

The schema definitions pointed to by a union are generally objects or types with a clear mapping to an object, like a record. All the variants must be represented by a CBOR map (or JSON Object) and include a $type field indicating the variant type.

What about tokens, which are encoded as strings? Those are themselves a type reference, similar to the $type field within a typed object.