From e085e064ee777344e722c1ab7352bf7615e3c859 Mon Sep 17 00:00:00 2001 From: seb Date: Sat, 17 Oct 2026 23:59:28 +0200 Subject: [PATCH] u --- docs/api/routes-all.md | 2 +- docs/api/routes.md | 2 +- docs/api/routes/category/articles.md | 20 +++++++++++++++- src/api/openapi.js | 36 ++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/docs/api/routes-all.md b/docs/api/routes-all.md index 5b97ca9..c426fb8 100644 --- a/docs/api/routes-all.md +++ b/docs/api/routes-all.md @@ -316,7 +316,7 @@ _none_ - Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }` #### Articles in category — `GET /category/{id}/articles` - Params: `id: int` -- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T26|null }[] }` +- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T26|null, articlewarehousesummary?: { id: int, articleId: int, warehouseId: int, stock: num, article_id?: int, warehouse_id?: int, warehouseName?: str|null }[], warehouses?: { id: int, name: str, stock: num }[] }[] }` #### List category attribute values — `GET /category/{id}/attributevalue` - Params: `id: int` - Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, categoryId?: int, exclusive?: bool }[] }` diff --git a/docs/api/routes.md b/docs/api/routes.md index 51ab1f8..53663a5 100644 --- a/docs/api/routes.md +++ b/docs/api/routes.md @@ -250,7 +250,7 @@ _none_ - Returns: `200 { category: { id: int, name: str, slug: str, parentId: int, sort: int } }` #### Articles in category — `GET /category/{id}/articles` - Params: `id: int` -- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T20|null }[] }` +- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T20|null, articlewarehousesummary?: { id: int, articleId: int, warehouseId: int, stock: num, article_id?: int, warehouse_id?: int, warehouseName?: str|null }[], warehouses?: { id: int, name: str, stock: num }[] }[] }` #### List category attribute values — `GET /category/{id}/attributevalue` - Params: `id: int` - Returns: `200 { attributevalues: { id: int, attributeId: int, attributeName: str, attributeValueId: int, value: str, sort: int, categoryId?: int, exclusive?: bool }[] }` diff --git a/docs/api/routes/category/articles.md b/docs/api/routes/category/articles.md index 45f8b3a..e51271e 100644 --- a/docs/api/routes/category/articles.md +++ b/docs/api/routes/category/articles.md @@ -43,7 +43,25 @@ Articles list "thumbW": 1, "thumbH": 1, "thumbHash": "…" - } + }, + "articlewarehousesummary": [ + { + "id": 1, + "articleId": 1, + "article_id": 1, + "warehouseId": 1, + "warehouse_id": 1, + "warehouseName": "…", + "stock": 1 + } + ], + "warehouses": [ + { + "id": 1, + "name": "…", + "stock": 1 + } + ] } ] } diff --git a/src/api/openapi.js b/src/api/openapi.js index 4c1eaf3..9932f56 100644 --- a/src/api/openapi.js +++ b/src/api/openapi.js @@ -576,6 +576,42 @@ * brand: * $ref: '#/components/schemas/ArticleBrand' * nullable: true + * articlewarehousesummary: + * type: array + * description: Warehouse stock summary entries for this article + * items: + * $ref: '#/components/schemas/CategoryArticleWarehouseSummary' + * warehouses: + * type: array + * description: Warehouse stock list for this article + * items: + * type: object + * properties: + * id: + * type: integer + * name: + * type: string + * stock: + * type: number + * CategoryArticleWarehouseSummary: + * type: object + * required: [id, articleId, warehouseId, stock] + * properties: + * id: + * type: integer + * articleId: + * type: integer + * article_id: + * type: integer + * warehouseId: + * type: integer + * warehouse_id: + * type: integer + * warehouseName: + * type: string + * nullable: true + * stock: + * type: number * NumberSequence: * type: object * required: [id, type, prefix, padding, next]