-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_main.http
More file actions
70 lines (49 loc) · 1.25 KB
/
test_main.http
File metadata and controls
70 lines (49 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Test your FastAPI endpoints
### Test głównego endpointu
GET http://127.0.0.1:8000/
Accept: application/json
###
### Test health check
GET http://127.0.0.1:8000/api/v1/health
Accept: application/json
###
### Test powitania użytkownika
GET http://127.0.0.1:8000/api/v1/hello/User
Accept: application/json
###
### Test dodania nowego itemu
POST http://127.0.0.1:8000/api/v1/items/
Content-Type: application/json
{
"name": "Przykładowy item",
"description": "To jest opis przykładowego itemu",
"price": 19.99,
"tax": 3.99
}
###
### Test pobrania wszystkich itemów
GET http://127.0.0.1:8000/api/v1/items/
Accept: application/json
###
### Test pobrania itemu po ID
GET http://127.0.0.1:8000/api/v1/items/1
Accept: application/json
###
### Test aktualizacji itemu
PUT http://127.0.0.1:8000/api/v1/items/1
Content-Type: application/json
{
"name": "Zaktualizowany item",
"price": 25.99
}
###
### Test usunięcia itemu
DELETE http://127.0.0.1:8000/api/v1/items/1
Accept: application/json
###
### Test dokumentacji Swagger UI
# Otwórz w przeglądarce: http://127.0.0.1:8000/swagger
### Test dokumentacji ReDoc
# Otwórz w przeglądarce: http://127.0.0.1:8000/redoc
### Test OpenAPI schema
# Otwórz w przeglądarce: http://127.0.0.1:8000/openapi.json