Skip to content

Commit 528ae15

Browse files
committed
fix: fixed docs
1 parent 3e351a1 commit 528ae15

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

docs/ENDPOINTS.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
**GET `/ping`**
77
Returns a test message.
88

9-
-------------------------
9+
```json
1010
{
1111
"message": "initial tests"
1212
}
13-
-------------------------
13+
```
1414

1515
---
1616

@@ -20,7 +20,7 @@ Returns a test message.
2020
**GET `/products`**
2121
Returns all registered products.
2222

23-
-------------------------
23+
```json
2424
[
2525
{
2626
"id": 1,
@@ -33,75 +33,75 @@ Returns all registered products.
3333
"price": 150.00
3434
}
3535
]
36-
-------------------------
36+
```
3737

3838
---
3939

4040
### 🔹 Create a Product
4141
**POST `/product`**
4242

4343
**Body**
44-
-------------------------
44+
```json
4545
{
4646
"name": "Sample Product",
4747
"price": 100.00
4848
}
49-
-------------------------
49+
```
5050

5151
**Response**
52-
-------------------------
52+
```json
5353
{
5454
"id": 1,
5555
"name": "Sample Product",
5656
"price": 100.00
5757
}
58-
-------------------------
58+
```
5959

6060
---
6161

6262
### 🔹 Get Product by ID
6363
**GET `/product/:productId`**
6464
Returns a specific product by its ID.
6565

66-
-------------------------
66+
```json
6767
{
6868
"id": 1,
6969
"name": "Sample Product",
7070
"price": 100.00
7171
}
72-
-------------------------
72+
```
7373

7474
---
7575

7676
### 🔹 Update Product
7777
**PUT `/product`**
7878

7979
**Body**
80-
-------------------------
80+
```json
8181
{
8282
"id": 1,
8383
"name": "Updated Product",
8484
"price": 150.00
8585
}
86-
-------------------------
86+
```
8787

8888
**Response**
89-
-------------------------
89+
```json
9090
{
9191
"id": 1,
9292
"name": "Updated Product",
9393
"price": 150.00
9494
}
95-
-------------------------
95+
```
9696

9797
---
9898

9999
### 🔹 Delete Product
100100
**DELETE `/product/:productId`**
101101
Removes a product by its ID.
102102

103-
-------------------------
103+
```json
104104
{
105105
"message": "Product successfully removed"
106106
}
107-
-------------------------
107+
```

docs/INSTALLATION.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
## 🏃 How to Run
1010

1111
1. **Clone the repository**
12-
-------------------------
12+
```shell
1313
git clone https://github.com/usuario/api-go.git
1414
cd api-go
15-
-------------------------
15+
```
1616

1717
2. **Configure the database**
1818
Edit `db/conn.go` with your credentials.
1919

2020
3. **Start services with Docker**
21-
-------------------------
21+
```shell
2222
docker-compose up
23-
-------------------------
23+
```
2424

2525
4. **Access the API**
2626
- URL: `http://localhost:8000`

docs/STRUCTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 📚 Project Structure
22

3-
-------------------------
3+
```plaintext
44
API-GO/
55
├── cmd/
66
│ └── main.go # Entry point of the application
@@ -21,4 +21,4 @@ API-GO/
2121
├── go.mod # Go modules dependencies
2222
├── go.sum # Dependency hashes
2323
└── README.md # Project documentation
24-
-------------------------
24+
```

0 commit comments

Comments
 (0)