Skip to content

Commit

Permalink
Add NamedProducts-Endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
krestenlaust committed Apr 16, 2024
1 parent 0fe09cd commit c1933bb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ paths:
$ref: '#/components/responses/QRCodeGenerated'
'400 Invalid Input':
$ref: '#/components/responses/InvalidQRInput'
/api/products/named_products:
get:
tags:
- Products
summary: Gets dictionary of named products
description: Returns a dictionary of all named products with their product ID. A named product is a shorthand associated with a product ID.
operationId: dump_named_products
responses:
'200 Success':
$ref: '#/components/responses/NamedProducts'
components:
parameters:
member_id:
Expand Down Expand Up @@ -162,6 +172,13 @@ components:
product_name:
type: string
example: Beer
named_product:
type: object
properties:
beer:
type: integer
example:
beer: 123
stregdollar_price:
type: integer
example: 600
Expand Down Expand Up @@ -235,6 +252,12 @@ components:
properties:
sales:
$ref: '#/components/schemas/sales'
NamedProducts:
description: Dictionary of all named_product names.
content:
application/json:
schema:
$ref: '#/components/schemas/named_product'
QRCodeGenerated:
description: QR code with link to open MobilePay with the provided information.
content:
Expand Down

0 comments on commit c1933bb

Please sign in to comment.