NewsStoryRetractRequest news.story-retract-request@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
news
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/news/story-retract-request.v1.json

news.story-retract-request@1: the body of news.story.retract on OpenVibe.News: POST /api/v1/stories/:id/retract { note } retracts a published story with a public note (editors). The story stays at its URL with the notice, becomes noindex and leaves sitemaps and Search; final. Refusals: 422 story.retraction_note_required (under 10 characters once whitespace is collapsed), 422 flag.note_too_long (over 2000), 409 story.not_published.

Fields

FieldTypeRequiredDescriptionConstraints
notestringyes
  • minLength 10
  • maxLength 2000

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: retract
{
  "note": "The closure report was based on a hoax notice; the bridge was never closed."
}
Rejected: short-note
{
  "note": "wrong"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('news.story-retract-request@1', value);   // { valid, errors: [{ path, message }] }