Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 5.21 KB

how_to_test.md

File metadata and controls

70 lines (51 loc) · 5.21 KB

How to test?

Open API (Swagger) UI

Open API (Swagger) Documentation UI for the endpoints, visit http://localhost:8080/swagger-ui/index.html after running the app.


Postman Collection

The Postman Collection shared in the resources can be modified and used for testing the endpoints.


API Endpoints

Note
All URIs are relative to http://localhost:8080/api/v1


Class Method HTTP request Description
AuthController login POST /auth Authenticates users by their credentials
AuthController signup POST /auth Registers users using their credentials and user info


Class Method HTTP request Description
PetController findById GET /pets/{id} Retrieves a single pet by the given id
PetController findAll GET /pets?page=0&size=10&sort=id,asc Retrieves all pets based on the given parameters
PetController findAllByUserId GET /pets/{userId} Retrieves all pets based on the given userId
PetController findAllByType GET /pets/types Retrieves counts of all pets by selected type
PetController create POST /pets Creates a new pet using the given request parameters
PetController update PUT /pets Updates pet using the given request parameters
PetController deleteById DELETE /pets Deletes pet by id


Class Method HTTP request Description
TypeController findById GET /types/{id} Retrieves a single type by the given id
TypeController findAll GET /types?page=0&size=10&sort=id,asc Retrieves all types based on the given parameters
TypeController create POST /types Creates a new type using the given request parameters
TypeController update PUT /types Updates type using the given request parameters
TypeController deleteById DELETE /types Deletes type by id


Class Method HTTP request Description
UserController findById GET /users/{id} Retrieves a single user by the given id
UserController findAll GET /users?page=0&size=10&sort=id,asc Retrieves all users based on the given parameters
UserController create POST /users Creates a new user using the given request parameters
UserController update PUT /users Updates user using the given request parameters
UserController updateFullName PUT /users/profile Updates user profile by Full Name (First Name and Last Name fields)
UserController deleteById DELETE /users Deletes user by id

Unit & Integration Tests

Unit and Integration Tests are provided for services and controllers in the corresponding packages.