chore: fix OAS of batch delete product prices endpoint (#5318)

* chore: fix OAS of batch delete product prices endpoint

* fix oas check
This commit is contained in:
Shahed Nasser authored and GitHub committed 2023-10-09 13:13:00 +03:00
1 parent 1c3faee158
commit 4ada22d656
2 files changed
+10 -8

No files matched your search

@@ -5,7 +5,7 @@ import { SetRelation, Merge } from "../core/ModelUtils"
export interface AdminDeletePriceListsPriceListProductsPricesBatchReq { export interface AdminDeletePriceListsPriceListProductsPricesBatchReq {
/** /**
* The product IDs of the products to delete the associated prices. * The IDs of the products to delete their associated prices.
*/ */
product_ids?: Array<string> product_ids?: Array<string>
} }
@@ -7,13 +7,13 @@ import { validator } from "../../../../utils/validator"
/** /**
* @oas [delete] /admin/price-lists/{id}/products/prices/batch * @oas [delete] /admin/price-lists/{id}/products/prices/batch
* operationId: "DeletePriceListsPriceListProductsPricesBatch" * operationId: "DeletePriceListsPriceListProductsPricesBatch"
* summary: "Delete several Product's Prices" * summary: "Delete Product Prices"
* description: "Delete all the prices associated with the product IDs in a price list." * description: "Delete all the prices associated with multiple products in a price list."
* x-authenticated: true * x-authenticated: true
* parameters: * parameters:
* - (path) id=* {string} The ID of the Price List * - (path) id=* {string} The ID of the Price List
* x-codegen: * x-codegen:
* method: deleteProductPrices * method: deleteProductsPrices
* x-codeSamples: * x-codeSamples:
* - lang: JavaScript * - lang: JavaScript
* label: JS Client * label: JS Client
@@ -21,9 +21,10 @@ import { validator } from "../../../../utils/validator"
* import Medusa from "@medusajs/medusa-js" * import Medusa from "@medusajs/medusa-js"
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) * const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
* // must be previously logged in or use api token * // must be previously logged in or use api token
* medusa.admin.priceLists.deleteProductPrices(priceListId, { * medusa.admin.priceLists.deleteProductsPrices(priceListId, {
* product_ids: [ * product_ids: [
* product_id * productId1,
* productId2,
* ] * ]
* }) * })
* .then(({ ids, object, deleted }) => { * .then(({ ids, object, deleted }) => {
@@ -33,7 +34,7 @@ import { validator } from "../../../../utils/validator"
* label: cURL * label: cURL
* source: | * source: |
* curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/prices/batch' \ * curl -X DELETE '{backend_url}/admin/price-lists/{id}/products/prices/batch' \
* -H 'Authorization: Bearer {api_token}' * -H 'x-medusa-access-token: {api_token}' \
* -H 'Content-Type: application/json' \ * -H 'Content-Type: application/json' \
* --data-raw '{ * --data-raw '{
* "product_ids": [ * "product_ids": [
@@ -44,6 +45,7 @@ import { validator } from "../../../../utils/validator"
* security: * security:
* - api_token: [] * - api_token: []
* - cookie_auth: [] * - cookie_auth: []
* - jwt_token: []
* tags: * tags:
* - Price Lists * - Price Lists
* responses: * responses:
@@ -98,7 +100,7 @@ export default async (req: Request, res: Response) => {
* type: object * type: object
* properties: * properties:
* product_ids: * product_ids:
* description: The product IDs of the products to delete the associated prices. * description: The IDs of the products to delete their associated prices.
* type: array * type: array
* items: * items:
* type: string * type: string