Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions apis/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,87 @@ info:
version: 1.0.0
basePath: /api/v1
paths:
/artifacts/buckets:
get:
summary: List buckets
description: Retrieve a list of all available buckets.
responses:
'200':
description: A list of buckets.
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
Comment on lines +13 to +28

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content type should be specified in the responses section. For OpenAPI 3.0, use 'content' under responses, but this appears to be using OpenAPI 2.0 format based on the basePath. Consider using 'produces' at the operation level or switching to OpenAPI 3.0 format consistently.

Suggested change
responses:
'200':
description: A list of buckets.
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
produces:
- application/json
responses:
'200':
description: A list of buckets.
schema:
type: array
items:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.

Copilot uses AI. Check for mistakes.
/artifacts/buckets/{bucket_id}:
get:
summary: Get bucket details
description: Retrieve details of a specific bucket.
parameters:
- name: bucket_id
in: path
required: true
description: The ID of the bucket to retrieve.
schema:
type: string
responses:
'200':
description: Details of the bucket.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
created_at:
type: string
format: date-time
description: The creation timestamp of the bucket.
/artifacts/files:
post:
summary: Upload a file
description: Upload a new file to a bucket.
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required fields specification. The schema should indicate which properties are required, particularly 'bucket_id' and 'file' for the upload operation.

Suggested change
type: object
type: object
required:
- bucket_id
- file

Copilot uses AI. Check for mistakes.
properties:
bucket_id:
type: string
description: The ID of the bucket to upload the file to.
file:
type: string
format: binary
description: The file to upload.
responses:
'201':

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing error response documentation. File upload operations should include error responses for common scenarios like invalid bucket_id (404), file too large (413), or server errors (500).

Copilot uses AI. Check for mistakes.
description: File uploaded successfully.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the uploaded file.
name:
type: string
description: The name of the uploaded file.
Comment on lines +43 to +89

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above - mixing OpenAPI 2.0 and 3.0 syntax. The 'content' keyword is from OpenAPI 3.0 but the document uses 'basePath' which is OpenAPI 2.0.

Suggested change
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
created_at:
type: string
format: date-time
description: The creation timestamp of the bucket.
/artifacts/files:
post:
summary: Upload a file
description: Upload a new file to a bucket.
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
bucket_id:
type: string
description: The ID of the bucket to upload the file to.
file:
type: string
format: binary
description: The file to upload.
responses:
'201':
description: File uploaded successfully.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the uploaded file.
name:
type: string
description: The name of the uploaded file.
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
created_at:
type: string
format: date-time
description: The creation timestamp of the bucket.
/artifacts/files:
post:
summary: Upload a file
description: Upload a new file to a bucket.
consumes:
- multipart/form-data
parameters:
- name: bucket_id
in: formData
required: true
type: string
description: The ID of the bucket to upload the file to.
- name: file
in: formData
required: true
type: file
description: The file to upload.
responses:
'201':
description: File uploaded successfully.
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the uploaded file.
name:
type: string
description: The name of the uploaded file.

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +89

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent OpenAPI version usage - 'content' is OpenAPI 3.0 syntax while the document appears to follow OpenAPI 2.0 format based on 'basePath' usage.

Suggested change
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
created_at:
type: string
format: date-time
description: The creation timestamp of the bucket.
/artifacts/files:
post:
summary: Upload a file
description: Upload a new file to a bucket.
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
bucket_id:
type: string
description: The ID of the bucket to upload the file to.
file:
type: string
format: binary
description: The file to upload.
responses:
'201':
description: File uploaded successfully.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the uploaded file.
name:
type: string
description: The name of the uploaded file.
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the bucket.
name:
type: string
description: The name of the bucket.
created_at:
type: string
format: date-time
description: The creation timestamp of the bucket.
/artifacts/files:
post:
summary: Upload a file
description: Upload a new file to a bucket.
parameters:
- name: body
in: body
required: true
schema:
type: object
properties:
bucket_id:
type: string
description: The ID of the bucket to upload the file to.
file:
type: string
format: binary
description: The file to upload.
responses:
'201':
description: File uploaded successfully.
schema:
type: object
properties:
id:
type: string
description: The unique identifier for the uploaded file.
name:
type: string
description: The name of the uploaded file.

Copilot uses AI. Check for mistakes.
/ai_dial/models/default/{project_id}:
parameters:
- in: path
Expand Down