AppManifest codes.app-manifest@1

Generated at from openvibe-contracts v0.33.0 and openvibe-sdk v0.5.0.

Version
1.0.0
Owner
codes
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-014
Schema
https://openvibe.network/contracts/codes/app-manifest.v1.json

PROPOSAL (OpenVibe.Codes, roadmap Wave 20): an app release as the platform knows it. The app is a Network developer app (ADR-014): its id is the Network app id, its capabilities are only a request (the grants in Network are the authority), and trust tiers are metadata that never change a grant check. OpenVibe.Codes validates with this schema, loaded into openvibe-contracts' validator, until Contracts publishes it as codes.app-manifest@1.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyesThe Network app id (its client_id). Its principal subject is app:<id>.
  • pattern ^app_[0-9A-HJKMNP-TV-Z]{26}$
namestringyes
  • minLength 1
  • maxLength 80
versionstringyesSemantic version of this release.
  • pattern ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$
descriptionstring
  • maxLength 1000
publisheridentity.subject-refyesWho publishes the release: the app itself or a member of its project.
project_idstringyesThe Network project that owns the app. Tenancy in other services is keyed by it (ADR-014).
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
environmentenumThe app's environment. Apps never change environment.
  • one of "sandbox", "production"
capabilitiesarray of stringyesCapability ids the app asks for (3+ segments). Only active public (or partner, by staff allowance) capabilities can ever be granted to apps.
  • maxItems 64
  • unique items
  • items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$
eventsobject
  • no other fields
events.consumesarray of stringEvent types (or a trailing .* family) the app subscribes to.
  • maxItems 64
  • unique items
  • items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+)*(\.\*)?$
redirect_urisarray of stringInformational copy of the redirect URIs registered in Network (Network's list is the authority).
  • maxItems 10
  • unique items
  • items: maxLength 500
homepagestring
  • pattern ^https://[^\s]{1,2000}$
repositorystring
  • pattern ^https://[^\s]{1,2000}$
licensestringSPDX license expression.
  • minLength 1
  • maxLength 100
compatibilityobjectyes
  • no other fields
compatibility.contractsstringyesSemver range of openvibe-contracts releases it was built against.
  • minLength 1
  • maxLength 100
compatibility.sdkstringSemver range of openvibe-sdk releases it uses.
  • minLength 1
  • maxLength 100

Examples

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

Valid: starter
{
  "id": "app_01JABCDEFGHJKMNPQRSTVWXYZ0",
  "name": "My app",
  "version": "0.1.0",
  "publisher": {
    "type": "app",
    "id": "app_01JABCDEFGHJKMNPQRSTVWXYZ0"
  },
  "project_id": "prj_01JABCDEFGHJKMNPQRSTVWXYZ0",
  "environment": "sandbox",
  "capabilities": [],
  "compatibility": {
    "contracts": "^0.26.0",
    "sdk": "^0.2.2"
  }
}
Rejected: bad-id
{
  "id": "app_lowercase",
  "name": "My app",
  "version": "0.1.0",
  "publisher": {
    "type": "app",
    "id": "app_01JABCDEFGHJKMNPQRSTVWXYZ0"
  },
  "project_id": "prj_01JABCDEFGHJKMNPQRSTVWXYZ0",
  "environment": "sandbox",
  "capabilities": [],
  "compatibility": {
    "contracts": "^0.26.0",
    "sdk": "^0.2.2"
  }
}
Rejected: no-contracts-range
{
  "id": "app_01JABCDEFGHJKMNPQRSTVWXYZ0",
  "name": "My app",
  "version": "0.1.0",
  "publisher": {
    "type": "app",
    "id": "app_01JABCDEFGHJKMNPQRSTVWXYZ0"
  },
  "project_id": "prj_01JABCDEFGHJKMNPQRSTVWXYZ0",
  "environment": "sandbox",
  "capabilities": [],
  "compatibility": {}
}

Validate

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