重构模型平台前后端并移除Redis依赖

This commit is contained in:
Winnie
2026-07-30 19:03:00 +08:00
commit c74b2abb48
172 changed files with 40825 additions and 0 deletions
@@ -0,0 +1,550 @@
openapi: 3.1.0
info:
title: storage-api service
version: 0.1.0
paths:
/:
get:
summary: Root
operationId: root__get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties:
type: string
type: object
title: Response Root Get
/health/live:
get:
summary: Live
operationId: live_health_live_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties:
type: string
type: object
title: Response Live Health Live Get
/api/v1/health:
get:
summary: Public Health
operationId: public_health_api_v1_health_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties:
type: string
type: object
title: Response Public Health Api V1 Health Get
/health/ready:
get:
summary: Ready
operationId: ready_health_ready_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Ready Health Ready Get
/internal/v1/uploads:
post:
summary: Create Upload
operationId: create_upload_internal_v1_uploads_post
parameters:
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUploadRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Create Upload Internal V1 Uploads Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/v1/uploads/{upload_id}/complete:
post:
summary: Complete Upload
operationId: complete_upload_internal_v1_uploads__upload_id__complete_post
parameters:
- name: upload_id
in: path
required: true
schema:
type: string
title: Upload Id
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CompleteUploadRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Complete Upload Internal V1 Uploads Upload Id Complete Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/v1/uploads/{upload_id}/abort:
post:
summary: Abort Upload
operationId: abort_upload_internal_v1_uploads__upload_id__abort_post
parameters:
- name: upload_id
in: path
required: true
schema:
type: string
title: Upload Id
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Abort Upload Internal V1 Uploads Upload Id Abort Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/v1/objects:
post:
summary: Create Server Object
operationId: create_server_object_internal_v1_objects_post
parameters:
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServerObjectRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Create Server Object Internal V1 Objects Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/v1/workspace-objects:
post:
summary: Register Workspace Object
operationId: register_workspace_object_internal_v1_workspace_objects_post
parameters:
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterWorkspaceObjectRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Register Workspace Object Internal V1 Workspace Objects Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/v1/objects/{storage_object_id}/download-url:
post:
summary: Create Download Url
operationId: create_download_url_internal_v1_objects__storage_object_id__download_url_post
parameters:
- name: storage_object_id
in: path
required: true
schema:
type: string
title: Storage Object Id
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DownloadUrlRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Create Download Url Internal V1 Objects Storage Object Id Download Url
Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/v1/objects/{storage_object_id}:
delete:
summary: Delete Object
operationId: delete_object_internal_v1_objects__storage_object_id__delete
parameters:
- name: storage_object_id
in: path
required: true
schema:
type: string
title: Storage Object Id
- name: X-Service-Token
in: header
required: true
schema:
type: string
title: X-Service-Token
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
additionalProperties: true
title: Response Delete Object Internal V1 Objects Storage Object Id Delete
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/internal/health/storage:
get:
summary: Internal Health
operationId: internal_health_internal_health_storage_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties:
type: string
type: object
title: Response Internal Health Internal Health Storage Get
components:
schemas:
CompleteUploadRequest:
properties:
usage_type:
type: string
enum:
- data_resource
- version_artifact
- snapshot
- run_log
- run_result
title: Usage Type
visibility:
type: string
enum:
- private
- workspace
- public
title: Visibility
default: private
is_immutable:
type: boolean
title: Is Immutable
default: false
additionalProperties: false
type: object
required:
- usage_type
title: CompleteUploadRequest
CreateUploadRequest:
properties:
workspace_id:
type: string
maxLength: 26
minLength: 26
title: Workspace Id
user_id:
type: string
maxLength: 26
minLength: 26
title: User Id
usage_type:
type: string
enum:
- data_resource
- version_artifact
- snapshot
- run_log
- run_result
title: Usage Type
file_name:
type: string
maxLength: 255
minLength: 1
title: File Name
content_type:
type: string
maxLength: 255
minLength: 1
title: Content Type
expected_size_bytes:
type: integer
maximum: 104857600.0
minimum: 0.0
title: Expected Size Bytes
expected_hash:
anyOf:
- type: string
maxLength: 64
minLength: 64
- type: 'null'
title: Expected Hash
idempotency_key:
type: string
maxLength: 128
minLength: 8
title: Idempotency Key
url_scope:
type: string
enum:
- public
- internal
title: Url Scope
default: public
additionalProperties: false
type: object
required:
- workspace_id
- user_id
- usage_type
- file_name
- content_type
- expected_size_bytes
- idempotency_key
title: CreateUploadRequest
DownloadUrlRequest:
properties:
expires_seconds:
type: integer
maximum: 3600.0
minimum: 30.0
title: Expires Seconds
default: 300
additionalProperties: false
type: object
title: DownloadUrlRequest
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
RegisterWorkspaceObjectRequest:
properties:
workspace_id:
type: string
maxLength: 26
minLength: 26
title: Workspace Id
user_id:
type: string
maxLength: 26
minLength: 26
title: User Id
relative_path:
type: string
maxLength: 1024
minLength: 1
title: Relative Path
usage_type:
type: string
enum:
- working_copy
- public_script
title: Usage Type
visibility:
type: string
enum:
- private
- workspace
- public
title: Visibility
default: private
additionalProperties: false
type: object
required:
- workspace_id
- user_id
- relative_path
- usage_type
title: RegisterWorkspaceObjectRequest
ServerObjectRequest:
properties:
workspace_id:
type: string
maxLength: 26
minLength: 26
title: Workspace Id
user_id:
type: string
maxLength: 26
minLength: 26
title: User Id
usage_type:
type: string
enum:
- data_resource
- version_artifact
- snapshot
- run_log
- run_result
title: Usage Type
file_name:
type: string
maxLength: 255
minLength: 1
title: File Name
content_type:
type: string
maxLength: 255
minLength: 1
title: Content Type
content_base64:
type: string
minLength: 1
title: Content Base64
visibility:
type: string
enum:
- private
- workspace
- public
title: Visibility
default: private
is_immutable:
type: boolean
title: Is Immutable
default: false
idempotency_key:
type: string
maxLength: 128
minLength: 8
title: Idempotency Key
additionalProperties: false
type: object
required:
- workspace_id
- user_id
- usage_type
- file_name
- content_type
- content_base64
- idempotency_key
title: ServerObjectRequest
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError