chore(docs): Generated API Reference (#4529)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f61488f105
commit
5affae9583
@@ -4517,36 +4517,17 @@
|
||||
"operationId": "PostProductsSearch",
|
||||
"summary": "Search Products",
|
||||
"description": "Run a search query on products using the search engine installed on Medusa",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "q",
|
||||
"required": true,
|
||||
"description": "The query to run the search with.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "offset",
|
||||
"description": "How many products to skip in the result.",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"description": "Limit the number of products returned.",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/StorePostSearchReq"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"x-codegen": {
|
||||
"method": "search",
|
||||
"queryParams": "StorePostSearchReq"
|
||||
"method": "search"
|
||||
},
|
||||
"x-codeSamples": [
|
||||
{
|
||||
@@ -4557,7 +4538,7 @@
|
||||
{
|
||||
"lang": "Shell",
|
||||
"label": "cURL",
|
||||
"source": "curl --location --request POST 'https://medusa-url.com/store/products/search?q=Shirt'\n"
|
||||
"source": "curl --location --request POST 'https://medusa-url.com/store/products/search' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"q\": \"Shirt\"\n}'\n"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -14618,6 +14599,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"StorePostSearchReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"q": {
|
||||
"type": "string",
|
||||
"description": "The query to run the search with."
|
||||
},
|
||||
"offset": {
|
||||
"type": "number",
|
||||
"description": "How many products to skip in the result."
|
||||
},
|
||||
"limit": {
|
||||
"type": "number",
|
||||
"description": "Limit the number of products returned."
|
||||
},
|
||||
"filter": {
|
||||
"description": "Filter based on the search engine."
|
||||
}
|
||||
}
|
||||
},
|
||||
"StorePostSearchRes": {
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/products/search?q=Shirt'
|
||||
curl --location --request POST 'https://medusa-url.com/store/products/search' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"q": "Shirt"
|
||||
}'
|
||||
|
||||
13
docs/api/store/components/schemas/StorePostSearchReq.yaml
Normal file
13
docs/api/store/components/schemas/StorePostSearchReq.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
type: object
|
||||
properties:
|
||||
q:
|
||||
type: string
|
||||
description: The query to run the search with.
|
||||
offset:
|
||||
type: number
|
||||
description: How many products to skip in the result.
|
||||
limit:
|
||||
type: number
|
||||
description: Limit the number of products returned.
|
||||
filter:
|
||||
description: Filter based on the search engine.
|
||||
@@ -2,26 +2,13 @@ post:
|
||||
operationId: PostProductsSearch
|
||||
summary: Search Products
|
||||
description: Run a search query on products using the search engine installed on Medusa
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
required: true
|
||||
description: The query to run the search with.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many products to skip in the result.
|
||||
schema:
|
||||
type: integer
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of products returned.
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StorePostSearchReq.yaml
|
||||
x-codegen:
|
||||
method: search
|
||||
queryParams: StorePostSearchReq
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
|
||||
Reference in New Issue
Block a user