Add a Files tab to the project page

This commit is contained in:
Ian Gulliver
2026-10-22 19:17:08 -07:00
parent 2aba745531
commit d8ce1cee41
12 changed files with 769 additions and 437 deletions
+59
View File
@@ -461,6 +461,65 @@ paths:
schema: { $ref: "#/components/schemas/Todo" }
"404": { $ref: "#/components/responses/Error" }
/api/projects/{projectId}/dir:
parameters:
- { name: projectId, in: path, required: true, schema: { type: string } }
get:
operationId: getProjectDir
description: >
One directory on the server, directories first, then by name. Entries named .git are left out;
gitignored entries inside the project's repository checkout are included and marked.
parameters:
- { name: path, in: query, required: false, schema: { type: string }, description: "Slash-separated, absolute or relative to the project's repository root; empty or absent for the root." }
responses:
"200":
description: The directory's entries.
content:
application/json:
schema: { $ref: "#/components/schemas/DirListing" }
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
/api/projects/{projectId}/file:
parameters:
- { name: projectId, in: path, required: true, schema: { type: string } }
get:
operationId: getProjectFile
description: >
A regular file on the server. Text is returned up to a size limit; binary files return no content.
parameters:
- { name: path, in: query, required: true, schema: { type: string }, description: "Slash-separated, absolute or relative to the project's repository root." }
responses:
"200":
description: The file.
content:
application/json:
schema: { $ref: "#/components/schemas/FileContent" }
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
/api/projects/{projectId}/image:
parameters:
- { name: projectId, in: path, required: true, schema: { type: string } }
get:
operationId: getProjectImage
description: >
An image file on the server. path is absolute or relative to the project's repository root.
PNG, JPEG, GIF, WebP and SVG, chosen by extension.
parameters:
- { name: path, in: query, required: true, schema: { type: string } }
responses:
"200":
description: The file's bytes.
content:
image/png: { schema: { type: string, format: binary } }
image/jpeg: { schema: { type: string, format: binary } }
image/gif: { schema: { type: string, format: binary } }
image/webp: { schema: { type: string, format: binary } }
image/svg+xml: { schema: { type: string, format: binary } }
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
/api/projects/{projectId}/todo/tasks:
parameters:
- { name: projectId, in: path, required: true, schema: { type: string } }