From 92d240d7493ed350aed8b8af80c1dfc62b07a88c Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 17 Dec 2025 18:20:54 +0200 Subject: [PATCH] fix(medusa): fix type of product variant request param (#14342) Fix type argument for requests which is necessary for generating OpenAPI specs ## Why The `StoreVariantListRequest` type used in the `/store/product-variants` route doesn't match the convention of other routes since it doesn't accept a type parameter for the query (or body, but here that's not necessary). This makes it difficult for us to infer the query parameter type of the request. This change would adapt the `StoreVariantListRequest` to match other conventions in our API routes so that we can generate correct OAS for docs --- .changeset/strong-memes-tease.md | 5 +++++ packages/medusa/src/api/store/product-variants/route.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/strong-memes-tease.md diff --git a/.changeset/strong-memes-tease.md b/.changeset/strong-memes-tease.md new file mode 100644 index 0000000000..5f9b4e5d6f --- /dev/null +++ b/.changeset/strong-memes-tease.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +fix(medusa): fix type of product variant request param diff --git a/packages/medusa/src/api/store/product-variants/route.ts b/packages/medusa/src/api/store/product-variants/route.ts index 28f171dfb0..a5a5ef70d1 100644 --- a/packages/medusa/src/api/store/product-variants/route.ts +++ b/packages/medusa/src/api/store/product-variants/route.ts @@ -12,9 +12,9 @@ import { wrapVariantsWithInventoryQuantityForSalesChannel } from "../../utils/mi import { StoreRequestWithContext } from "../types" import { wrapVariantsWithTaxPrices } from "./helpers" -type StoreVariantListRequest = - StoreRequestWithContext & - AuthenticatedMedusaRequest +type StoreVariantListRequest = + StoreRequestWithContext & + AuthenticatedMedusaRequest /** * @since 2.11.2