chore(oas): Update OAS for upload endpoints (#4953)
* chore(oas): Update OAS for upload endpoints * added changeset * address pr feedback
This commit is contained in:
@@ -77,7 +77,7 @@ export default async (req, res) => {
|
||||
* - file_key
|
||||
* properties:
|
||||
* file_key:
|
||||
* description: "key of the file to delete"
|
||||
* description: "key of the file to delete. This is obtained when you first uploaded the file, or by the file service if you used it directly."
|
||||
* type: string
|
||||
*/
|
||||
export class AdminDeleteUploadsReq {
|
||||
|
||||
@@ -76,7 +76,7 @@ export default async (req, res) => {
|
||||
* - file_key
|
||||
* properties:
|
||||
* file_key:
|
||||
* description: "key of the file to obtain the download link for"
|
||||
* description: "key of the file to obtain the download link for. This is obtained when you first uploaded the file, or by the file service if you used it directly."
|
||||
* type: string
|
||||
*/
|
||||
export class AdminPostUploadsDownloadUrlReq {
|
||||
|
||||
@@ -5,6 +5,7 @@ import { DeleteResponse } from "../../../../types/common"
|
||||
import middlewares, { transformBody } from "../../../middlewares"
|
||||
import { AdminDeleteUploadsReq } from "./delete-upload"
|
||||
import { AdminPostUploadsDownloadUrlReq } from "./get-download-url"
|
||||
import { FileServiceUploadResult } from "@medusajs/types"
|
||||
|
||||
const route = Router()
|
||||
const upload = multer({ dest: "uploads/" })
|
||||
@@ -52,14 +53,18 @@ export default (app) => {
|
||||
* type: object
|
||||
* required:
|
||||
* - url
|
||||
* - key
|
||||
* properties:
|
||||
* url:
|
||||
* description: The URL of the uploaded file.
|
||||
* type: string
|
||||
* format: uri
|
||||
* key:
|
||||
* description: The key of the file that is identifiable by the file service. It can be used later to retrieve or manipulate the file.
|
||||
* type: string
|
||||
*/
|
||||
export type AdminUploadsRes = {
|
||||
uploads: { url: string }[]
|
||||
uploads: FileServiceUploadResult[]
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user