WikiSearchResult wiki.search-result@1

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

Version
1.0.0
Owner
wiki
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/wiki/search-result.v1.json

wiki.search-result@1: the answer of GET /api/v1/search?q=&space=&limit= on OpenVibe.Wiki (wiki.search.query): { results } — pages the caller may read that match, each with its summary.

Fields

FieldTypeRequiredDescriptionConstraints
resultsarray of objectyes
results[].idstringyes
results[].spacestringyes
results[].slugstringyes
results[].titlestringyes
results[].urlstringyes
results[].summarystring | null

Examples

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

Valid: hit
{
  "results": [
    {
      "id": "pg_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "space": "openvibe",
      "slug": "restreaming",
      "title": "Restreaming",
      "url": "https://openvibe.wiki/openvibe/restreaming",
      "summary": "Sending one stream to several platforms."
    }
  ]
}
Rejected: partial
{
  "results": [
    {
      "title": "no id"
    }
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('wiki.search-result@1', value);   // { valid, errors: [{ path, message }] }