Skip to content

Commit

Permalink
Finish Get Member Sales-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
krestenlaust committed Apr 8, 2024
1 parent 627bc90 commit 57b2ec2
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ paths:
$ref: '#/components/responses/MemberNotFound'
'400 Invalid member ID':
$ref: '#/components/responses/InvalidMemberId'
/api/member/sales:
get:
tags:
- Member
summary: Get member sales
description: Gets a list of a member's sales.
operationId: get_member_sales
parameters:
- $ref: '#/components/parameters/member_id'
responses:
'200 Success':
$ref: '#/components/responses/MemberFound_Sales'
'400 Member Not Found':
$ref: '#/components/responses/MemberNotFound'
'400 Invalid member ID':
$ref: '#/components/responses/InvalidMemberId'
/api/member/get_id:
get:
tags:
Expand Down Expand Up @@ -117,6 +133,25 @@ components:
member_id:
type: integer
example: 321
timestamp:
type: string
format: date-time
example: 2004-01-07T15:30:55Z
product_name:
type: string
example: Beer
product_price:
type: integer
example: 600
sales:
type: object
properties:
timestamp:
$ref: '#/components/schemas/timestamp'
product:
$ref: '#/components/schemas/product_name'
price:
$ref: '#/components/schemas/product_price'
MemberInfo:
type: object
properties:
Expand Down Expand Up @@ -162,6 +197,15 @@ components:
properties:
active:
$ref: '#/components/schemas/active'
MemberFound_Sales:
description: Member found.
content:
application/json:
schema:
type: object
properties:
sales:
$ref: '#/components/schemas/sales'
MemberNotFound:
description: Member does not exist.
content:
Expand Down

0 comments on commit 57b2ec2

Please sign in to comment.