Add a Files tab to the project page
This commit is contained in:
@@ -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 } }
|
||||
|
||||
Reference in New Issue
Block a user