@emulates/edamam 0.0.0-stage → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.yaml ADDED
@@ -0,0 +1,1370 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: Edamam APIs (Emulates subset)
4
+ description: 'Stateful mock subset of Edamam''s Food Database v2 (parser, nutrients, image), Nutrition
5
+ Analysis (nutrition-data, nutrition-details), Recipe Search v2 (search, by-uri, by id), Meal Planner
6
+ v1 (select) and Shopping List v2, over a built-in corpus. Hand-authored from Edamam''s docs and the
7
+ consumers (edamam-nutrition.adapter.ts, edamam-meal-planning.adapter.ts, the Python chat client''s tools/nutrition/client.py).
8
+
9
+ '
10
+ version: '2'
11
+ x-emulates-upstream:
12
+ note: Edamam publishes per-API docs, no single OpenAPI; shapes trimmed to the fields our consumers
13
+ read (zod schemas in edamam-nutrition.adapter.ts and edamam-meal-planning.schemas.ts).
14
+ servers:
15
+ - url: https://api.edamam.com
16
+ paths:
17
+ /api/food-database/v2/parser:
18
+ get:
19
+ operationId: FoodParser
20
+ description: 'Parse a food description (`ingr`) or look up a barcode (`upc`): `parsed` (the best
21
+ match with quantity and measure) and `hints` (every related food with its measures).'
22
+ x-emulates:
23
+ supported: true
24
+ parity:
25
+ enabled: true
26
+ safe: true
27
+ parameters:
28
+ - $ref: '#/components/parameters/AppId'
29
+ - $ref: '#/components/parameters/AppKey'
30
+ - name: ingr
31
+ in: query
32
+ required: false
33
+ schema:
34
+ type: string
35
+ enum:
36
+ - 2 large eggs
37
+ - 1 cup cooked rice
38
+ - banana
39
+ - chicken breast
40
+ - greek yogurt
41
+ - 3 slices bread
42
+ - salmon fillet
43
+ - chicken salad
44
+ - xyzzy
45
+ description: Parity vocabulary; the mock parses any text.
46
+ - name: upc
47
+ in: query
48
+ required: false
49
+ schema:
50
+ type: string
51
+ enum:
52
+ - '850000000012'
53
+ - '850000000029'
54
+ - '850000000036'
55
+ - '000000000000'
56
+ - name: nutrition-type
57
+ in: query
58
+ required: false
59
+ schema:
60
+ type: string
61
+ enum:
62
+ - cooking
63
+ - logging
64
+ - name: categoryLabel
65
+ in: query
66
+ required: false
67
+ schema:
68
+ type: string
69
+ enum:
70
+ - food
71
+ - meal
72
+ - name: category
73
+ in: query
74
+ required: false
75
+ schema:
76
+ type: string
77
+ enum:
78
+ - generic-foods
79
+ - packaged-foods
80
+ - generic-meals
81
+ - name: health
82
+ in: query
83
+ required: false
84
+ schema:
85
+ type: string
86
+ enum:
87
+ - vegan
88
+ - vegetarian
89
+ - gluten-free
90
+ - dairy-free
91
+ - name: calories
92
+ in: query
93
+ required: false
94
+ schema:
95
+ type: string
96
+ enum:
97
+ - 50-200
98
+ - 300+
99
+ - '100'
100
+ responses:
101
+ '200':
102
+ description: Parser result
103
+ content:
104
+ application/json:
105
+ schema:
106
+ $ref: '#/components/schemas/ParserResponse'
107
+ '400':
108
+ description: Neither ingr nor upc
109
+ content:
110
+ application/json:
111
+ schema:
112
+ $ref: '#/components/schemas/FoodError'
113
+ '404':
114
+ description: Unknown UPC
115
+ content:
116
+ application/json:
117
+ schema:
118
+ $ref: '#/components/schemas/FoodError'
119
+ '401':
120
+ description: Unknown app_id / app_key
121
+ content:
122
+ application/json:
123
+ schema:
124
+ $ref: '#/components/schemas/FoodError'
125
+ '429':
126
+ description: Usage limits are exceeded
127
+ content:
128
+ application/json:
129
+ schema:
130
+ $ref: '#/components/schemas/FoodError'
131
+ /api/food-database/v2/nutrients:
132
+ post:
133
+ operationId: FoodNutrients
134
+ description: Full nutrition for foods at given measures.
135
+ x-emulates:
136
+ supported: true
137
+ parity:
138
+ enabled: true
139
+ safe: true
140
+ parameters:
141
+ - $ref: '#/components/parameters/AppId'
142
+ - $ref: '#/components/parameters/AppKey'
143
+ responses:
144
+ '200':
145
+ description: Nutrition
146
+ content:
147
+ application/json:
148
+ schema:
149
+ $ref: '#/components/schemas/NutritionAnalysis'
150
+ '422':
151
+ description: Unknown food or measure
152
+ content:
153
+ application/json:
154
+ schema:
155
+ $ref: '#/components/schemas/FoodError'
156
+ '401':
157
+ description: Unknown app_id / app_key
158
+ content:
159
+ application/json:
160
+ schema:
161
+ $ref: '#/components/schemas/FoodError'
162
+ '429':
163
+ description: Usage limits are exceeded
164
+ content:
165
+ application/json:
166
+ schema:
167
+ $ref: '#/components/schemas/FoodError'
168
+ requestBody:
169
+ required: true
170
+ content:
171
+ application/json:
172
+ schema:
173
+ $ref: '#/components/schemas/NutrientsRequest'
174
+ /api/food-database/nutrients-from-image:
175
+ post:
176
+ operationId: FoodFromImage
177
+ description: Recognise a plated meal from an image (beta).
178
+ x-emulates:
179
+ supported: true
180
+ parity:
181
+ enabled: true
182
+ safe: true
183
+ parameters:
184
+ - $ref: '#/components/parameters/AppId'
185
+ - $ref: '#/components/parameters/AppKey'
186
+ - name: beta
187
+ in: query
188
+ required: false
189
+ schema:
190
+ type: string
191
+ enum:
192
+ - 'true'
193
+ responses:
194
+ '200':
195
+ description: Recognition
196
+ content:
197
+ application/json:
198
+ schema:
199
+ $ref: '#/components/schemas/VisionResponse'
200
+ '400':
201
+ description: Not an image
202
+ content:
203
+ application/json:
204
+ schema:
205
+ $ref: '#/components/schemas/FoodError'
206
+ '401':
207
+ description: Unknown app_id / app_key
208
+ content:
209
+ application/json:
210
+ schema:
211
+ $ref: '#/components/schemas/FoodError'
212
+ '429':
213
+ description: Usage limits are exceeded
214
+ content:
215
+ application/json:
216
+ schema:
217
+ $ref: '#/components/schemas/FoodError'
218
+ requestBody:
219
+ required: true
220
+ content:
221
+ application/json:
222
+ schema:
223
+ $ref: '#/components/schemas/ImageRequest'
224
+ /api/nutrition-data:
225
+ get:
226
+ operationId: NutritionData
227
+ description: Nutrition analysis of one ingredient line.
228
+ x-emulates:
229
+ supported: true
230
+ parity:
231
+ enabled: true
232
+ safe: true
233
+ parameters:
234
+ - $ref: '#/components/parameters/AppId'
235
+ - $ref: '#/components/parameters/AppKey'
236
+ - name: ingr
237
+ in: query
238
+ required: true
239
+ schema:
240
+ type: string
241
+ enum:
242
+ - 1 cup cooked rice
243
+ - 2 large eggs
244
+ - 1 banana
245
+ - xyzzy
246
+ description: Parity vocabulary; the mock parses any text.
247
+ - name: nutrition-type
248
+ in: query
249
+ required: false
250
+ schema:
251
+ type: string
252
+ enum:
253
+ - cooking
254
+ - logging
255
+ responses:
256
+ '200':
257
+ description: Nutrition
258
+ content:
259
+ application/json:
260
+ schema:
261
+ $ref: '#/components/schemas/NutritionAnalysis'
262
+ '422':
263
+ description: Could not parse the ingredient
264
+ content:
265
+ application/json:
266
+ schema:
267
+ $ref: '#/components/schemas/FoodError'
268
+ '401':
269
+ description: Unknown app_id / app_key
270
+ content:
271
+ application/json:
272
+ schema:
273
+ $ref: '#/components/schemas/FoodError'
274
+ '429':
275
+ description: Usage limits are exceeded
276
+ content:
277
+ application/json:
278
+ schema:
279
+ $ref: '#/components/schemas/FoodError'
280
+ /api/nutrition-details:
281
+ post:
282
+ operationId: NutritionDetails
283
+ description: Nutrition analysis of a recipe (ingredient lines).
284
+ x-emulates:
285
+ supported: true
286
+ parity:
287
+ enabled: true
288
+ safe: true
289
+ parameters:
290
+ - $ref: '#/components/parameters/AppId'
291
+ - $ref: '#/components/parameters/AppKey'
292
+ responses:
293
+ '200':
294
+ description: Nutrition
295
+ content:
296
+ application/json:
297
+ schema:
298
+ $ref: '#/components/schemas/NutritionAnalysis'
299
+ '422':
300
+ description: No ingredients
301
+ content:
302
+ application/json:
303
+ schema:
304
+ $ref: '#/components/schemas/FoodError'
305
+ '555':
306
+ description: Insufficient quality
307
+ content:
308
+ application/json:
309
+ schema:
310
+ $ref: '#/components/schemas/FoodError'
311
+ '401':
312
+ description: Unknown app_id / app_key
313
+ content:
314
+ application/json:
315
+ schema:
316
+ $ref: '#/components/schemas/FoodError'
317
+ '429':
318
+ description: Usage limits are exceeded
319
+ content:
320
+ application/json:
321
+ schema:
322
+ $ref: '#/components/schemas/FoodError'
323
+ requestBody:
324
+ required: true
325
+ content:
326
+ application/json:
327
+ schema:
328
+ $ref: '#/components/schemas/RecipeAnalysisRequest'
329
+ /api/recipes/v2:
330
+ get:
331
+ operationId: RecipeSearch
332
+ description: Recipe search v2 (20 per page, `_links.next` carries `_cont`).
333
+ x-emulates:
334
+ supported: true
335
+ parity:
336
+ enabled: true
337
+ safe: true
338
+ parameters:
339
+ - $ref: '#/components/parameters/AppId'
340
+ - $ref: '#/components/parameters/AppKey'
341
+ - &id001
342
+ name: Edamam-Account-User
343
+ in: header
344
+ required: false
345
+ schema:
346
+ type: string
347
+ pattern: ^[a-f0-9]{1,30}$
348
+ description: The first 30 hex chars of sha256(user id), as our meal adapter sends it.
349
+ - name: type
350
+ in: query
351
+ required: true
352
+ schema:
353
+ type: string
354
+ enum:
355
+ - public
356
+ - user
357
+ - any
358
+ - name: q
359
+ in: query
360
+ required: false
361
+ schema:
362
+ type: string
363
+ enum:
364
+ - chicken
365
+ - salmon
366
+ - oats
367
+ - yogurt
368
+ - toast
369
+ - xyzzy
370
+ description: Parity vocabulary; the mock parses any text.
371
+ - name: health
372
+ in: query
373
+ required: false
374
+ schema:
375
+ type: string
376
+ enum:
377
+ - vegan
378
+ - vegetarian
379
+ - gluten-free
380
+ - dairy-free
381
+ - pescatarian
382
+ - name: diet
383
+ in: query
384
+ required: false
385
+ schema:
386
+ type: string
387
+ enum:
388
+ - high-protein
389
+ - low-carb
390
+ - high-fiber
391
+ - balanced
392
+ - name: mealType
393
+ in: query
394
+ required: false
395
+ schema:
396
+ type: string
397
+ enum:
398
+ - Breakfast
399
+ - Lunch
400
+ - Dinner
401
+ - Snack
402
+ - name: dishType
403
+ in: query
404
+ required: false
405
+ schema:
406
+ type: string
407
+ enum:
408
+ - Main course
409
+ - Salad
410
+ - Cereals
411
+ - Egg
412
+ - name: cuisineType
413
+ in: query
414
+ required: false
415
+ schema:
416
+ type: string
417
+ enum:
418
+ - American
419
+ - Asian
420
+ - Mediterranean
421
+ - French
422
+ - name: calories
423
+ in: query
424
+ required: false
425
+ schema:
426
+ type: string
427
+ enum:
428
+ - 100-400
429
+ - 500+
430
+ - '300'
431
+ - name: time
432
+ in: query
433
+ required: false
434
+ schema:
435
+ type: string
436
+ enum:
437
+ - 1-10
438
+ - '30'
439
+ - 20+
440
+ - name: excluded
441
+ in: query
442
+ required: false
443
+ schema:
444
+ type: string
445
+ enum:
446
+ - spinach
447
+ - almonds
448
+ - name: imageSize
449
+ in: query
450
+ required: false
451
+ schema:
452
+ type: string
453
+ enum:
454
+ - REGULAR
455
+ - SMALL
456
+ - THUMBNAIL
457
+ - LARGE
458
+ - name: random
459
+ in: query
460
+ required: false
461
+ schema:
462
+ type: string
463
+ enum:
464
+ - 'true'
465
+ - 'false'
466
+ responses:
467
+ '200':
468
+ description: Hits
469
+ content:
470
+ application/json:
471
+ schema:
472
+ $ref: '#/components/schemas/RecipeSearchResponse'
473
+ '400':
474
+ description: Illegal parameter
475
+ content:
476
+ application/json:
477
+ schema:
478
+ $ref: '#/components/schemas/RecipeErrors'
479
+ '401':
480
+ description: Unknown app_id / app_key
481
+ content:
482
+ application/json:
483
+ schema:
484
+ $ref: '#/components/schemas/RecipeErrors'
485
+ '429':
486
+ description: Usage limits are exceeded
487
+ content:
488
+ application/json:
489
+ schema:
490
+ $ref: '#/components/schemas/RecipeErrors'
491
+ /api/recipes/v2/by-uri:
492
+ get:
493
+ operationId: RecipesByUri
494
+ description: Recipes by URI (up to 20 `uri` parameters).
495
+ x-emulates:
496
+ supported: true
497
+ parity:
498
+ enabled: true
499
+ safe: true
500
+ parameters:
501
+ - $ref: '#/components/parameters/AppId'
502
+ - $ref: '#/components/parameters/AppKey'
503
+ - *id001
504
+ - name: type
505
+ in: query
506
+ required: true
507
+ schema:
508
+ type: string
509
+ enum:
510
+ - public
511
+ - name: uri
512
+ in: query
513
+ required: true
514
+ schema:
515
+ type: string
516
+ enum:
517
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_overnight_oats
518
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_baked_salmon
519
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_missing
520
+ responses:
521
+ '200':
522
+ description: Hits
523
+ content:
524
+ application/json:
525
+ schema:
526
+ $ref: '#/components/schemas/RecipeSearchResponse'
527
+ '400':
528
+ description: Illegal parameter
529
+ content:
530
+ application/json:
531
+ schema:
532
+ $ref: '#/components/schemas/RecipeErrors'
533
+ '401':
534
+ description: Unknown app_id / app_key
535
+ content:
536
+ application/json:
537
+ schema:
538
+ $ref: '#/components/schemas/RecipeErrors'
539
+ '429':
540
+ description: Usage limits are exceeded
541
+ content:
542
+ application/json:
543
+ schema:
544
+ $ref: '#/components/schemas/RecipeErrors'
545
+ /api/recipes/v2/{id}:
546
+ get:
547
+ operationId: RecipeById
548
+ description: One recipe (the `_links.self` target).
549
+ x-emulates:
550
+ supported: true
551
+ parity:
552
+ enabled: true
553
+ safe: true
554
+ parameters:
555
+ - $ref: '#/components/parameters/AppId'
556
+ - $ref: '#/components/parameters/AppKey'
557
+ - *id001
558
+ - name: id
559
+ in: path
560
+ required: true
561
+ schema:
562
+ type: string
563
+ enum:
564
+ - overnight_oats
565
+ - veggie_omelette
566
+ - chicken_rice_bowl
567
+ - missing
568
+ - name: type
569
+ in: query
570
+ required: true
571
+ schema:
572
+ type: string
573
+ enum:
574
+ - public
575
+ responses:
576
+ '200':
577
+ description: The recipe
578
+ content:
579
+ application/json:
580
+ schema:
581
+ $ref: '#/components/schemas/RecipeHit'
582
+ '404':
583
+ description: Unknown recipe
584
+ content:
585
+ application/json:
586
+ schema:
587
+ $ref: '#/components/schemas/RecipeErrors'
588
+ '401':
589
+ description: Unknown app_id / app_key
590
+ content:
591
+ application/json:
592
+ schema:
593
+ $ref: '#/components/schemas/RecipeErrors'
594
+ '429':
595
+ description: Usage limits are exceeded
596
+ content:
597
+ application/json:
598
+ schema:
599
+ $ref: '#/components/schemas/RecipeErrors'
600
+ /api/meal-planner/v1/{app_id}/select:
601
+ post:
602
+ operationId: MealPlanSelect
603
+ description: Select recipes for `size` days of a plan (Basic auth plus app_id/app_key).
604
+ x-emulates:
605
+ supported: true
606
+ parity:
607
+ enabled: true
608
+ safe: true
609
+ parameters:
610
+ - $ref: '#/components/parameters/AppId'
611
+ - $ref: '#/components/parameters/AppKey'
612
+ - *id001
613
+ - name: app_id
614
+ in: path
615
+ required: true
616
+ schema:
617
+ type: string
618
+ enum:
619
+ - parity
620
+ - name: type
621
+ in: query
622
+ required: false
623
+ schema:
624
+ type: string
625
+ enum:
626
+ - public
627
+ responses:
628
+ '200':
629
+ description: Selection
630
+ content:
631
+ application/json:
632
+ schema:
633
+ $ref: '#/components/schemas/MealPlanResponse'
634
+ '400':
635
+ description: Illegal plan
636
+ content:
637
+ application/json:
638
+ schema:
639
+ $ref: '#/components/schemas/RecipeErrors'
640
+ '401':
641
+ description: Unknown app_id / app_key
642
+ content:
643
+ application/json:
644
+ schema:
645
+ $ref: '#/components/schemas/RecipeErrors'
646
+ '429':
647
+ description: Usage limits are exceeded
648
+ content:
649
+ application/json:
650
+ schema:
651
+ $ref: '#/components/schemas/RecipeErrors'
652
+ requestBody:
653
+ required: true
654
+ content:
655
+ application/json:
656
+ schema:
657
+ $ref: '#/components/schemas/MealPlanRequest'
658
+ /api/shopping-list/v2:
659
+ post:
660
+ operationId: ShoppingList
661
+ description: Aggregate the ingredients of recipes into a shopping list (optionally a cart link).
662
+ x-emulates:
663
+ supported: true
664
+ parity:
665
+ enabled: true
666
+ safe: true
667
+ parameters:
668
+ - $ref: '#/components/parameters/AppId'
669
+ - $ref: '#/components/parameters/AppKey'
670
+ - *id001
671
+ - name: shopping-cart
672
+ in: query
673
+ required: false
674
+ schema:
675
+ type: string
676
+ enum:
677
+ - 'true'
678
+ - name: beta
679
+ in: query
680
+ required: false
681
+ schema:
682
+ type: string
683
+ enum:
684
+ - 'true'
685
+ responses:
686
+ '200':
687
+ description: Shopping list
688
+ content:
689
+ application/json:
690
+ schema:
691
+ $ref: '#/components/schemas/ShoppingListResponse'
692
+ '400':
693
+ description: Unknown recipe
694
+ content:
695
+ application/json:
696
+ schema:
697
+ $ref: '#/components/schemas/RecipeErrors'
698
+ '401':
699
+ description: Unknown app_id / app_key
700
+ content:
701
+ application/json:
702
+ schema:
703
+ $ref: '#/components/schemas/RecipeErrors'
704
+ '429':
705
+ description: Usage limits are exceeded
706
+ content:
707
+ application/json:
708
+ schema:
709
+ $ref: '#/components/schemas/RecipeErrors'
710
+ requestBody:
711
+ required: true
712
+ content:
713
+ application/json:
714
+ schema:
715
+ $ref: '#/components/schemas/ShoppingListRequest'
716
+ components:
717
+ parameters:
718
+ AppId:
719
+ name: app_id
720
+ in: query
721
+ required: true
722
+ description: Edamam application id (any value unless `apps` is set). The parity vocabulary is fixed.
723
+ schema:
724
+ type: string
725
+ enum:
726
+ - parity
727
+ AppKey:
728
+ name: app_key
729
+ in: query
730
+ required: true
731
+ schema:
732
+ type: string
733
+ enum:
734
+ - parity-key
735
+ schemas:
736
+ Measure:
737
+ type: object
738
+ required:
739
+ - uri
740
+ - label
741
+ - weight
742
+ properties:
743
+ uri:
744
+ type: string
745
+ label:
746
+ type: string
747
+ weight:
748
+ type: number
749
+ Food:
750
+ type: object
751
+ required:
752
+ - foodId
753
+ - label
754
+ - category
755
+ - categoryLabel
756
+ properties:
757
+ foodId:
758
+ type: string
759
+ label:
760
+ type: string
761
+ knownAs:
762
+ type: string
763
+ nutrients:
764
+ type: object
765
+ additionalProperties:
766
+ type: number
767
+ brand:
768
+ type: string
769
+ category:
770
+ type: string
771
+ categoryLabel:
772
+ type: string
773
+ foodContentsLabel:
774
+ type: string
775
+ image:
776
+ type: string
777
+ servingSizes:
778
+ type: array
779
+ items:
780
+ type: object
781
+ servingsPerContainer:
782
+ type: number
783
+ Recipe:
784
+ type: object
785
+ required:
786
+ - uri
787
+ - label
788
+ - url
789
+ - yield
790
+ - ingredientLines
791
+ - ingredients
792
+ - totalNutrients
793
+ - cautions
794
+ - dietLabels
795
+ - healthLabels
796
+ properties:
797
+ uri:
798
+ type: string
799
+ label:
800
+ type: string
801
+ image:
802
+ type: string
803
+ source:
804
+ type: string
805
+ url:
806
+ type: string
807
+ shareAs:
808
+ type: string
809
+ yield:
810
+ type: number
811
+ dietLabels:
812
+ type: array
813
+ items:
814
+ type: string
815
+ healthLabels:
816
+ type: array
817
+ items:
818
+ type: string
819
+ cautions:
820
+ type: array
821
+ items:
822
+ type: string
823
+ ingredientLines:
824
+ type: array
825
+ items:
826
+ type: string
827
+ ingredients:
828
+ type: array
829
+ items:
830
+ type: object
831
+ required:
832
+ - food
833
+ - quantity
834
+ properties:
835
+ text:
836
+ type: string
837
+ quantity:
838
+ type: number
839
+ measure:
840
+ type:
841
+ - string
842
+ - 'null'
843
+ food:
844
+ type: string
845
+ weight:
846
+ type: number
847
+ foodCategory:
848
+ type:
849
+ - string
850
+ - 'null'
851
+ foodId:
852
+ type: string
853
+ image:
854
+ type:
855
+ - string
856
+ - 'null'
857
+ calories:
858
+ type: number
859
+ totalWeight:
860
+ type: number
861
+ totalTime:
862
+ type: number
863
+ cuisineType:
864
+ type: array
865
+ items:
866
+ type: string
867
+ mealType:
868
+ type: array
869
+ items:
870
+ type: string
871
+ dishType:
872
+ type: array
873
+ items:
874
+ type: string
875
+ totalNutrients: &id002
876
+ type: object
877
+ additionalProperties:
878
+ type: object
879
+ required:
880
+ - label
881
+ - quantity
882
+ - unit
883
+ properties:
884
+ label:
885
+ type: string
886
+ quantity:
887
+ type: number
888
+ unit:
889
+ type: string
890
+ totalDaily: *id002
891
+ Link:
892
+ type: object
893
+ required:
894
+ - href
895
+ properties:
896
+ href:
897
+ type: string
898
+ x-emulates-volatile:
899
+ kind: url
900
+ title:
901
+ type: string
902
+ ParserResponse:
903
+ type: object
904
+ required:
905
+ - text
906
+ - parsed
907
+ - hints
908
+ properties:
909
+ text:
910
+ type: string
911
+ parsed:
912
+ type: array
913
+ items:
914
+ type: object
915
+ required:
916
+ - food
917
+ properties:
918
+ food:
919
+ $ref: '#/components/schemas/Food'
920
+ quantity:
921
+ type: number
922
+ measure:
923
+ $ref: '#/components/schemas/Measure'
924
+ hints:
925
+ type: array
926
+ items:
927
+ type: object
928
+ required:
929
+ - food
930
+ - measures
931
+ properties:
932
+ food:
933
+ $ref: '#/components/schemas/Food'
934
+ measures:
935
+ type: array
936
+ items:
937
+ $ref: '#/components/schemas/Measure'
938
+ _links:
939
+ type: object
940
+ NutrientsRequest:
941
+ type: object
942
+ required:
943
+ - ingredients
944
+ properties:
945
+ ingredients:
946
+ type: array
947
+ minItems: 1
948
+ maxItems: 3
949
+ items:
950
+ type: object
951
+ required:
952
+ - quantity
953
+ - measureURI
954
+ - foodId
955
+ properties:
956
+ quantity:
957
+ type: number
958
+ exclusiveMinimum: 0
959
+ maximum: 20
960
+ measureURI:
961
+ type: string
962
+ examples:
963
+ - http://www.edamam.com/ontologies/edamam.owl#Measure_unit
964
+ - http://www.edamam.com/ontologies/edamam.owl#Measure_cup
965
+ - http://www.edamam.com/ontologies/edamam.owl#Measure_gram
966
+ foodId:
967
+ type: string
968
+ examples:
969
+ - food_egg
970
+ - food_banana
971
+ - food_rice_cooked
972
+ qualifiers:
973
+ type: array
974
+ items:
975
+ type: string
976
+ NutritionAnalysis:
977
+ type: object
978
+ required:
979
+ - calories
980
+ - totalWeight
981
+ - dietLabels
982
+ - healthLabels
983
+ - cautions
984
+ - totalNutrients
985
+ - totalDaily
986
+ properties:
987
+ uri:
988
+ type: string
989
+ x-emulates-volatile:
990
+ kind: id
991
+ calories:
992
+ type: number
993
+ totalWeight:
994
+ type: number
995
+ dietLabels:
996
+ type: array
997
+ items:
998
+ type: string
999
+ healthLabels:
1000
+ type: array
1001
+ items:
1002
+ type: string
1003
+ cautions:
1004
+ type: array
1005
+ items:
1006
+ type: string
1007
+ totalNutrients: *id002
1008
+ totalDaily: *id002
1009
+ ingredients:
1010
+ type: array
1011
+ items:
1012
+ type: object
1013
+ yield:
1014
+ type: number
1015
+ ImageRequest:
1016
+ type: object
1017
+ required:
1018
+ - image
1019
+ properties:
1020
+ image:
1021
+ type: string
1022
+ minLength: 1
1023
+ maxLength: 200
1024
+ examples:
1025
+ - data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ==
1026
+ - data:image/png;base64,iVBORw0KGgo=
1027
+ VisionResponse:
1028
+ type: object
1029
+ properties:
1030
+ parsed:
1031
+ type: object
1032
+ properties:
1033
+ food:
1034
+ $ref: '#/components/schemas/Food'
1035
+ quantity:
1036
+ type: number
1037
+ measure:
1038
+ $ref: '#/components/schemas/Measure'
1039
+ recipe:
1040
+ type: object
1041
+ properties:
1042
+ label:
1043
+ type: string
1044
+ calories:
1045
+ type: number
1046
+ totalNutrients: *id002
1047
+ RecipeAnalysisRequest:
1048
+ type: object
1049
+ required:
1050
+ - ingr
1051
+ properties:
1052
+ title:
1053
+ type: string
1054
+ maxLength: 80
1055
+ yield:
1056
+ type: integer
1057
+ minimum: 1
1058
+ maximum: 8
1059
+ ingr:
1060
+ type: array
1061
+ maxItems: 4
1062
+ items:
1063
+ type: string
1064
+ minLength: 1
1065
+ maxLength: 60
1066
+ examples:
1067
+ - 2 large eggs
1068
+ - 1 cup cooked rice
1069
+ - 1 banana
1070
+ - 1 slice bread
1071
+ - xyzzy
1072
+ RecipeHit:
1073
+ type: object
1074
+ required:
1075
+ - recipe
1076
+ properties:
1077
+ recipe:
1078
+ $ref: '#/components/schemas/Recipe'
1079
+ _links:
1080
+ type: object
1081
+ properties:
1082
+ self:
1083
+ $ref: '#/components/schemas/Link'
1084
+ RecipeSearchResponse:
1085
+ type: object
1086
+ required:
1087
+ - from
1088
+ - to
1089
+ - count
1090
+ - hits
1091
+ properties:
1092
+ from:
1093
+ type: integer
1094
+ to:
1095
+ type: integer
1096
+ count:
1097
+ type: integer
1098
+ _links:
1099
+ type: object
1100
+ properties:
1101
+ next:
1102
+ $ref: '#/components/schemas/Link'
1103
+ hits:
1104
+ type: array
1105
+ items:
1106
+ $ref: '#/components/schemas/RecipeHit'
1107
+ MealPlanRequest:
1108
+ type: object
1109
+ required:
1110
+ - size
1111
+ - plan
1112
+ properties:
1113
+ size:
1114
+ type: integer
1115
+ minimum: 1
1116
+ maximum: 7
1117
+ plan:
1118
+ $ref: '#/components/schemas/PlanSection'
1119
+ PlanSection:
1120
+ type: object
1121
+ properties:
1122
+ accept:
1123
+ type: object
1124
+ required:
1125
+ - all
1126
+ properties:
1127
+ all:
1128
+ type: array
1129
+ maxItems: 2
1130
+ items:
1131
+ type: object
1132
+ properties:
1133
+ health:
1134
+ type: array
1135
+ maxItems: 2
1136
+ items:
1137
+ type: string
1138
+ enum:
1139
+ - VEGAN
1140
+ - VEGETARIAN
1141
+ - GLUTEN_FREE
1142
+ - DAIRY_FREE
1143
+ - PESCATARIAN
1144
+ meal:
1145
+ type: array
1146
+ maxItems: 2
1147
+ items:
1148
+ type: string
1149
+ enum:
1150
+ - breakfast
1151
+ - lunch/dinner
1152
+ - snack
1153
+ dish:
1154
+ type: array
1155
+ maxItems: 2
1156
+ items:
1157
+ type: string
1158
+ enum:
1159
+ - main course
1160
+ - salad
1161
+ - cereals
1162
+ - egg
1163
+ fit:
1164
+ type: object
1165
+ properties:
1166
+ ENERC_KCAL:
1167
+ type: object
1168
+ properties:
1169
+ min:
1170
+ type: number
1171
+ minimum: 0
1172
+ max:
1173
+ type: number
1174
+ minimum: 0
1175
+ mark:
1176
+ type: number
1177
+ minimum: 0
1178
+ PROCNT:
1179
+ type: object
1180
+ properties:
1181
+ min:
1182
+ type: number
1183
+ minimum: 0
1184
+ max:
1185
+ type: number
1186
+ minimum: 0
1187
+ mark:
1188
+ type: number
1189
+ minimum: 0
1190
+ CHOCDF:
1191
+ type: object
1192
+ properties:
1193
+ min:
1194
+ type: number
1195
+ minimum: 0
1196
+ max:
1197
+ type: number
1198
+ minimum: 0
1199
+ mark:
1200
+ type: number
1201
+ minimum: 0
1202
+ FAT:
1203
+ type: object
1204
+ properties:
1205
+ min:
1206
+ type: number
1207
+ minimum: 0
1208
+ max:
1209
+ type: number
1210
+ minimum: 0
1211
+ mark:
1212
+ type: number
1213
+ minimum: 0
1214
+ FIBTG:
1215
+ type: object
1216
+ properties:
1217
+ min:
1218
+ type: number
1219
+ minimum: 0
1220
+ max:
1221
+ type: number
1222
+ minimum: 0
1223
+ mark:
1224
+ type: number
1225
+ minimum: 0
1226
+ exclude:
1227
+ type: array
1228
+ maxItems: 2
1229
+ items:
1230
+ type: string
1231
+ enum:
1232
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_overnight_oats
1233
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_baked_salmon
1234
+ sections:
1235
+ type: object
1236
+ maxProperties: 4
1237
+ additionalProperties:
1238
+ $ref: '#/components/schemas/PlanSection'
1239
+ examples:
1240
+ - Breakfast: {}
1241
+ Lunch: {}
1242
+ Dinner: {}
1243
+ MealPlanResponse:
1244
+ type: object
1245
+ properties:
1246
+ status:
1247
+ type: string
1248
+ enum:
1249
+ - OK
1250
+ - INCOMPLETE
1251
+ - TIME_OUT
1252
+ selection:
1253
+ type: array
1254
+ items:
1255
+ type: object
1256
+ required:
1257
+ - sections
1258
+ properties:
1259
+ sections:
1260
+ type: object
1261
+ additionalProperties:
1262
+ type: object
1263
+ properties:
1264
+ assigned:
1265
+ type: string
1266
+ _links:
1267
+ type: object
1268
+ properties:
1269
+ self:
1270
+ $ref: '#/components/schemas/Link'
1271
+ sections:
1272
+ type: object
1273
+ ShoppingListRequest:
1274
+ type: object
1275
+ required:
1276
+ - entries
1277
+ properties:
1278
+ entries:
1279
+ type: array
1280
+ minItems: 1
1281
+ maxItems: 3
1282
+ items:
1283
+ type: object
1284
+ required:
1285
+ - quantity
1286
+ - item
1287
+ properties:
1288
+ quantity:
1289
+ type: number
1290
+ exclusiveMinimum: 0
1291
+ maximum: 10
1292
+ measure:
1293
+ type: string
1294
+ enum:
1295
+ - http://www.edamam.com/ontologies/edamam.owl#Measure_serving
1296
+ item:
1297
+ type: string
1298
+ examples:
1299
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_overnight_oats
1300
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_chicken_rice_bowl
1301
+ - http://www.edamam.com/ontologies/edamam.owl#recipe_missing
1302
+ ShoppingListResponse:
1303
+ type: object
1304
+ required:
1305
+ - entries
1306
+ properties:
1307
+ entries:
1308
+ type: array
1309
+ items:
1310
+ type: object
1311
+ required:
1312
+ - foodId
1313
+ - food
1314
+ - quantities
1315
+ properties:
1316
+ foodId:
1317
+ type: string
1318
+ food:
1319
+ type: string
1320
+ quantities:
1321
+ type: array
1322
+ items:
1323
+ type: object
1324
+ required:
1325
+ - quantity
1326
+ - measure
1327
+ properties:
1328
+ quantity:
1329
+ type: number
1330
+ measure:
1331
+ type: string
1332
+ qualifiers:
1333
+ type: array
1334
+ items:
1335
+ type: string
1336
+ _links:
1337
+ type: object
1338
+ properties:
1339
+ shopping-cart:
1340
+ $ref: '#/components/schemas/Link'
1341
+ FoodError:
1342
+ type: object
1343
+ required:
1344
+ - status
1345
+ - message
1346
+ properties:
1347
+ status:
1348
+ type: string
1349
+ enum:
1350
+ - error
1351
+ message:
1352
+ type: string
1353
+ error:
1354
+ type: string
1355
+ RecipeErrors:
1356
+ type: array
1357
+ items:
1358
+ type: object
1359
+ required:
1360
+ - errorCode
1361
+ - message
1362
+ properties:
1363
+ errorCode:
1364
+ type: string
1365
+ message:
1366
+ type: string
1367
+ params:
1368
+ type: array
1369
+ items:
1370
+ type: string