{% extends "base.html" %} {% block main_content %} {% macro fields_table(fields) %} {% if fields %}
| Name | Type | Details |
|---|---|---|
{{ f.Name }} |
{{ f.Type }} {% if f.Required %}(required){% elif f.Nullable %}(nullable){% endif %} |
{% if f.Description %} {{ f.Description }} {% endif %} {% if f.Type == "string" and f.SchemaString %} {% if f.SchemaString.Format %}Syntax Format: Default: Constant Value: Known Values: {% for v in f.SchemaString.KnownValues %} Enum Values: {% for v in f.SchemaString.Enum %} Length in Graphemes: {% if f.SchemaString.MinGraphemes %}{{ f.SchemaString.MinGraphemes }} min{% endif %} {% if f.SchemaString.MaxGraphemes %}{{ f.SchemaString.MaxGraphemes }} max{% endif %} {% endif %} {% if f.SchemaString.MinLength or f.SchemaString.MaxLength %} Length in bytes (when UTF-8 encoded): {% if f.SchemaString.MinLength %}{{ f.SchemaString.MinLength }} min{% endif %} {% if f.SchemaString.MaxLength %}{{ f.SchemaString.MaxLength }} max{% endif %} {% endif %} {% elif f.Type == "boolean" and f.SchemaBoolean %} {% if f.SchemaBoolean.Format %} Format: Default: Constant Value: Default: Minimum: Maxumum: Enum Values: {% for v in f.SchemaInteger.Enum %} Length in bytes (when UTF-8 encoded): {% if f.SchemaBytes.MinLength %}{{ f.SchemaString.MinLength }} min{% endif %} {% if f.SchemaBytes.MaxLength %}{{ f.SchemaString.MaxLength }} max{% endif %} {% endif %} {% elif f.Type == "blob" and f.SchemaBlob %} {% if f.SchemaBlob.Accept %} Accepted Content Types:
{% for t in f.SchemaBlob.Accept %}
Max Size (bytes): Reference: Array Length: {% if f.Min %}{{ f.Min }} min{% endif %} {% if f.Max %}{{ f.Max }} max{% endif %} {% endif %} {% if f.Items.Type == "ref" %} Elements are of type: Elements are integers {# TODO #} {% elif f.Items.Type == "integer" %} Elements are CID Links {% else %} UNHANDLED IN ARRAYS: {{ f.Items.Type }}{% endif %}
{% elif f.Type == "object" %}
UNHANDLED IN FIELDS: {{ f.Type }}{% endif %} |
{% endfor %}
No fields defined {% endif %} {% endmacro %} {% macro record_schema(def) %} {% if def.KeyType %}
Record Key Type: {{ def.KeyType }}{% endif %}
Content Type: {{ def.InputEncoding }}{% endif %}
{% if def.Input %}{{ record_schema(def.Input) }}{% endif %}
{% endif %}
Content Type: {{ def.OutputEncoding }}{% endif %}
{% if def.Output %}{{ record_schema(def.Output) }}{% endif %}
{{ errors_table(def.Errors) }}
{% endmacro %}
{% macro errors_table(errors) %}
| Name | Description |
|---|---|
{{ e.Name }} |
{{ e.Description }} | {% endfor %}
No error types defined {% endif %} {% endmacro %} {% macro union_list(def) %}
{% if def.Closed %}Closed Union:{% else %}Open Union:{% endif %}
{{ o }}
{% endfor %}
Domain Index: {{ lexicon.Domain }}
Crawl History
{% for def in defs %}
{{ def.Description }}{% endif %}
{% if def.Type == "record" %}{{ record_schema(def) }}
{% elif def.Type == "query" or def.Type == "procedure" %}{{ api_schema(def) }}
{% elif def.Type == "subscription" %}
"Tokens" in atproto are simply NSID reference strings.
{% elif def.Type == "unknown" %}
"Unknown" fields may contain arbitrary JSON/CBOR object as data.
{% elif def.Type == "ref" %}
This definition is a pointer to: #{{ def.Name }} - {{ def.Type }}Query Parameters
{{ fields_table(def.Fields) }}
Message Types
{{ union_list(def) }}
{% elif def.Type == "object" %}{{ record_schema(def) }}
{% elif def.Type == "union" %}{{ union_list(def) }}
{% elif def.Type == "token" %}
{{ def.Ref }}
{% else %}UNHANDLED IN DEFS: {{ def.Type }}{% endif %}