|
31 | 31 | new OAT\Property(property: 'glass', type: 'string', nullable: true, example: 'Highball glass', description: 'Type of glass used for the cocktail'), |
32 | 32 | new OAT\Property(property: 'utensils', type: 'array', items: new OAT\Items(type: 'string'), description: 'Utensils used for preparing the cocktail'), |
33 | 33 | new OAT\Property(property: 'method', type: 'string', nullable: true, example: 'Shaken', description: 'Method of preparation for the cocktail'), |
| 34 | + new OAT\Property(property: 'method_dilution_percentage', type: 'number', nullable: true, example: '12', description: 'Dilution percentage associated with the preparation method'), |
| 35 | + new OAT\Property(property: 'volume_ml', type: 'number', nullable: true, example: '120', description: 'Total volume of the cocktail in milliliters'), |
34 | 36 | new OAT\Property(property: 'created_at', type: 'string', format: 'date-time', example: '2023-10-01T12:00:00Z', description: 'Date and time when the cocktail was created'), |
| 37 | + new OAT\Property(property: 'in_bar_shelf', type: 'boolean', example: true, description: 'Indicates if the cocktail can be made in the current bar'), |
35 | 38 | new OAT\Property(property: 'abv', type: 'number', format: 'float', nullable: true, example: 0.15, description: 'Alcohol by volume percentage of the cocktail'), |
36 | 39 | new OAT\Property(property: 'year', type: 'integer', nullable: true, example: 2023, description: 'Year the cocktail was created or published'), |
37 | 40 | new OAT\Property( |
@@ -98,7 +101,10 @@ public function toArray($request) |
98 | 101 | 'glass' => $this->glass->name ?? null, |
99 | 102 | 'utensils' => $this->utensils->pluck('name'), |
100 | 103 | 'method' => $this->method->name ?? null, |
| 104 | + 'method_dilution_percentage' => $this->method->dilution_percentage ?? null, |
| 105 | + 'volume_ml' => $this->getVolume(), |
101 | 106 | 'created_at' => $this->created_at->toAtomString(), |
| 107 | + 'in_bar_shelf' => $this->inBarShelf(), |
102 | 108 | 'abv' => $this->abv, |
103 | 109 | 'year' => $this->year, |
104 | 110 | 'ingredients' => $this->ingredients->map(function (CocktailIngredient $cocktailIngredient) { |
|
0 commit comments