Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RustamKuramshin committed Mar 30, 2023
1 parent 09e56e7 commit 59efe54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,5 @@ Temporary Items
.jpb

/db_data/
/.idea/httpRequests/
/data/
.idea
16 changes: 8 additions & 8 deletions api-test.http
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Создание компании
POST localhost:8080/companies
POST localhost:8080/companies?projection=companyInfo
Content-Type: application/json

{
Expand All @@ -9,23 +9,23 @@ Content-Type: application/json
}

### Получение списка всех компаний
GET localhost:8080/companies
GET localhost:8080/companies?projection=companyInfo
Accept: application/json

### Получение компании по id с проекцией
GET localhost:8080/companies/1?projection=companyInfo
GET localhost:8080/companies/2?projection=companyInfo
Accept: application/json

### Изменение имени компании по id
PATCH localhost:8080/companies/528d4c61-6cda-4d12-9a0a-89adf91e0651
PATCH localhost:8080/companies/1?projection=companyInfo
Content-Type: application/json

{
"name": "Супертех"
}

### Изменение компании по id
PUT localhost:8080/companies/cbf309f1-21e8-47bc-a42b-b91a083011fe
PUT localhost:8080/companies/1?projection=companyInfo
Content-Type: application/json

{
Expand All @@ -35,7 +35,7 @@ Content-Type: application/json
}

### Удаление компании по id
DELETE localhost:8080/companies/cbf309f1-21e8-47bc-a42b-b91a083011fe
DELETE localhost:8080/companies/1

### Получение инфы о API
GET localhost:8080/
Expand All @@ -57,7 +57,7 @@ Content-Type: application/json
}

### Линковка отдела к компании
PUT http://localhost:8080/departments/ed16b778-8d93-4a10-9029-adc6b7e7dad8/company
PUT http://localhost:8080/departments/1/company
Content-Type: text/uri-list

http://localhost:8080/companies/2715e481-dff6-4405-ad5c-fb14aa07bd7c
http://localhost:8080/companies/1

0 comments on commit 59efe54

Please sign in to comment.