Skip to content

GuilhermeLuan/RestAPIJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RestfullAPI-Spring 💻

TechnologiesGetting StartedAPI EndpointsCollaboratorsContribute

A Rest API that registers products with CRUD operations.

💻 Technologies

  • Java
  • PostgresSQL
  • Spring Boot
  • JPA
  • JUnit 5
  • Docker

🚀 Getting started

Prerequisites

Cloning

git clone https://github.com/GuilhermeLuan/RestfullAPI-Spring

Starting

cd RestfullAPI-Sping
docker compose up
./mvnw clean install
./mvnw spring-boot:run

📍 API Endpoints

route description
GET /api/v1/products retrieves a list of all products.
GET /api/v1/products/{UUID} retrieves a specific product by its unique identifier (UUID).
PUT /api/v1/products modifies a specific product by its unique identifier on body (UUID).
POST /api/v1/products creates a product in the database.
DELETE /api/v1/products/{UUID} deletes a specific product by its unique identifier (UUID).

GET /api/products

RESPONSE

[
  {
    "idProduct": "ee2737a5-d773-4106-ab60-c3ffbe95ec0e",
    "name": "Iphone 14 Pro",
    "valueProduct": 5000
  }
]

GET /api/products/{UUID}

RESPONSE

[
  {
    "idProduct": "ee2737a5-d773-4106-ab60-c3ffbe95ec0e",
    "name": "Iphone 14 Pro",
    "valueProduct": 5000
  }
]

PUT /api/products/{UUID}

REQUEST

{
  "idProduct": "ee2737a5-d773-4106-ab60-c3ffbe95ec0e",
  "name": "Iphone 14 Pro",
  "valueProduct": 5000
}

RESPONSE

{
  "idProduct": "ee2737a5-d773-4106-ab60-c3ffbe95ec0e",
  "name": "Iphone 14 Pro",
  "valueProduct": 5000
}

POST /api/products

REQUEST

{
  "name": "Iphone 14",
  "valueProduct": 5000
}

RESPONSE

{
  "idProduct": "ee2737a5-d773-4106-ab60-c3ffbe95ec0e",
  "name": "Iphone 14",
  "valueProduct": 5000
}

DELETE /api/products/{UUID}

RESPONSE

"Product deleted successfully"

🤝 Collaborators

Special thank you for all people that contributed for this project.

Guilherme Luan Profile Picture
Guilherme Luan

📫 Contribute

  1. git clone https://github.com/GuilhermeLuan/RestfullAPI-Spring
  2. git checkout -b feature/NAME
  3. Follow commit patterns
  4. Open a Pull Request explaining the problem solved or feature made, if exists, append screenshot of visual modifications and wait for the review!

Documentations that might help

📝 How to create a Pull Request

💾 Commit pattern

Releases

No releases published

Packages

No packages published

Languages