{
"lexicon": 1,
"id": "sh.tangled.git.temp.listLanguages",
"defs": {
"main": {
"type": "query",
"parameters": {
"type": "params",
"required": ["repo"],
"properties": {
"repo": {
"type": "string",
"format": "did",
"description": "DID of the repository"
},
"ref": {
"type": "string",
"description": "Git reference (branch, tag, or commit SHA)",
"default": "HEAD"
},
"indexedOnly": {
"type": "boolean",
"description": "Only serve stored languages, failing with NotIndexed rather than analyzing the commit on demand",
"default": false
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["ref", "languages", "total"],
"properties": {
"ref": {
"type": "string",
"description": "The git reference used"
},
"languages": {
"type": "array",
"items": {
"type": "ref",
"ref": "#language"
}
},
"total": {
"type": "integer",
"description": "Total size of all analyzed files in bytes"
}
}
}
},
"errors": [
{
"name": "RepoNotFound",
"description": "Repository not found or access denied"
},
{
"name": "RefNotFound",
"description": "Git reference not found"
},
{
"name": "NotIndexed",
"description": "No stored languages for this commit yet, only with indexedOnly"
},
{
"name": "InvalidRequest",
"description": "Invalid request parameters"
}
]
},
"language": {
"type": "object",
"required": ["name", "size"],
"properties": {
"name": {
"type": "string",
"description": "Programming language name"
},
"size": {
"type": "integer",
"description": "Total size of files in this language (bytes)"
}
}
}
}
}