[DON'T MERGE - FOR TESTING] Update API Documentation for Artifacts - #4
[DON'T MERGE - FOR TESTING] Update API Documentation for Artifacts#4epamLDadayan wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the API documentation by adding comprehensive Artifacts endpoints documentation and aligning with recent backend changes. The update removes outdated parameters and references while introducing new API endpoints for bucket and file management.
- Added complete API documentation for Artifacts endpoints including bucket listing, bucket details, and file upload operations
- Removed references to deprecated
integration_id,is_localparameters andAdminAPImode handlers - Introduced
configuration_titleparameter support in relevant endpoints
| 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. |
There was a problem hiding this comment.
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.
| 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. |
| 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. |
There was a problem hiding this comment.
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.
| 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. |
| 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. |
There was a problem hiding this comment.
Inconsistent OpenAPI version usage - 'content' is OpenAPI 3.0 syntax while the document appears to follow OpenAPI 2.0 format based on 'basePath' usage.
| 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. |
| format: binary | ||
| description: The file to upload. | ||
| responses: | ||
| '201': |
There was a problem hiding this comment.
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).
| content: | ||
| multipart/form-data: | ||
| schema: | ||
| type: object |
There was a problem hiding this comment.
Missing required fields specification. The schema should indicate which properties are required, particularly 'bucket_id' and 'file' for the upload operation.
| type: object | |
| type: object | |
| required: | |
| - bucket_id | |
| - file |
Changes Made:
integration_idandis_localparameters.configuration_titleparameter in relevant endpoints.AdminAPImode handlers.api/v1/storage.pyfile.Summary:
This update aligns the API documentation with the latest backend changes, ensuring consistency and clarity for developers.