From 93c3d007f3df4563af815215b75bc3f0fb669534 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 18 Feb 2023 15:20:21 +1100 Subject: [PATCH] Update API docs with product filters --- openapi/api-docs.yaml | 7 +++++++ openapi/paths/products.yaml | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index b04cae70cae0..28be00fbd705 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -11670,6 +11670,13 @@ paths: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + - name: filter + in: query + description: Filter by product name + required: false + schema: + type: string + example: bob responses: 200: description: "A list of products" diff --git a/openapi/paths/products.yaml b/openapi/paths/products.yaml index 209b3d4fbf3a..fe9e08892b09 100644 --- a/openapi/paths/products.yaml +++ b/openapi/paths/products.yaml @@ -12,6 +12,27 @@ - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + - name: filter + in: query + description: Filter by product name + required: false + schema: + type: string + example: bob + - name: product_key + in: query + description: Filter by product key + required: false + schema: + type: string + example: bob + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc product_key|desc responses: 200: description: "A list of products"