Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api contract for users/userAvailble/:id route #20

Merged
merged 12 commits into from Feb 21, 2021
16 changes: 16 additions & 0 deletions users/README.md
Expand Up @@ -111,6 +111,22 @@ Returns the specified user.
- **Code:** 401
- **Content:** `{ 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' }`

## **GET /users/userAvailable/:id**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be username instead of id, right?


Returns the availability of user name.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please combine and make it username


- **Params**
_Required:_ `id=[string]`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: id

- **Body**
None
- **Headers**
Content-Type: application/json
- **Cookie**
rds-session: `<JWT>`
- **Success Response:**
- **Code:** 200
- **Content:** `{ 'userAvailable': <Availability Stauts> }`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like isUsernameAvailable sounds better to me. What do you say?
Also the value should be <boolean>


## **POST /users**

Creates a new User.
Expand Down