diff --git a/api/user_account_operations.yaml b/api/user_account_operations.yaml index fa4de8f..55c12d4 100644 --- a/api/user_account_operations.yaml +++ b/api/user_account_operations.yaml @@ -365,10 +365,61 @@ components: newname: $ref: '#/components/schemas/newname' - file_operation: + + file_operation_create: + title: 'Create file' + type: object + properties: + operation: + type: string + enum: [create] + + + file_operation_move: + title: 'Move file' + type: object + properties: + operation: + type: string + enum: [move] + dst_repo: + $ref: '#/components/schemas/dst_repo' + dst_dir: + $ref: '#/components/schemas/dst_dir' + + file_operation_copy: + title: 'Copy file' + type: object + properties: + operation: + type: string + enum: [copy] + dst_repo: + $ref: '#/components/schemas/dst_repo' + dst_dir: + $ref: '#/components/schemas/dst_dir' + + file_operation_rename: + title: 'Rename file' + type: object + properties: + operation: + type: string + enum: [copy] + newname: + $ref: '#/components/schemas/newname' + + + + file_lock_operation: title: 'operation' type: string + enum: + - lock + - unlock example: "lock" + + new_name: title: 'newname' type: string @@ -1648,16 +1699,11 @@ paths: content: multipart/form-data: schema: - type: object - properties: - newname: - $ref: '#/components/schemas/new_name' - operation: - $ref: '#/components/schemas/file_operation' - dst_repo: - $ref: '#/components/schemas/dst_repo' - dst_dir: - $ref: '#/components/schemas/dst_dir' + oneOf: + - $ref: '#/components/schemas/file_operation_create' + - $ref: '#/components/schemas/file_operation_rename' + - $ref: '#/components/schemas/file_operation_move' + - $ref: '#/components/schemas/file_operation_copy' responses: '200': description: OK @@ -1678,7 +1724,7 @@ paths: type: object properties: operation: - $ref: '#/components/schemas/file_operation' + $ref: '#/components/schemas/file_lock_operation' responses: '200': description: OK @@ -1759,7 +1805,7 @@ paths: can_edit: true - /api/v2.1/smart-link/: + /api/v2.1/smart-link/?repo_id={repo_id}&path={path}&is_dir={is_dir}: get: tags: - Files