-
Notifications
You must be signed in to change notification settings - Fork 14
/
recipe-example-api.yml
78 lines (65 loc) · 1.5 KB
/
recipe-example-api.yml
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
71
72
73
74
75
76
77
78
types:
definitions:
default-package: com.palantir.conjure.examples.recipe.api
objects:
Temperature:
fields:
degree: double
unit: TemperatureUnit
Ingredient:
alias: string
RecipeName:
alias: string
BakeStep:
fields:
temperature: Temperature
durationInSeconds: integer
RecipeStep:
union:
mix: set<Ingredient>
chop: Ingredient
bake: BakeStep
Recipe:
fields:
name: RecipeName
steps: list<RecipeStep>
TemperatureUnit:
values:
- FAHRENHEIT
- CELSIUS
errors:
RecipeNotFound:
namespace: Recipe
code: NOT_FOUND
safe-args:
name: RecipeName
services:
RecipeBookService:
name: Recipe Book
package: com.palantir.conjure.examples.recipe.api
base-path: /recipes
docs: |
APIs for retrieving recipes
endpoints:
createRecipe:
http: POST /
args:
createRecipeRequest:
param-type: body
type: Recipe
getRecipe:
http: GET /{name}
args:
name: RecipeName
returns: Recipe
docs: |
Retrieves a recipe for the given name.
@param name
The name of the recipe
getAllRecipes:
http: GET /
returns: set<Recipe>
deleteRecipe:
http: DELETE /{name}
args:
name: RecipeName