chore(docs): Generated API Reference (#4529)

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-07-13 12:08:21 +03:00
committed by GitHub
parent f61488f105
commit 5affae9583
4 changed files with 52 additions and 47 deletions

View File

@@ -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": [
{

View File

@@ -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"
}'

View 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.

View File

@@ -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