Skip to content

Commit

Permalink
Finish Get Member Info-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
krestenlaust committed Apr 7, 2024
1 parent 5c7eedf commit 3b43da2
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,74 @@ tags:
- name: Products
description: Related to the products.
- name: Sale
description: Related to performing a sale.
description: Related to performing a sale.
paths:
/api/member:
get:
tags:
- Member
summary: Get member info
description: Gets a member's balance, username, active-status and name.
operationId: getMemberInfo
parameters:
- $ref: '#/components/parameters/member_id'
responses:
'200 Success':
$ref: '#/components/responses/MemberFound'
'400 Member Not Found':
$ref: '#/components/responses/MemberNotFound'
'400 Invalid Member Id':
$ref: '#/components/responses/InvalidMemberId'
components:
parameters:
member_id:
name: member_id
in: query
description: ID of the member to retrieve.
required: true
schema:
type: integer
example: 321
schemas:
balance:
type: integer
example: 20000
username:
type: string
example: kresten
active:
type: boolean
example: true
name:
type: string
example: Kresten Laust
MemberInfo:
type: object
properties:
balance:
$ref: '#/components/schemas/balance'
username:
$ref: '#/components/schemas/username'
active:
$ref: '#/components/schemas/active'
name:
$ref: '#/components/schemas/name'
responses:
MemberFound:
description: Member found
content:
application/json:
schema:
$ref: '#/components/schemas/MemberInfo'
MemberNotFound:
content:
text/html:
schema:
type: string
example: Member not found
InvalidMemberId:
content:
text/html:
schema:
type: string
example: Missing or invalid member_id

0 comments on commit 3b43da2

Please sign in to comment.