Skip to content
This repository was archived by the owner on Jul 8, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions app/public/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ paths:
post:
operationId: usersSignUpUnConfirmed
summary: Sign's up an user, but doesn't confirm them. To confirm an user, a
confirmation text will be sent the the phone number. The phone number
should be in international phone number format -- e.g.; an US phone
number (202)456-1111 would be "+12024561111".
confirmation text will be sent the the phone number.
requestBody:
required: true
content:
Expand All @@ -85,6 +83,11 @@ paths:
type: string
phoneNumber:
type: string
example:
username: claeb_user_1
password: "!testUser2PW"
email: caleb.arulandu@hkpsolutions.com
phoneNumber: "+12345678910"
responses:
"200":
description: OK
Expand Down Expand Up @@ -112,6 +115,7 @@ paths:
- phoneNumber
- confirmationCode
- employmentType
- HIN
- profileInfo
properties:
username:
Expand All @@ -126,6 +130,8 @@ paths:
type: integer
employmentType:
type: string
HIN:
type: string
profileInfo:
type: object
properties:
Expand All @@ -147,6 +153,15 @@ paths:
type: string
phone:
type: string
example:
username: claeb_user_1
password: "!testUser2PW"
email: caleb.arulandu@hkpsolutions.com
phoneNumber: "+12345678910"
confirmationCode: 987654
employmentType: HKP
HIN: "123456"
profileInfo: {}
responses:
"200":
description: OK
Expand Down Expand Up @@ -182,7 +197,7 @@ paths:
TokenType: Bearer
Refreshtoken: bwefja....bawefioje
IdToken: ceqioj....faweijbw
item:
user:
type: object
properties:
userId:
Expand All @@ -198,6 +213,15 @@ paths:
type: string
endDate:
type: string
HIN:
type: string
example:
userId: abc413a6-9e10-4e66-99b8-a3e257148dfb
username: claeb_user_1
profileInfo: {}
employmentType: HKP
startDate: 2021-05-28T20:37:56.271Z
HIN: "123456"
/users/login:
post:
operationId: usersLogin
Expand All @@ -217,8 +241,8 @@ paths:
password:
type: string
example:
username: bob
email: bob@company.com
username: claeb_user_1
password: "!testUser2PW"
responses:
"200":
description: OK
Expand All @@ -228,10 +252,18 @@ paths:
type: object
required:
- authResult
- user
properties:
authResult:
$ref: "#/paths/~1users~1confirm-sign-up/post/responses/200/content/application~\
1json/schema/properties/authResult"
user:
type: object
properties:
HIN:
type: string
example:
HIN: "123456"
/hotels:
post:
operationId: createHotel
Expand Down
17 changes: 16 additions & 1 deletion docs/openapi/paths/users/_users_confirm-sign-up.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ post:
- phoneNumber
- confirmationCode
- employmentType
- HIN
- profileInfo
properties:
username:
Expand All @@ -28,8 +29,22 @@ post:
type: integer
employmentType:
type: string
HIN:
type: string
profileInfo:
$ref: "../../schemas/profileInfo.yaml"
example:
{
"username": "claeb_user_1",
"password": "!testUser2PW",
"email": "caleb.arulandu@hkpsolutions.com",
"phoneNumber": "+12345678910",
"confirmationCode": 987654,
"employmentType": "HKP",
"HIN": "123456",
"profileInfo": {
}
}

responses:
200:
Expand All @@ -43,5 +58,5 @@ post:
properties:
authResult:
$ref: "../../schemas/authResult.yaml"
item:
user:
$ref: "../../schemas/user.yaml"
17 changes: 16 additions & 1 deletion docs/openapi/paths/users/_users_login.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ post:
type: string
password:
type: string
example: { username: bob, email: bob@company.com }
example:
{
username: "claeb_user_1",
password: "!testUser2PW"
}

responses:
200:
description: OK
Expand All @@ -25,6 +30,16 @@ post:
type: object
required:
- authResult
- user
properties:
authResult:
$ref: "../../schemas/authResult.yaml"
user:
type: object
properties:
HIN:
type: string
example:
{
"HIN": "123456"
}
9 changes: 8 additions & 1 deletion docs/openapi/paths/users/_users_sign-up.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
post:
operationId: usersSignUpUnConfirmed
summary: Sign's up an user, but doesn't confirm them. To confirm an user, a confirmation text will be sent the the phone number. The phone number should be in international phone number format -- e.g.; an US phone number (202)456-1111 would be "+12024561111".
summary: Sign's up an user, but doesn't confirm them. To confirm an user, a confirmation text will be sent the the phone number.
requestBody:
required: true
content:
Expand All @@ -21,6 +21,13 @@ post:
type: string
phoneNumber:
type: string
example:
{
"username": "claeb_user_1",
"password": "!testUser2PW",
"email": "caleb.arulandu@hkpsolutions.com",
"phoneNumber": "+12345678910"
}

responses:
200:
Expand Down
11 changes: 11 additions & 0 deletions docs/openapi/schemas/user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ properties:
type: string
endDate:
type: string
HIN:
type: string
example:
{
"userId": "abc413a6-9e10-4e66-99b8-a3e257148dfb",
"username": "claeb_user_1",
"profileInfo": {},
"employmentType": "HKP",
"startDate": "2021-05-28T20:37:56.271Z",
"HIN": "123456"
}