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

Conversation

saishankarmanugula
Copy link

image

Copy link
Contributor

@swarajpure swarajpure left a comment

Choose a reason for hiding this comment

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

Have some doubts, please clarify.

users/README.md Outdated
Returns the availability of user name.

- **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

users/README.md Outdated
@@ -111,6 +111,22 @@ Returns the specified user.
- **Code:** 401
- **Content:** `{ 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' }`

## **GET /users/userAvailable/:id**

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

users/README.md Outdated
@@ -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?

users/README.md Outdated
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>

Copy link
Contributor

@swarajpure swarajpure left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍🏻

Also, if this route is going to require authentication (which I think it would), please add 4xx error response for unauthorized user
Also, kindly add 5xx error for server error response

You can refer contracts for other users routes to get idea of the above two error responses.

Thank you 🎉

Copy link
Contributor

@swarajpure swarajpure left a comment

Choose a reason for hiding this comment

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

Great! Thank you! 🎉

@ankushdharkar
Copy link
Contributor

This looks good. Thanks @saishankarmanugula!

@ankushdharkar ankushdharkar merged commit 264587c into Real-Dev-Squad:main Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants