FoodPantryRequest food.pantry-request@1
Generated at from
openvibe-contracts v0.127.0 and
openvibe-sdk v0.37.0.
- Version
- 1.0.0
- Owner
- food
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/food/pantry-request.v1.json
food.pantry-request@1: PUT /api/v1/pantry on OpenVibe.Food replaces the pantry with exactly these food slugs.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
items | array of string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: empty
{
"items": []
}Valid: two
{
"items": [
"eggs-dozen",
"rice-long-grain-5lb"
]
}Rejected: blank-slug
{
"items": [
""
]
}Rejected: not-array
{
"items": "eggs"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('food.pantry-request@1', value); // { valid, errors: [{ path, message }] }