# org.cairnsproto.draft.schema

> A payload schema. Its identity is the sha256 of "cairns/schema/v1", a zero byte, and the DAG-CBOR of defs, so anyone who publishes the same definition publishes the same schema.

- Kind: record
- Record key: tid
- Authority: draft.cairnsproto.org
- Lexicon: 1
- Published by [cairnsproto.org](https://lexicon.garden/identity/did:plc:np7ezqujtsry4bkogisaabul), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.schema)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.schema/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.schema/analytics)

## Record (`org.cairnsproto.draft.schema`)

Type: record · key tid

### Properties

- `createdAt` (string · datetime, required)
- `defs` (unknown, required): Lexicon defs. main must be an object, and every ref must be local, such as #row.
- `description` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `name` (string)
  - Constraints: maxLength: 640, maxGraphemes: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A payload schema. Its identity is the sha256 of \"cairns/schema/v1\", a zero byte, and the DAG-CBOR of defs, so anyone who publishes the same definition publishes the same schema.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "defs": {
            "description": "Lexicon defs. main must be an object, and every ref must be local, such as #row.",
            "type": "unknown"
          },
          "description": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "name": {
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          }
        },
        "required": [
          "defs",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "org.cairnsproto.draft.schema",
  "lexicon": 1
}
```
