diff --git a/app/public/openapi.yaml b/app/public/openapi.yaml index 172281b..6fbde29 100644 --- a/app/public/openapi.yaml +++ b/app/public/openapi.yaml @@ -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: @@ -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 @@ -112,6 +115,7 @@ paths: - phoneNumber - confirmationCode - employmentType + - HIN - profileInfo properties: username: @@ -126,6 +130,8 @@ paths: type: integer employmentType: type: string + HIN: + type: string profileInfo: type: object properties: @@ -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 @@ -182,7 +197,7 @@ paths: TokenType: Bearer Refreshtoken: bwefja....bawefioje IdToken: ceqioj....faweijbw - item: + user: type: object properties: userId: @@ -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 @@ -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 @@ -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 diff --git a/docs/openapi/paths/users/_users_confirm-sign-up.yaml b/docs/openapi/paths/users/_users_confirm-sign-up.yaml index ca52145..4648660 100644 --- a/docs/openapi/paths/users/_users_confirm-sign-up.yaml +++ b/docs/openapi/paths/users/_users_confirm-sign-up.yaml @@ -14,6 +14,7 @@ post: - phoneNumber - confirmationCode - employmentType + - HIN - profileInfo properties: username: @@ -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: @@ -43,5 +58,5 @@ post: properties: authResult: $ref: "../../schemas/authResult.yaml" - item: + user: $ref: "../../schemas/user.yaml" diff --git a/docs/openapi/paths/users/_users_login.yaml b/docs/openapi/paths/users/_users_login.yaml index 64e6486..5a0c4c0 100644 --- a/docs/openapi/paths/users/_users_login.yaml +++ b/docs/openapi/paths/users/_users_login.yaml @@ -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 @@ -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" + } diff --git a/docs/openapi/paths/users/_users_sign-up.yaml b/docs/openapi/paths/users/_users_sign-up.yaml index 14a6177..d966fd5 100644 --- a/docs/openapi/paths/users/_users_sign-up.yaml +++ b/docs/openapi/paths/users/_users_sign-up.yaml @@ -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: @@ -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: diff --git a/docs/openapi/schemas/user.yaml b/docs/openapi/schemas/user.yaml index 96584ce..77f2e5c 100644 --- a/docs/openapi/schemas/user.yaml +++ b/docs/openapi/schemas/user.yaml @@ -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" + }