DealsVoteRequest deals.vote-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- deals
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/deals/vote-request.v1.json
deals.vote-request@1: the body of PUT /api/v1/offers/:id/vote on OpenVibe.Deals (deals.vote.set; a person): { value: 1 | -1 }. DELETE /api/v1/offers/:id/vote (deals.vote.remove) takes no body.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: down
{
"value": -1
}Rejected: two
{
"value": 2
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('deals.vote-request@1', value); // { valid, errors: [{ path, message }] }