TipsGoalUpdateRequest tips.goal-update-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- tips
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/tips/goal-update-request.v1.json
tips.goal-update-request@1: bodies of tips.goal.update on OpenVibe.Tips. PATCH /api/v1/goals/:id: { title?, target_amount?, description?, image_url?, sort_order?, revision? } edits an active goal; revision, when given, must be the goal's current revision (409 tips.revision_conflict). Needs an Idempotency-Key header (8-200 of A-Z a-z 0-9 . _ : -; 400 idempotency.key_required): a replay with the same key and body returns the first answer, the same key with another body is 422 idempotency.key_reused. GET /api/v1/goals/:id (reading it, with contributions for the creator and granted services) takes no body. Refusals are problem+json: 404 tips.goal_not_found; 409 tips.goal_closed or tips.revision_conflict; 422 tips.invalid_input, tips.invalid_amount or tips.text_too_long. Unknown fields are ignored.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: read
{}Valid: retarget
{
"target_amount": 25000,
"revision": 13
}Rejected: zero-target
{
"target_amount": 0
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('tips.goal-update-request@1', value); // { valid, errors: [{ path, message }] }