{
  "lexicon": 1,
  "id": "com.atproto.lexicon.resolveLexicon",
  "defs": {
    "main": {
      "type": "query",
      "description": "Resolves an atproto lexicon (NSID) to a schema.",
      "parameters": {
        "type": "params",
        "properties": {
          "nsid": {
            "format": "nsid",
            "type": "string",
            "description": "The lexicon NSID to resolve."
          }
        },
        "required": ["nsid"]
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "The CID of the lexicon schema record."
            },
            "schema": {
              "type": "ref",
              "ref": "com.atproto.lexicon.schema#main",
              "description": "The resolved lexicon schema record."
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "The AT-URI of the lexicon schema record."
            }
          },
          "required": ["uri", "cid", "schema"]
        }
      },
      "errors": [
        {
          "description": "No lexicon was resolved for the NSID.",
          "name": "LexiconNotFound"
        }
      ]
    }
  }
}
