Monorepo for Tangled tangled.org
at master 4.5 kB view raw
1{ 2 "lexicon": 1, 3 "id": "sh.tangled.repo.blob", 4 "defs": { 5 "main": { 6 "type": "query", 7 "parameters": { 8 "type": "params", 9 "required": [ 10 "repo", 11 "ref", 12 "path" 13 ], 14 "properties": { 15 "repo": { 16 "type": "string", 17 "description": "Repository identifier in format 'did:plc:.../repoName'" 18 }, 19 "ref": { 20 "type": "string", 21 "description": "Git reference (branch, tag, or commit SHA)" 22 }, 23 "path": { 24 "type": "string", 25 "description": "Path to the file within the repository" 26 }, 27 "raw": { 28 "type": "boolean", 29 "description": "Return raw file content instead of JSON response", 30 "default": false 31 } 32 } 33 }, 34 "output": { 35 "encoding": "application/json", 36 "schema": { 37 "type": "object", 38 "required": [ 39 "ref", 40 "path" 41 ], 42 "properties": { 43 "ref": { 44 "type": "string", 45 "description": "The git reference used" 46 }, 47 "path": { 48 "type": "string", 49 "description": "The file path" 50 }, 51 "content": { 52 "type": "string", 53 "description": "File content (base64 encoded for binary files)" 54 }, 55 "encoding": { 56 "type": "string", 57 "description": "Content encoding", 58 "enum": [ 59 "utf-8", 60 "base64" 61 ] 62 }, 63 "size": { 64 "type": "integer", 65 "description": "File size in bytes" 66 }, 67 "isBinary": { 68 "type": "boolean", 69 "description": "Whether the file is binary" 70 }, 71 "mimeType": { 72 "type": "string", 73 "description": "MIME type of the file" 74 }, 75 "submodule": { 76 "type": "ref", 77 "ref": "#submodule", 78 "description": "Submodule information if path is a submodule" 79 }, 80 "lastCommit": { 81 "type": "ref", 82 "ref": "#lastCommit" 83 } 84 } 85 } 86 }, 87 "errors": [ 88 { 89 "name": "RepoNotFound", 90 "description": "Repository not found or access denied" 91 }, 92 { 93 "name": "RefNotFound", 94 "description": "Git reference not found" 95 }, 96 { 97 "name": "FileNotFound", 98 "description": "File not found at the specified path" 99 }, 100 { 101 "name": "InvalidRequest", 102 "description": "Invalid request parameters" 103 } 104 ] 105 }, 106 "lastCommit": { 107 "type": "object", 108 "required": [ 109 "hash", 110 "message", 111 "when" 112 ], 113 "properties": { 114 "hash": { 115 "type": "string", 116 "description": "Commit hash" 117 }, 118 "shortHash": { 119 "type": "string", 120 "description": "Short commit hash" 121 }, 122 "message": { 123 "type": "string", 124 "description": "Commit message" 125 }, 126 "author": { 127 "type": "ref", 128 "ref": "#signature" 129 }, 130 "when": { 131 "type": "string", 132 "format": "datetime", 133 "description": "Commit timestamp" 134 } 135 } 136 }, 137 "signature": { 138 "type": "object", 139 "required": [ 140 "name", 141 "email", 142 "when" 143 ], 144 "properties": { 145 "name": { 146 "type": "string", 147 "description": "Author name" 148 }, 149 "email": { 150 "type": "string", 151 "description": "Author email" 152 }, 153 "when": { 154 "type": "string", 155 "format": "datetime", 156 "description": "Author timestamp" 157 } 158 } 159 }, 160 "submodule": { 161 "type": "object", 162 "required": [ 163 "name", 164 "url" 165 ], 166 "properties": { 167 "name": { 168 "type": "string", 169 "description": "Submodule name" 170 }, 171 "url": { 172 "type": "string", 173 "description": "Submodule repository URL" 174 }, 175 "branch": { 176 "type": "string", 177 "description": "Branch to track in the submodule" 178 } 179 } 180 } 181 } 182}