-
Notifications
You must be signed in to change notification settings - Fork 1
/
zoo.donkey.idl
36 lines (23 loc) · 1.12 KB
/
zoo.donkey.idl
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
serviceName zoo
namespace java com.example.services.zoo
namespace php Services.Zoo
import namespace java com.example.services.zoo.thrift
import namespace php Services.Zoo.Thrift
exception InvalidAnimalTypeException 1
exception AlreadyVaccinatedException 2
resource Animals "/animals" {
## Retrieves all animals in the zoo;
GET AnimalList getAll();
POST "/{type}" void addAnimal(pathParam string type, requestBody Animal animal);
GET "/{type}" AnimalList findAnimalsByType(pathParam string type) throws InvalidAnimalTypeException;
## Marks all animals as vaccinated
POST "/{type}/vaccinate" void markAsVaccinated(pathParam string type, queryParam list<string> names) throws AlreadyVaccinatedException;
}
resource Staff "/staff" {
POST "/janitors" void hireJanitor(requestBody Person janitor);
POST "/guards" void hireGuard(requestBody Person guard);
## Find employees by their first name or last name
GET PersonList getAllEmployees(queryParam string firstName, queryParam string lastName);
## Fire an employee by their ID number
DELETE "/{id}" void terminateEmployee(pathParam string id);
}