|
2989 | 2989 | } |
2990 | 2990 | }, |
2991 | 2991 | "/api/v2/editor-uploads": { |
| 2992 | + "get": { |
| 2993 | + "tags": [ |
| 2994 | + "editor-uploads" |
| 2995 | + ], |
| 2996 | + "summary": "List files in upload directory", |
| 2997 | + "description": "Returns a list of files in the requested upload directory.", |
| 2998 | + "operationId": "e7e69f1b4695239ad3301bc61de57862", |
| 2999 | + "parameters": [ |
| 3000 | + { |
| 3001 | + "name": "php-auth-pw", |
| 3002 | + "in": "header", |
| 3003 | + "description": "Session key obtained from login", |
| 3004 | + "required": true, |
| 3005 | + "schema": { |
| 3006 | + "type": "string" |
| 3007 | + } |
| 3008 | + }, |
| 3009 | + { |
| 3010 | + "name": "directory", |
| 3011 | + "in": "query", |
| 3012 | + "description": "Upload directory name (e.g., \"uploads\" or \"images\")", |
| 3013 | + "required": false, |
| 3014 | + "schema": { |
| 3015 | + "type": "string", |
| 3016 | + "default": "uploads" |
| 3017 | + } |
| 3018 | + } |
| 3019 | + ], |
| 3020 | + "responses": { |
| 3021 | + "200": { |
| 3022 | + "description": "Success", |
| 3023 | + "content": { |
| 3024 | + "application/json": { |
| 3025 | + "schema": { |
| 3026 | + "properties": { |
| 3027 | + "files": { |
| 3028 | + "type": "array", |
| 3029 | + "items": { |
| 3030 | + "properties": { |
| 3031 | + "name": { |
| 3032 | + "type": "string", |
| 3033 | + "example": "image.png" |
| 3034 | + }, |
| 3035 | + "path": { |
| 3036 | + "type": "string", |
| 3037 | + "example": "/uploads/image.png" |
| 3038 | + }, |
| 3039 | + "size": { |
| 3040 | + "type": "integer", |
| 3041 | + "example": 12345 |
| 3042 | + }, |
| 3043 | + "type": { |
| 3044 | + "type": "string", |
| 3045 | + "example": "file" |
| 3046 | + }, |
| 3047 | + "modified": { |
| 3048 | + "type": "integer", |
| 3049 | + "example": 1689255600 |
| 3050 | + } |
| 3051 | + }, |
| 3052 | + "type": "object" |
| 3053 | + } |
| 3054 | + }, |
| 3055 | + "directory": { |
| 3056 | + "type": "string", |
| 3057 | + "example": "uploads" |
| 3058 | + }, |
| 3059 | + "total": { |
| 3060 | + "type": "integer", |
| 3061 | + "example": 5 |
| 3062 | + } |
| 3063 | + }, |
| 3064 | + "type": "object" |
| 3065 | + } |
| 3066 | + } |
| 3067 | + } |
| 3068 | + }, |
| 3069 | + "400": { |
| 3070 | + "description": "Bad request - invalid directory", |
| 3071 | + "content": { |
| 3072 | + "application/json": { |
| 3073 | + "schema": { |
| 3074 | + "$ref": "#/components/schemas/BadRequestResponse" |
| 3075 | + } |
| 3076 | + } |
| 3077 | + } |
| 3078 | + }, |
| 3079 | + "401": { |
| 3080 | + "description": "Unauthorized", |
| 3081 | + "content": { |
| 3082 | + "application/json": { |
| 3083 | + "schema": { |
| 3084 | + "$ref": "#/components/schemas/UnauthorizedResponse" |
| 3085 | + } |
| 3086 | + } |
| 3087 | + } |
| 3088 | + }, |
| 3089 | + "404": { |
| 3090 | + "description": "Directory not found", |
| 3091 | + "content": { |
| 3092 | + "application/json": { |
| 3093 | + "schema": { |
| 3094 | + "$ref": "#/components/schemas/NotFoundErrorResponse" |
| 3095 | + } |
| 3096 | + } |
| 3097 | + } |
| 3098 | + } |
| 3099 | + } |
| 3100 | + }, |
2992 | 3101 | "post": { |
2993 | 3102 | "tags": [ |
2994 | 3103 | "editor-uploads" |
|
3031 | 3140 | }, |
3032 | 3141 | "responses": { |
3033 | 3142 | "201": { |
3034 | | - "description": "Asset uploaded", |
| 3143 | + "description": "Success", |
3035 | 3144 | "content": { |
3036 | 3145 | "application/json": { |
3037 | 3146 | "schema": { |
3038 | | - "properties": { |
3039 | | - "uploaded": { |
3040 | | - "type": "boolean", |
3041 | | - "example": true |
3042 | | - }, |
3043 | | - "fileName": { |
3044 | | - "type": "string", |
3045 | | - "example": "test.png" |
3046 | | - }, |
3047 | | - "url": { |
3048 | | - "type": "string", |
3049 | | - "example": "https://ex.com/uploads/test.png" |
3050 | | - }, |
3051 | | - "default": { |
3052 | | - "type": "string", |
3053 | | - "example": "https://ex.com/uploads/test.png" |
3054 | | - }, |
3055 | | - "mimeType": { |
3056 | | - "type": "string", |
3057 | | - "example": "image/png" |
3058 | | - }, |
3059 | | - "size": { |
3060 | | - "type": "integer", |
3061 | | - "example": 123456, |
3062 | | - "nullable": true |
3063 | | - }, |
3064 | | - "extension": { |
3065 | | - "type": "string", |
3066 | | - "example": "png" |
3067 | | - } |
3068 | | - }, |
3069 | | - "type": "object" |
| 3147 | + "$ref": "#/components/schemas/EditorUpload" |
3070 | 3148 | } |
3071 | 3149 | } |
3072 | 3150 | } |
|
8348 | 8426 | }, |
8349 | 8427 | "type": "object" |
8350 | 8428 | }, |
| 8429 | + "EditorUpload": { |
| 8430 | + "properties": { |
| 8431 | + "uploaded": { |
| 8432 | + "type": "boolean", |
| 8433 | + "example": true |
| 8434 | + }, |
| 8435 | + "fileName": { |
| 8436 | + "type": "string", |
| 8437 | + "example": "test.png" |
| 8438 | + }, |
| 8439 | + "url": { |
| 8440 | + "type": "string", |
| 8441 | + "example": "https://ex.com/uploads/test.png" |
| 8442 | + }, |
| 8443 | + "default": { |
| 8444 | + "type": "string", |
| 8445 | + "example": "https://ex.com/uploads/test.png" |
| 8446 | + }, |
| 8447 | + "mimeType": { |
| 8448 | + "type": "string", |
| 8449 | + "example": "image/png" |
| 8450 | + }, |
| 8451 | + "size": { |
| 8452 | + "type": "integer", |
| 8453 | + "example": 123456, |
| 8454 | + "nullable": true |
| 8455 | + }, |
| 8456 | + "extension": { |
| 8457 | + "type": "string", |
| 8458 | + "example": "png" |
| 8459 | + } |
| 8460 | + }, |
| 8461 | + "type": "object", |
| 8462 | + "nullable": true |
| 8463 | + }, |
8351 | 8464 | "ForwardRecipientResult": { |
8352 | 8465 | "properties": { |
8353 | 8466 | "email": { |
|
0 commit comments