Skip to content

Instantly share code, notes, and snippets.

@hithacker
Created February 15, 2023 09:09
Show Gist options
  • Save hithacker/873c648e6201ebf3b179a94c20e6d20a to your computer and use it in GitHub Desktop.
Save hithacker/873c648e6201ebf3b179a94c20e6d20a to your computer and use it in GitHub Desktop.
sample api spec
API for company
- Get all companies (also allow searching by name)
- Get company by id
- Create company
- Update company by id
- Delete company by id
- API for users
- Create user in a company
- Req params: company id, name, emailId, countryCode, mobileNumber
- Validation
- Unique validation for emailId and mobileNumber
- create user in db
- create company user association entry in company user
- return the user entity
- Get users by company id api
- Search by name
- pagination and sorting
- Delete user by id
- Update user by id
- Get user by id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment